Model dynamic occlusion detection and adjustment method, system, storage medium and device
By dynamic occlusion detection and adjustment of the 3D model display interface, the problem of key information being occluded in the 3D model display in the prior art is solved, real-time and efficient dynamic occlusion management are achieved, and user experience is improved.
Patent Information
- Application Number
- CN202411613416.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-13
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2044-11-13
AI Technical Summary
The existing 3D model display technology lacks a dynamic occlusion management mechanism, which leads to users who may encounter the problem of key information being occluded in actual operations, and the occlusion response efficiency in dynamic environments is not high, and it cannot meet the real-time requirements.
By importing the model file into the preset program for JSON editing, specifying the three-dimensional model and its auxiliary materials to be displayed, and generating a display interface and step control interface. Detect in real time whether the flyout model is blocked in the display interface, and adjust the flyout direction and flyout distance of the flyout model to display it independently in another display area.
Real-time detection and automatic adjustment of the flying out of the model in the 3D model display interface is realized, ensuring that key information is always effectively displayed, improving user experience, and meeting the real-time needs in dynamic environments.
Smart Images

Figure CN119131319B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of model rendering, and in particular to a model dynamic occlusion detection and adjustment method, system, storage medium and device. Background Art
[0002] With the widespread application of 3D visualization technology in education, design, entertainment and industry, how to effectively display complex 3D models to ensure clear and unobstructed vision has become an important technical challenge.
[0003] In the prior art, the display of 3D models is often fixed and lacks a dynamic occlusion management mechanism, which may cause users to encounter the problem of key information being blocked in actual operation. In addition, when processing model display, the occlusion response in a dynamic environment is inefficient and cannot meet the real-time requirements. Summary of the invention
[0004] In view of the deficiencies in the prior art, the purpose of the present invention is to provide a model dynamic occlusion detection and adjustment method, system, storage medium and device, which are intended to detect and automatically adjust the three-dimensional model in the display interface so that key information can be effectively displayed at all times.
[0005] A first aspect of the present invention is to provide a model dynamic occlusion detection and adjustment method, the method comprising:
[0006] Import the model file into the preset program and edit it in JSON, edit and specify the 3D model to be displayed and its corresponding auxiliary materials to obtain a JSON file;
[0007] Based on the JSON file, a step control interface for displaying the specified three-dimensional model in the display interface of the preset program and generating the corresponding auxiliary material;
[0008] Performing real-time detection on the three-dimensional model to determine whether there is a flying model of the three-dimensional model in the display interface and is blocked;
[0009] If so, adjust the flying direction and flying distance of the flying model in the display interface so that the flying model is independently displayed in another flying display area in the display interface.
[0010] According to one aspect of the above technical solution, the step of performing real-time detection on the three-dimensional model and determining whether there is a flying model of the three-dimensional model in the display interface and is blocked includes:
[0011] In the display interface, the three-dimensional model is detected in real time to determine whether there is a flying model corresponding to the three-dimensional model in the display interface;
[0012] If yes, identifying the destination coordinates of the fly-out model in the display interface;
[0013] It is determined according to the destination coordinates whether there are other objects in the fly-out display area of the fly-out model that block the fly-out model.
[0014] According to one aspect of the above technical solution, the step of adjusting the flying direction and flying distance of the flying model in the display interface so that the flying model is independently displayed in another flying display area in the display interface includes:
[0015] Respectively identifying the distances from the flying-out model to the six faces of the bounding box of the three-dimensional model, and storing the distance values in a preset distance value set;
[0016] The six distance values in the distance value set are sorted from small to large, and the direction corresponding to the minimum flying-out distance is determined as the initial flying-out direction of the flying-out model.
[0017] According to one aspect of the above technical solution, the step of adjusting the flying direction and flying distance of the flying model in the display interface so that the flying model is independently displayed in another flying display area in the display interface also includes:
[0018] Taking the geometric center point of the flying model as the center of the circle, the radius of the circumscribed circle of its bounding box is calculated;
[0019] Adding the circumscribed circle radius to the minimum fly-out distance to obtain a default fly-out distance of the fly-out model;
[0020] Calculating the target space coordinates of the flying model according to the initial flying direction and the default flying distance;
[0021] The position and direction of the fly-out model are adjusted according to the target space coordinates, so that the fly-out model is independently displayed in another fly-out display area in the display interface.
[0022] According to one aspect of the above technical solution, the method further includes:
[0023] According to the target space coordinates, a spherical area with a circumscribed circle radius as a radius is set;
[0024] Detect whether there are other objects in the spherical area.
[0025] According to one aspect of the above technical solution, if other objects are detected in the spherical area, the method further includes:
[0026] Selecting the next numerical element in the distance value set;
[0027] The flying direction and flying distance of the flying model are recalculated according to the selected numerical elements, and the target space coordinates of the flying model in the display interface are re-determined to finally determine the flying display area of the flying model in the display interface.
[0028] According to one aspect of the above technical solution, the method further includes:
[0029] A dynamic interpolation algorithm is used to generate a smooth animation effect, and the fly-out model is adjusted according to the fly-out direction and the fly-out distance in the display interface.
[0030] A second aspect of the present invention is to provide a model dynamic occlusion detection and adjustment system, which is applied to the method described in the above technical solution, and the system comprises:
[0031] The model import module is used to import the model file into the preset program and perform JSON editing, edit and specify the 3D model to be displayed and its corresponding auxiliary materials, and obtain the JSON file;
[0032] A model display module, used to display the specified three-dimensional model in the display interface of the preset program based on the JSON file and generate a step control interface of the corresponding auxiliary material;
[0033] A model detection module, used to detect the three-dimensional model in real time, and determine whether there is a flying model of the three-dimensional model in the display interface and is blocked;
[0034] The model adjustment module is used to adjust the flying direction and flying distance of the flying model in the display interface when the model detection module determines that there is a flying model of the three-dimensional model in the display interface and it is blocked, so that the flying model can be independently displayed in another flying display area in the display interface.
[0035] The third aspect of the present invention is to provide a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the steps of the method described in the above technical solution.
[0036] The fourth aspect of the present invention is to provide an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in the above technical solution when executing the program.
[0037] Compared with the prior art, the model dynamic occlusion detection and adjustment method, system, storage medium and device shown in the present invention have the following beneficial effects:
[0038] By importing the model file into the preset program and performing JSON editing, the three-dimensional model to be displayed and its corresponding auxiliary materials are edited and specified to obtain a JSON file. Based on the JSON file, the specified three-dimensional model is displayed in the display interface of the preset program and a step control interface for the corresponding auxiliary materials is generated. The three-dimensional model is detected in real time to determine whether there is a fly-out model of the three-dimensional model in the display interface and whether it is blocked. If so, the fly-out direction and distance of the fly-out model in the display interface are adjusted so that the fly-out model is independently displayed in another fly-out display area in the display interface. The method shown in this embodiment detects whether there is a fly-out model associated with the three-dimensional model in the display interface and whether the fly-out model is blocked, and dynamically adjusts the position of the fly-out model to change the fly-out display area when the fly-out model is blocked. The method shown in this embodiment can automatically adjust if key information is blocked during the display of the three-dimensional model, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0040] Figure 1 It is a flowchart of a method for detecting and adjusting dynamic occlusion of a model shown in one embodiment of the present invention;
[0041] Figure 2 It is a structural block diagram of a model dynamic occlusion detection and adjustment system shown in one embodiment of the present invention. DETAILED DESCRIPTION
[0042] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings. Several embodiments of the present invention are shown in the accompanying drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present invention more thorough and comprehensive.
[0043] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present invention belongs. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.
[0044] Embodiment 1
[0045] See also Figure 1The first embodiment of the present invention provides a model dynamic occlusion detection and adjustment method. The method shown in this embodiment includes steps S10 to S40:
[0046] Step S10, importing the model file into a preset program and performing JSON editing, editing and specifying the three-dimensional model to be displayed and its corresponding auxiliary materials, and obtaining a JSON file.
[0047] In this embodiment, the model file needs to be first imported into a preset program, and then edited using the standard JSON file format provided in the program to edit the three-dimensional model and related auxiliary materials that need to be displayed in the specified model file.
[0048] The model file may contain one 3D model or multiple 3D models. The auxiliary materials are used to further explain the 3D model when displaying the 3D model, such as text, video, audio, picture and text file.
[0049] Specifically, after importing the model file into the preset program, it is necessary to edit the three-dimensional model and auxiliary materials in the model file according to the system preset JSON format to obtain a JSON file for subsequent data calls.
[0050] Step S20, based on the JSON file, the designated three-dimensional model is displayed in the display interface of the preset program and a step control interface of the auxiliary material corresponding thereto is generated.
[0051] In this embodiment, based on the pre-edited JSON file, a single or multiple three-dimensional models that need to be displayed are displayed in the display interface of the preset program, and the auxiliary materials set by the user are displayed simultaneously, thereby generating a step control interface for the user to control the model display. In this step control interface, the three-dimensional model can be edited, for example, a sub-model in the three-dimensional model can be controlled to fly out for display, that is, the sub-model is displayed in isolation, wherein the sub-model that flies out for display is also called a fly-out model.
[0052] Step S30: Real-time detection is performed on the three-dimensional model to determine whether there is a flying model of the three-dimensional model in the display interface and whether it is blocked.
[0053] In this embodiment, the step of performing real-time detection on the three-dimensional model and determining whether there is a flying-out model of the three-dimensional model and being blocked in the display interface includes:
[0054] In the display interface, the three-dimensional model is detected in real time to determine whether there is a flying model corresponding to the three-dimensional model in the display interface;
[0055] If yes, identifying the destination coordinates of the fly-out model in the display interface;
[0056] It is determined according to the destination coordinates whether there are other objects in the fly-out display area of the fly-out model that block the fly-out model.
[0057] The step of adjusting the flying direction and flying distance of the flying model in the display interface so that the flying model is independently displayed in another flying display area in the display interface includes:
[0058] Respectively identifying the distances from the flying-out model to the six faces of the bounding box of the three-dimensional model, and storing the distance values in a preset distance value set;
[0059] The six distance values in the distance value set are sorted from small to large, and the direction corresponding to the minimum flying-out distance is determined as the initial flying-out direction of the flying-out model.
[0060] The step of adjusting the flying direction and flying distance of the flying model in the display interface so that the flying model is independently displayed in another flying display area in the display interface further includes:
[0061] Taking the geometric center point of the flying model as the center of the circle, the radius of the circumscribed circle of its bounding box is calculated;
[0062] Adding the circumscribed circle radius to the minimum fly-out distance to obtain a default fly-out distance of the fly-out model;
[0063] Calculating the target space coordinates of the flying model according to the initial flying direction and the default flying distance;
[0064] The position and direction of the fly-out model are adjusted according to the target space coordinates, so that the fly-out model is independently displayed in another fly-out display area in the display interface.
[0065] In this embodiment, after displaying the three-dimensional model and its corresponding auxiliary materials, it will be detected whether there is a fly-out model associated with the three-dimensional model in the display interface, that is, the feature tree of the three-dimensional model is used to query whether there is a fly-out model in the display interface. If there is a fly-out model, this embodiment will further detect whether the three-dimensional model in the display interface blocks the fly-out model, or whether other three-dimensional models block the fly-out model.
[0066] If the three-dimensional model is an independent overall model, that is, the three-dimensional model is composed of a single sub-model, there is no need to perform a fly-out display of the three-dimensional model, and the method ends.
[0067] Specifically, if it is determined that there is a fly-out model associated with the three-dimensional model in the display interface and there is occlusion, then in this embodiment, the destination coordinates of the fly-out model in the display interface will be identified, that is, the actual coordinates of the fly-out model currently in the display interface, which usually refers to the Cartesian coordinates of the geometric center point of the fly-out model in the display interface, and then based on the Cartesian coordinates of the fly-out model, it is determined whether there are other objects in the fly-out display area of the fly-out model that obstruct the fly-out model.
[0068] When it is detected that there is a fly-out model associated with the three-dimensional model in the display interface, and the fly-out model is blocked by the parent three-dimensional model or other three-dimensional models, the method shown in this embodiment enters step S40.
[0069] Step S40, adjusting the flying direction and flying distance of the flying model in the display interface, so that the flying model is independently displayed in another flying display area in the display interface.
[0070] In this embodiment, when the fly-out model is obstructed in the display interface, this embodiment will adjust the fly-out direction and distance of the fly-out model in the display interface so that the fly-out model can be independently displayed in another fly-out display area of the display interface, thereby removing the obstructed state and enabling the fly-out model to be independently displayed without obstruction.
[0071] Specifically, in the process of adjusting the flying direction and flying distance of the flying model in the display interface, the distances from the flying model to the six faces of the bounding box of its parent three-dimensional model will be identified first, specifically, the distances from the geometric center of the flying model to the geometric center of each face will be identified, and then the six distance values will be stored in a distance value set, and in the distance value set, the above six distance values will be sorted according to the rule from small to large, the minimum distance value in the distance value set will be determined, and then the direction corresponding to the minimum distance value will be determined as the initial flying direction of the flying model.
[0072] For example, the directions corresponding to the six faces of the bounding box are X1, X2, Y1, Y2, Z1 and Z2 respectively, and the distances from the geometric center point G of the flying model to the geometric center of each face are L1, L2, L3, L4, L5 and L6 respectively. If the L1 value is the smallest, the X1 direction corresponding to the L1 value is determined as the initial flying direction of the flying model when the model is adjusted, that is, the flying model needs to be controlled to move further along the X1 direction, so as to try to eliminate the blocked state of the flying model by adjusting the position of the flying model.
[0073] Of course, the above only determines the initial flying direction of the flying model. If the position of the flying model in the display interface needs to be readjusted, the flying distance of the flying model also needs to be determined.
[0074] Specifically, taking the geometric center point G of the fly-out model as the center of the circle, calculate the circumscribed circle radius of its bounding box, add the circumscribed circle radius to the above-mentioned minimum fly-out distance to obtain the default fly-out distance of the fly-out model, and finally calculate the target space coordinates of the fly-out model according to the initial fly-out direction and the default fly-out distance, that is, determine the target position of the fly-out model adjustment, and according to the target space coordinates, set the geometric center point G of the fly-out model to coincide with the target space coordinates, so that the position of the fly-out model in the display interface can be changed, thereby changing the fly-out display area of the fly-out model in the display interface.
[0075] After the position of the flying-out model is adjusted according to the pre-calculated flying-out direction and flying-out distance, the flying-out model can be independently displayed in a new display area in the display interface, and the flying-out model is no longer blocked.
[0076] Furthermore, after determining the target space coordinates corresponding to the geometric center point G of the fly-out model, a dynamic interpolation algorithm is used to generate a smooth animation effect, and the fly-out model is adjusted in the display interface according to the fly-out direction and the fly-out distance, that is, to ensure that the display interface is smoothly transitioned when adjusting the position of the fly-out model, so as to enhance the user experience.
[0077] Compared with the prior art, the model dynamic occlusion detection and adjustment method shown in this embodiment has the following beneficial effects:
[0078] By importing the model file into the preset program and performing JSON editing, the three-dimensional model to be displayed and its corresponding auxiliary materials are edited and specified to obtain a JSON file. Based on the JSON file, the specified three-dimensional model is displayed in the display interface of the preset program and a step control interface for the corresponding auxiliary materials is generated. The three-dimensional model is detected in real time to determine whether there is a fly-out model of the three-dimensional model in the display interface and whether it is blocked. If so, the fly-out direction and distance of the fly-out model in the display interface are adjusted so that the fly-out model is independently displayed in another fly-out display area in the display interface. The method shown in this embodiment detects whether there is a fly-out model associated with the three-dimensional model in the display interface and whether the fly-out model is blocked, and dynamically adjusts the position of the fly-out model to change the fly-out display area when the fly-out model is blocked. The method shown in this embodiment can automatically adjust if key information is blocked during the display of the three-dimensional model, thereby improving the user experience.
[0079] Embodiment 2
[0080] The second embodiment of the present invention also provides a model dynamic occlusion detection and adjustment method. In this embodiment, the fly-out display area after the fly-out model is adjusted will be further detected to ensure that there are no other objects in the fly-out display area of the fly-out model in the display interface.
[0081] In this embodiment, after the target space coordinates are calculated according to the calculated flying direction and flying distance, it is further detected whether there are other objects in the area where the target space coordinates are located in the display interface.
[0082] Specifically, they include:
[0083] According to the target space coordinates, a spherical area with a circumscribed circle radius as a radius is set;
[0084] Detect whether there are other objects in the spherical area.
[0085] If other objects are detected in the spherical area, the method further includes:
[0086] Selecting the next numerical element in the distance value set;
[0087] The flying direction and flying distance of the flying model are recalculated according to the selected numerical elements, and the target space coordinates of the flying model in the display interface are re-determined to finally determine the flying display area of the flying model in the display interface.
[0088] In this embodiment, after the target space coordinates are calculated, a spherical area is drawn according to the radius of the circumscribed circle of the bounding box of the flying model to detect whether there are other objects in the spherical area, so as to determine whether the flying model will still be blocked after adjusting its position according to the predetermined flying direction and flying distance.
[0089] When the flying model is still blocked after the position is adjusted according to the predetermined flying direction and flying distance, the flying direction and flying distance of the flying model are re-determined in this embodiment.
[0090] Specifically, the flying direction and the flying distance will be re-determined according to the next numerical element in the distance value set shown in the above embodiment. For example, if the L2 value is the second smallest, the flying direction and the flying distance will be re-determined according to the X2 direction corresponding to the L2 value. For the re-determination of the flying direction and the flying distance, please refer to the steps of first determining the flying direction and the flying distance in the first embodiment, and so on until the flying model is not blocked. Then, the position of the flying model is adjusted according to the finally determined target space coordinates to change the flying display area of the flying model in the display interface to ensure that key information such as the flying model will not be blocked.
[0091] Embodiment 3
[0092] See also Figure 2The second embodiment of the present invention provides a model dynamic occlusion detection and adjustment system. The system shown in this embodiment includes: a model import module 10, a model display module 20, a model detection module 30 and a model adjustment module 40.
[0093] The model import module 10 is used to import the model file into a preset program and perform JSON editing, edit and specify the three-dimensional model to be displayed and its corresponding auxiliary materials, and obtain a JSON file.
[0094] In this embodiment, the model file needs to be first imported into a preset program, and then edited using the standard JSON file format provided in the program to edit the three-dimensional model and related auxiliary materials that need to be displayed in the specified model file.
[0095] The model file may contain one 3D model or multiple 3D models. The auxiliary materials are used to further explain the 3D model when displaying the 3D model, such as text, video, audio, picture and text file.
[0096] Specifically, after importing the model file into the preset program, it is necessary to edit the three-dimensional model and auxiliary materials in the model file according to the system preset JSON format to obtain a JSON file for subsequent data calls.
[0097] The model display module 20 is used to display the specified three-dimensional model in the display interface of the preset program based on the JSON file and generate a step control interface of the corresponding auxiliary materials.
[0098] In this embodiment, based on the pre-edited JSON file, a single or multiple three-dimensional models that need to be displayed are displayed in the display interface of the preset program, and the auxiliary materials set by the user are displayed simultaneously, thereby generating a step control interface for the user to control the model display. In this step control interface, the three-dimensional model can be edited, for example, a sub-model in the three-dimensional model can be controlled to fly out for display, that is, the sub-model is displayed in isolation, wherein the sub-model that flies out for display is also called a fly-out model.
[0099] The model detection module 30 is used to perform real-time detection on the three-dimensional model to determine whether there is a flying model of the three-dimensional model in the display interface and whether it is blocked.
[0100] In this embodiment, after displaying the three-dimensional model and its corresponding auxiliary materials, it will be detected whether there is a fly-out model associated with the three-dimensional model in the display interface, that is, the feature tree of the three-dimensional model is used to query whether there is a fly-out model in the display interface. If there is a fly-out model, this embodiment will further detect whether the three-dimensional model in the display interface blocks the fly-out model, or whether other three-dimensional models block the fly-out model.
[0101] Among them, if the three-dimensional model is an independent overall model, that is, the three-dimensional model is composed of a single sub-model, there is no need to fly out and display the three-dimensional model, and the system shown ends.
[0102] Specifically, if it is determined that there is a fly-out model associated with the three-dimensional model in the display interface and there is occlusion, then in this embodiment, the destination coordinates of the fly-out model in the display interface will be identified, that is, the actual coordinates of the fly-out model currently in the display interface, which usually refers to the Cartesian coordinates of the geometric center point of the fly-out model in the display interface, and then based on the Cartesian coordinates of the fly-out model, it is determined whether there are other objects in the fly-out display area of the fly-out model that obstruct the fly-out model.
[0103] The model adjustment module 40 is used to adjust the flying direction and flying distance of the flying model in the display interface when the model detection module 30 determines that there is a flying model of the three-dimensional model in the display interface and it is blocked, so that the flying model can be independently displayed in another flying display area in the display interface.
[0104] In this embodiment, when the fly-out model is obstructed in the display interface, this embodiment will adjust the fly-out direction and distance of the fly-out model in the display interface so that the fly-out model can be independently displayed in another fly-out display area of the display interface, thereby removing the obstructed state and enabling the fly-out model to be independently displayed without obstruction.
[0105] Specifically, in the process of adjusting the flying direction and flying distance of the flying model in the display interface, the distances from the flying model to the six faces of the bounding box of its parent three-dimensional model will be identified first, specifically, the distances from the geometric center of the flying model to the geometric center of each face will be identified, and then the six distance values will be stored in a distance value set, and in the distance value set, the above six distance values will be sorted according to the rule from small to large, the minimum distance value in the distance value set will be determined, and then the direction corresponding to the minimum distance value will be determined as the initial flying direction of the flying model.
[0106] For example, the directions corresponding to the six faces of the bounding box are X1, X2, Y1, Y2, Z1 and Z2 respectively, and the distances from the geometric center point G of the flying model to the geometric center of each face are L1, L2, L3, L4, L5 and L6 respectively. If the L1 value is the smallest, the X1 direction corresponding to the L1 value is determined as the initial flying direction of the flying model when the model is adjusted, that is, the flying model needs to be controlled to move further along the X1 direction, so as to try to eliminate the blocked state of the flying model by adjusting the position of the flying model.
[0107] Of course, the above only determines the initial flying direction of the flying model. If the position of the flying model in the display interface needs to be readjusted, the flying distance of the flying model also needs to be determined.
[0108] Specifically, taking the geometric center point G of the fly-out model as the center of the circle, calculate the circumscribed circle radius of its bounding box, add the circumscribed circle radius to the above-mentioned minimum fly-out distance to obtain the default fly-out distance of the fly-out model, and finally calculate the target space coordinates of the fly-out model according to the initial fly-out direction and the default fly-out distance, that is, determine the target position of the fly-out model adjustment, and according to the target space coordinates, set the geometric center point G of the fly-out model to coincide with the target space coordinates, so that the position of the fly-out model in the display interface can be changed, thereby changing the fly-out display area of the fly-out model in the display interface.
[0109] After the position of the flying-out model is adjusted according to the pre-calculated flying-out direction and flying-out distance, the flying-out model can be independently displayed in a new display area in the display interface, and the flying-out model is no longer blocked.
[0110] Furthermore, after determining the target space coordinates corresponding to the geometric center point G of the fly-out model, a dynamic interpolation algorithm is used to generate a smooth animation effect, and the fly-out model is adjusted in the display interface according to the fly-out direction and the fly-out distance, that is, to ensure that the display interface is smoothly transitioned when adjusting the position of the fly-out model, so as to enhance the user experience.
[0111] Compared with the prior art, the model dynamic occlusion detection and adjustment system shown in this embodiment has the following beneficial effects:
[0112] By importing the model file into the preset program and performing JSON editing, the three-dimensional model to be displayed and its corresponding auxiliary materials are edited and specified to obtain a JSON file. Based on the JSON file, the specified three-dimensional model is displayed in the display interface of the preset program and a step control interface for the corresponding auxiliary materials is generated. The three-dimensional model is detected in real time to determine whether there is a fly-out model of the three-dimensional model in the display interface and whether it is blocked. If so, the fly-out direction and distance of the fly-out model in the display interface are adjusted so that the fly-out model is independently displayed in another fly-out display area in the display interface. The system shown in this embodiment detects whether there is a fly-out model associated with the three-dimensional model in the display interface and whether the fly-out model is blocked, and dynamically adjusts the position of the fly-out model to change the fly-out display area when the fly-out model is blocked. The system shown in this embodiment can automatically adjust if key information is blocked during the display of the three-dimensional model, thereby improving the user experience.
[0113] Embodiment 4
[0114] A fourth embodiment of the present invention provides a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the steps of the method described in the above embodiment.
[0115] Embodiment 5
[0116] A fifth embodiment of the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in the above embodiment when executing the program.
[0117] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples" or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0118] The above-mentioned embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for those of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. A model dynamic occlusion detection and adjustment method, characterized in that: The method comprises: Import the model file into the preset program and edit it in JSON, edit and specify the 3D model to be displayed and its corresponding auxiliary materials to obtain a JSON file; Based on the JSON file, a step control interface for displaying the specified three-dimensional model in the display interface of the preset program and generating the corresponding auxiliary material; Performing real-time detection on the three-dimensional model to determine whether there is a flying model of the three-dimensional model in the display interface and is blocked; If yes, adjusting the flying direction and flying distance of the flying model in the display interface so that the flying model is independently displayed in another flying display area in the display interface; The step of performing real-time detection on the three-dimensional model to determine whether there is a flying-out model of the three-dimensional model and is blocked in the display interface includes: In the display interface, the three-dimensional model is detected in real time to determine whether there is a flying model corresponding to the three-dimensional model in the display interface; If yes, identifying the destination coordinates of the fly-out model in the display interface; Determine, according to the destination coordinates, whether there are other objects in the fly-out display area of the fly-out model that block the fly-out model; The step of adjusting the flying direction and flying distance of the flying model in the display interface so that the flying model is independently displayed in another flying display area in the display interface includes: Respectively identifying the distances from the flying-out model to the six faces of the bounding box of the three-dimensional model, and storing the distance values in a preset distance value set; Sort the six distance values in the distance value set from small to large, and determine the direction corresponding to the minimum flying distance as the initial flying direction of the flying model; The step of adjusting the flying direction and flying distance of the flying model in the display interface so that the flying model is independently displayed in another flying display area in the display interface further includes: Taking the geometric center point of the flying model as the center of the circle, the radius of the circumscribed circle of its bounding box is calculated; Adding the circumscribed circle radius to the minimum fly-out distance to obtain a default fly-out distance of the fly-out model; Calculating the target space coordinates of the flying model according to the initial flying direction and the default flying distance; Adjusting the position and direction of the fly-out model according to the target space coordinates, so that the fly-out model is independently displayed in another fly-out display area in the display interface; Wherein, the method further comprises: According to the target space coordinates, a spherical area with a circumscribed circle radius as a radius is set; Detecting whether there are other objects in the spherical area; If other objects are detected in the spherical area, the method further includes: Selecting the next numerical element in the distance value set; recalculating the flying direction and the flying distance of the flying model according to the selected numerical elements, and re-determining the target space coordinates of the flying model in the display interface to finally determine the flying display area of the flying model in the display interface; Among them, after the fly-out model is adjusted in position according to the pre-calculated fly-out direction and fly-out distance, the fly-out model is independently displayed in the fly-out display area in the display interface, and the fly-out model is no longer blocked.
2. The model dynamic occlusion detection and adjustment method according to claim 1, characterized in that: The method further comprises: A dynamic interpolation algorithm is used to generate a smooth animation effect, and the fly-out model is adjusted according to the fly-out direction and the fly-out distance in the display interface.
3. A model dynamic occlusion detection and adjustment system, characterized in that: The method applied to any one of claims 1-2, wherein the system comprises: The model import module is used to import the model file into the preset program and perform JSON editing, edit and specify the 3D model to be displayed and its corresponding auxiliary materials, and obtain the JSON file; A model display module, used to display the specified three-dimensional model in the display interface of the preset program based on the JSON file and generate a step control interface of the corresponding auxiliary material; A model detection module, used to detect the three-dimensional model in real time, and determine whether there is a flying model of the three-dimensional model in the display interface and is blocked; The model adjustment module is used to adjust the flying direction and flying distance of the flying model in the display interface when the model detection module determines that there is a flying model of the three-dimensional model in the display interface and it is blocked, so that the flying model can be independently displayed in another flying display area in the display interface.
4. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the instruction is executed by the processor, the steps of the method according to any one of claims 1 to 2 are implemented.
5. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the method according to any one of claims 1 to 2 are implemented.
Citation Information
Patent Citations
Model display method and device, electronic equipment and storage medium
CN115269900A
Collision detection method and device and readable storage medium
CN118608730A