3D model processing method, computer equipment and readable storage medium

By determining the target point and sub-model coordinates of the 3D model in the 3D printing software, the 'explosion' effect is achieved, which solves the problem of multi-color printing model occlusion and overlap, improves the visibility and coloring efficiency of the model, and ensures high-quality Coloring effect.

CN118608733APending Publication Date: 2024-09-06SHENZHEN ANYCUBIC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410602791.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-15
Publication Date
2024-09-06

AI Technical Summary

Technical Problem

During the 3D printing process, sub-models of multi-color printing models have poor visibility due to occlusion and overlap, affecting the coloring effect and efficiency.

Method used

By obtaining the target point coordinates of the 3D model and the coordinates of the sub-model, the display position of the sub-model in the decomposition rendering is determined to achieve an 'explosion' effect, reduce occlusion and overlap, and improve visibility and color control accuracy.

Benefits of technology

It effectively improves the visibility and coloring efficiency of 3D models, ensures that the shape and color of each sub-model are clearly displayed, avoids mutual influence, and improves the effect and accuracy of coloring and printing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118608733A
    Figure CN118608733A
Patent Text Reader

Abstract

The invention provides a 3D model processing method, computer equipment and a readable storage medium, and relates to the field of 3D printing. The method comprises the steps that coordinates of a first target point of a 3D model are acquired, coordinates of second target points of sub-models of the 3D model are acquired, and the 3D model comprises at least two sub-models; according to the coordinate of the first target point and the coordinate of the second target point, determining the display position of the sub-model in the decomposition effect picture; according to the display position, performing decomposition effect picture display on the sub-model; and coloring the target sub-model in response to a coloring instruction for the target sub-model in the decomposition effect picture. According to the method, the explosion effect can effectively reduce the shielding and overlapping among the sub-models, the visibility of the 3D model is improved, a user can conveniently observe and preview the sub-models from all angles, clearly know the shapes and colors of the sub-models and conveniently color the target sub-model, and the coloring efficiency and accuracy are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of 3D printing, and in particular to a 3D model processing method, a computer device and a readable storage medium. Background Art

[0002] A multi-color printing model is generally composed of multiple parts, each of which has its own color. There will be occlusion and overlap among the parts in three-dimensional space. When controlling the color printing of the printed model, the virtual printing model is displayed in the 3D printing software, and the physical model is printed based on the virtual printing model. However, the visibility of the occluded and overlapping virtual printing model is poor, and the shapes and colors of the various parts affect each other, resulting in poor coloring effect and efficiency. Summary of the invention

[0003] In view of this, the present application provides a 3D model processing method, a computer device and a readable storage medium.

[0004] In a first aspect, an embodiment of the present application provides a method for processing a 3D model, comprising:

[0005] Acquire coordinates of a first target point of a 3D model, and acquire coordinates of a second target point of a sub-model of the 3D model, wherein the 3D model includes at least two sub-models;

[0006] Determine the display position of the sub-model in the decomposition effect diagram according to the coordinates of the first target point and the coordinates of the second target point;

[0007] Display the sub-model in decomposition renderings according to the display position;

[0008] In response to a coloring instruction for a target sub-model in the decomposition effect image, the target sub-model is colored.

[0009] In a second aspect, an embodiment of the present application provides a computer device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be executed on the processor, and when the programs or instructions are executed by the processor, the steps of the method of the first aspect are implemented.

[0010] In a third aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method of the first aspect are implemented.

[0011] In an embodiment of the present application, the coordinates of the first target point of the 3D model and the coordinates of the second target point of each sub-model are obtained. The display position of the sub-model in the decomposition rendering is determined according to the coordinates of the first target point and the coordinates of the second target point. Further, the sub-model is displayed according to the display position, so that the 3D model is presented in the form of an exploded view in the decomposition rendering. The "explosion" effect can effectively reduce the occlusion and overlap between the sub-models, improve the visibility of the 3D model, and facilitate the user to observe and preview the sub-model from various angles, clearly understand the shape and color of the sub-model, and further select the corresponding sub-model for coloring control, thereby improving the coloring efficiency and accuracy. Also, when the sub-model corresponding to a sub-model is subsequently colored and printed, it will not affect other sub-models, thereby improving the coloring effect.

[0012] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0014] Figure 1 One of the flowcharts of the method for processing a 3D model according to an embodiment of the present application is shown;

[0015] Figure 2 The second flowchart of the method for processing a 3D model according to an embodiment of the present application is shown;

[0016] Figure 3 A structural block diagram of a computer device according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0017] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

[0018] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0019] The following, in conjunction with the accompanying drawings, describes in detail the 3D model processing method, computer device, and readable storage medium provided in the embodiments of the present application through specific embodiments and their application scenarios.

[0020] The present application embodiment provides a method for processing a 3D model, such as Figure 1 As shown, the method includes:

[0021] S101, obtaining coordinates of a first target point of a 3D model, and obtaining coordinates of a second target point of a sub-model of the 3D model, wherein the 3D model includes at least two sub-models;

[0022] S102, determining a display position of the sub-model in the decomposition rendering according to the coordinates of the first target point and the coordinates of the second target point;

[0023] S103, displaying a decomposition rendering of the sub-model according to the display position.

[0024] In the embodiment of the present application, during the multi-color 3D printing process, a 3D model is generally divided into multiple sub-models (i.e., disassembled parts). Before color printing, the 3D model to be colored and printed (a virtual model) is displayed in the 3D printing software of the computer device. The 3D model is composed of various sub-models. In order to avoid the mutual influence of the shapes and colors of the sub-models that are blocked or overlapped, the embodiment of the present application displays the layout of the sub-models, which can be understood as placing the various sub-models in the 3D printing software to achieve the decomposition of the sub-models and display the "explosion" effect of the 3D model.

[0025] Specifically, the coordinates of the first target point of the 3D model and the coordinates of the second target point of each sub-model are obtained. The display position of the sub-model in the decomposition rendering is determined according to the coordinates of the first target point and the coordinates of the second target point. Further, the sub-model is displayed according to the display position, so that the 3D model is presented in the decomposition rendering in the form of an exploded view (Exploded View).

[0026] The "explosion" effect can effectively reduce the occlusion and overlap between sub-models, improve the visibility of the 3D model, and facilitate users to observe and preview sub-models from various angles, clearly understand the shape and color of the sub-models, and further select the corresponding sub-models for coloring control, which improves the efficiency and accuracy of coloring. In addition, when coloring a sub-model later, it will not affect other sub-models, which improves the coloring effect.

[0027] As a refinement and extension of the above embodiment, the embodiment of the present invention provides another method for processing a 3D model, such as Figure 2 As shown, the method includes:

[0028] S201, obtaining coordinates of a first target point of a 3D model, and obtaining coordinates of a second target point of a sub-model of the 3D model, where the 3D model includes at least two sub-models;

[0029] S202, determining a display position of the sub-model in the decomposition rendering according to the coordinates of the first target point and the coordinates of the second target point;

[0030] S203, displaying a decomposition rendering of the sub-model according to the display position;

[0031] S204, in response to a coloring instruction for a target sub-model in the decomposition rendering, coloring the target sub-model.

[0032] In this embodiment, after displaying the decomposition effect diagram of the 3D model, the user issues a coloring instruction for one or more target sub-models, and the target sub-models corresponding to the coloring instruction are colored in the slicing software. That is, the sub-models after the explosion are picked up and painted with corresponding colors (such as changing the sub-model from the initial red to green), thereby improving the coloring efficiency and effect.

[0033] In one embodiment of the present application, obtaining the coordinates of a first target point of a 3D model, and obtaining the coordinates of a second target point of a sub-model of the 3D model, includes:

[0034] Calculating a bounding box of the 3D model according to the triangular mesh data of the 3D model, and using the coordinates of the center point of the bounding box of the 3D model as the coordinates of the first target point of the 3D model; and

[0035] The bounding box of the sub-model is calculated according to the triangle mesh data of the sub-model, and the coordinates of the center point of the bounding box of the sub-model are used as the coordinates of the second target point of the sub-model.

[0036] In this embodiment, the target point of the model may be the geometric midpoint of the model. The bounding box of the 3D model is calculated based on the triangular mesh data of the 3D model, and the center point of the bounding box of the 3D model, that is, the geometric center, is used as the first target point of the 3D model, thereby obtaining the coordinates of the first target point. The bounding box of the sub-model is calculated based on the triangular mesh data of the sub-model, and the center point of the bounding box of the sub-model, that is, the geometric center, is used as the second target point of the sub-model, thereby obtaining the coordinates of the second target point.

[0037] In one embodiment, a method for calculating a bounding box of a 3D model or a sub-model generally involves the following steps:

[0038] (1) Collect vertex data: Extract the coordinate information of all vertices from the triangular mesh data of the model. These vertices define the surface shape of the model.

[0039] (2) Determine the initial bounding box: Select an initial bounding box, which is usually a cube or cuboid large enough to accommodate all the vertices of the model.

[0040] (3) Iteratively update the bounding box: Traverse all vertices of the model, and for each vertex, check whether it is inside the current bounding box. If the vertex is outside the bounding box, update the size of the bounding box so that it can contain the vertex.

[0041] After obtaining the bounding box of the model through the above method, the center point of the bounding box can be determined.

[0042] In the embodiment of the present application, by calculating the bounding box of the model, the position and boundary of the model in space can be quickly determined, and the geometric center of the model can be accurately obtained, thereby providing a data basis for realizing the explosion effect of the 3D model. Using the geometric center to realize the explosion effect of the 3D model can ensure that the model is evenly expanded from the center to the surroundings during the explosion process, thereby maintaining visual symmetry and balance, making the explosion look more coordinated and orderly.

[0043] In one embodiment of the present application, obtaining the coordinates of a first target point of a 3D model, and obtaining the coordinates of a second target point of a sub-model of the 3D model, includes:

[0044] The coordinates of the center of gravity of the 3D model are used as the coordinates of the first target point of the 3D model, and the coordinates of the center of gravity of the sub-model are used as the coordinates of the second target point of the sub-model.

[0045] In this embodiment, the target point of the model may also be the center of gravity of the model. The center of gravity of the 3D model is used as the first target point of the 3D model, thereby obtaining the coordinates of the first target point. The center of gravity of the sub-model of the 3D model is used as the second target point of the sub-model, thereby obtaining the coordinates of the second target point.

[0046] In the embodiment of the present application, the center of gravity of the model is determined, thereby providing a data basis for realizing the explosion effect of the 3D model. Using the center of gravity to realize the explosion effect of the 3D model can make the explosion effect of the model closer to the physical phenomenon in the real world, thereby increasing the realism of the explosion effect.

[0047] In one embodiment of the present application, after determining the coordinates of the center point of the bounding box of the 3D model, the coordinates of the center point of the bounding box of the sub-model, the coordinates of the center point of the 3D model, and the coordinates of the center point of the sub-model, the middle point between the center point of the bounding box of the 3D model and the center point of the 3D model is determined, and the coordinates of the middle point are used as the coordinates of the first target point of the 3D model; and the coordinates of the middle point between the center point of the bounding box of the sub-model and the center point of the sub-model are determined, and the coordinates of the middle point are used as the coordinates of the second target point of the sub-model. In this way, the symmetry, balance, and realism of the explosion effect are taken into consideration.

[0048] In one embodiment of the present application, determining the display position of the sub-model in the decomposition effect diagram according to the coordinates of the first target point and the coordinates of the second target point includes:

[0049] Obtaining a decomposition degree parameter, where the decomposition degree parameter is used to characterize the distance degree between the sub-model and the first target point in the decomposition effect diagram;

[0050] The display position of the sub-model in the decomposition rendering is determined according to the coordinates of the first target point, the coordinates of the second target point and the decomposition degree parameter.

[0051] In this embodiment, a decomposition degree parameter is obtained to characterize the distance between the sub-model and the first target point in the decomposition effect diagram. The larger the decomposition degree parameter is, the farther the distance between the sub-model and the first target point is, and the higher the degree of explosion is. According to the coordinates of the first target point, the coordinates of the second target point, and the decomposition degree parameter, the display position of the sub-model in the decomposition effect diagram is determined, thereby achieving the explosion effect of the 3D model in the decomposition effect diagram.

[0052] Through the above method, different explosion effects of the 3D model can be displayed based on different decomposition degree parameters.

[0053] In one embodiment of the present application, the value range of the decomposition degree parameter is 0 to 1.

[0054] In this embodiment, the upper and lower limits of the value of the decomposition degree parameter represent the upper and lower limits of the explosion degree. The value range of the decomposition degree parameter is 0 to 1, and 0 can be considered as the lower limit. When the decomposition degree parameter is 0, there is no explosion; 1 is the upper limit. When the decomposition degree parameter is 1, it is the maximum explosion degree that the 3D printing software can provide.

[0055] In order to achieve better visual effects and less impact between sub-models, the distance between each sub-model and the first target point of the 3D model can be made larger, that is, the larger the distance between each sub-model, the higher the explosion degree. The explosion degree can be made higher by setting a larger value for the decomposition degree parameter.

[0056] In one embodiment of the present application, determining the display position of the sub-model in the decomposition effect diagram according to the coordinates of the first target point, the coordinates of the second target point, and the decomposition degree parameter includes:

[0057] Determine a vector pointing from the first target point to the second target point according to the coordinates of the first target point and the coordinates of the second target point;

[0058] The display position of the sub-model in the decomposition rendering is determined according to the vector and decomposition degree parameters.

[0059] In this embodiment, the vector pointing from the first target point to the second target point is calculated. For example, the first target point of the 3D model is a, and the second target points of each sub-model include b1, b2, b3...bn. The vectors between the first target point of the 3D model and the second target points of each sub-model are calculated based on a and b1, b2, b3...bn as follows: V1, V2, V3...Vn. The direction of the vector is from a to b1, b2, b3...bn, which represents the movement direction between the second target point of the sub-model and the first target point when the explosion state is present, that is, the second target point moves in the direction away from the first target point.

[0060] Furthermore, the display position of the sub-model in the decomposition effect diagram is determined according to the vector and the decomposition degree parameter. For example, according to V1, V2, V3...Vn and the decomposition degree parameter, the display position of each sub-model in the decomposition effect diagram is determined respectively, that is, the relative distance between each second target point and the first target point is determined, and the display position of each sub-model in the decomposition effect diagram is further determined in combination with the above-mentioned vector direction.

[0061] In the embodiment of the present application, the display position of the sub-model in the decomposition rendering is accurately determined according to the vector and the decomposition degree parameter to achieve the explosion effect.

[0062] In one embodiment of the present application, determining the display position of the sub-model in the decomposition effect diagram according to the vector and the decomposition degree parameter includes:

[0063] Based on the vector and the decomposition degree parameter, the display position of the sub-model in the decomposition effect diagram is calculated according to the first formula; the first formula is:

[0064] p_new=p_old+c×V

[0065] Among them, p_new is the display position of the sub-model in the decomposition effect diagram, p_old is the display position of the sub-model in the previous frame image of the decomposition effect diagram, c is the decomposition degree parameter, and V is a vector.

[0066] In this embodiment, the display position of the sub-model may refer to any one of the coordinates of the center point of the bounding box of the sub-model, the coordinates of the center point of the barycenter, the coordinates of the middle point between the center point of the bounding box and the center point of the barycenter, and the coordinates of the vertices. The type of display position should be consistent in the decomposition effect diagram and its previous frame image, that is, if the display position is the coordinates of the center point of the bounding box in the previous frame image, then it should also be the coordinates of the center point of the bounding box in the decomposition effect diagram; if the display position is the coordinates of the center point of the barycenter in the previous frame image, then it should also be the coordinates of the center point of the barycenter in the decomposition effect diagram. According to the display position of the sub-model in the previous frame image, the decomposition degree parameter c and the vector V, the display position of the sub-model in the decomposition effect diagram is calculated. Through the above calculation method, the display positions p1_new, p2_new, p3_new...pn_new of each sub-model are obtained. By updating the display position of each sub-model, the rendering of the explosion effect is achieved.

[0067] In one embodiment, the first formula may also be:

[0068] p_new=p_old+c×d×V

[0069] Among them, p_new is the display position of the sub-model in the decomposition effect diagram, p_old is the display position of the sub-model in the previous frame image of the decomposition effect diagram, c is the decomposition degree parameter, d is the distance constant, and V is a vector.

[0070] In this embodiment, a distance constant d is obtained. The distance constant d is a positive number and can be used to indicate how fast the explosion effect changes when the decomposition degree parameter c is adjusted. For example, the larger the distance constant d is, the faster the explosion changes when the decomposition degree parameter c is adjusted from 0 to 1, so that the explosion degree of the final model is greater. The value of the distance constant d can be determined by the user based on the actual application experience of the proportional relationship between the virtual 3D model and the actual printed model, or it can be automatically recommended and set through historical application data.

[0071] In addition, 3D printing software is used to prepare model data before model printing, and finally needs to be output to the 3D printing device for printing. The display diagram of the 3D model in the 3D printing software has a proportional relationship with the actual printed model. The actual printed model has actual physical units, so the actual physical units also need to be considered in the decomposition effect diagram. The distance constant d can be a coefficient with physical units, and the physical units can be millimeters.

[0072] After obtaining the set distance constant d, the display position of the sub-model in the decomposition rendering is calculated according to the formula p_new=p_old+c×d×V.

[0073] In one embodiment of the present application, obtaining the decomposition degree parameter includes: obtaining a user's control operation on a UI display control, and generating the decomposition degree parameter according to the control operation.

[0074] In this embodiment, a UI display control is provided on the interactive screen of the computer device, and the UI display control may be a slidable slider, a slidable scroll bar, a rotatable wheel, an increase and decrease button, etc., for controlling the size of the decomposition degree parameter. The user can control the size of the decomposition degree parameter by operating the UI display control.

[0075] The adjustment data generated by the user's control operation on the UI display control is obtained to generate a decomposition degree parameter, and the display position of the sub-model is determined based on the decomposition degree parameter to control the explosion degree of the 3D model. Through the above method, it is convenient to flexibly adjust the size of the decomposition degree parameter, thereby adjusting the explosion degree to meet the needs of explosion display.

[0076] In an optional embodiment of the present application, the user can set the decomposition degree parameter by inputting the required value. For example, by inputting the value 0.3 in the decomposition degree parameter input field of the operation interface, the current decomposition degree parameter can be set to 0.3.

[0077] In one embodiment of the present application, the method further includes: displaying decomposition effect diagrams of different distances between the sub-model and the first target point according to adjustment of the decomposition degree parameter by the user based on the UI display control;

[0078] Among them, if the user's adjustment of the decomposition degree parameter includes adjusting the decomposition degree parameter from large to small, the distance alienation degree decreases from large to small; if the user's adjustment of the decomposition degree parameter includes adjusting the decomposition degree parameter from small to large, the distance alienation degree increases from small to large.

[0079] In this embodiment, the user can dynamically adjust the decomposition degree parameter based on the UI display control, thereby realizing the dynamic display of the decomposition effect diagram. Specifically, when the user adjusts the decomposition degree parameter from large to small, a multi-frame decomposition effect diagram is displayed in which the distance between the sub-model and the first target point is from large to small, that is, the explosion degree is from large to small; when the user adjusts the decomposition degree parameter from small to large, a multi-frame decomposition effect diagram is displayed in which the distance between the sub-model and the first target point is from small to large, that is, the explosion degree is from small to large.

[0080] When the user determines a suitable explosion degree based on the dynamic decomposition effect diagram, the user can stop operating the UI display control to realize the display of the final decomposition effect diagram.

[0081] Through the above method, the dynamic display of the decomposition effect diagram is realized, so that the user can select the decomposition effect diagram that he is satisfied with for display.

[0082] In one embodiment of the present application, obtaining the decomposition degree parameter includes: determining the decomposition degree parameter according to the stored historical decomposition degree parameter;

[0083] The method of determining the decomposition degree parameter includes: using the most frequently used historical decomposition degree parameter as the decomposition degree parameter, or using the average value of multiple historical decomposition degree parameters with a usage frequency greater than a preset threshold as the decomposition degree parameter.

[0084] In this embodiment, the degree of model explosion is difficult to control. By adjusting the decomposition degree parameter by the user to control the explosion effect, the best effect may not be achieved or the user may need to spend a certain amount of adjustment time. For this reason, in the embodiment of the present application, the decomposition degree parameter of this explosion display can also be determined by the historical decomposition degree parameter. For example, the historical decomposition degree parameter with the highest frequency of use can be used as the decomposition degree parameter of this explosion display; or multiple historical decomposition degree parameters with a frequency of use greater than a preset threshold can be determined from the historical decomposition degree parameters, and then the average value of these historical decomposition degree parameters is calculated as the decomposition degree parameter of this explosion display.

[0085] By determining the decomposition degree parameters of this explosion display in combination with the historical decomposition degree parameters, the explosion display can be realized according to more appropriate decomposition degree parameters, thereby improving the display effect.

[0086] In one embodiment of the present application, after generating the decomposition degree parameter according to the control operation, the method further includes: adjusting the decomposition degree parameter according to the stored historical decomposition degree parameter.

[0087] In this embodiment, the decomposition degree parameter set by the user based on the UI display control can be obtained, and then the decomposition degree parameter can be adjusted using the historical decomposition degree parameter. For example, the decomposition degree parameter set by the user is 0.3, and the most frequently used historical decomposition degree parameter is 0.6. 0.3 can be adaptively adjusted to 0.4 or 0.5 to obtain a more accurate decomposition degree parameter and achieve a better explosion effect.

[0088] The present application also provides a computer device, such as Figure 3As shown, the computer device 300 includes a processor 301 and a memory 302. The memory 302 stores programs or instructions that can be executed on the processor 301. When the program or instructions are executed by the processor 301, the various steps of the above-mentioned 3D model processing method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they are not repeated here.

[0089] The memory 302 can be used to store software programs and various data. The memory 302 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 302 may include a volatile memory or a non-volatile memory, or the memory 302 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 302 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.

[0090] The processor 301 may include one or more processing units; optionally, the processor 301 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 301.

[0091] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned 3D model processing embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0092] The present application also provides the following embodiments:

[0093] Reference numeral 1, a method for processing a 3D model, comprising:

[0094] Acquire coordinates of a first target point of a 3D model, and acquire coordinates of a second target point of a sub-model of the 3D model, wherein the 3D model includes at least two sub-models;

[0095] Determining a display position of the sub-model in the decomposition rendering according to the coordinates of the first target point and the coordinates of the second target point;

[0096] Displaying the decomposition effect diagram of the sub-model according to the display position;

[0097] In response to a coloring instruction for a target sub-model in the decomposition effect image, the target sub-model is colored.

[0098] Reference number 2, based on reference number 1, determining the display position of the sub-model in the decomposition effect diagram according to the coordinates of the first target point and the coordinates of the second target point includes:

[0099] Acquire a decomposition degree parameter, where the decomposition degree parameter is used to characterize the distance degree between the sub-model and the first target point in the decomposition effect diagram;

[0100] The display position of the sub-model in the decomposition rendering is determined according to the coordinates of the first target point, the coordinates of the second target point and the decomposition degree parameter.

[0101] Reference number 3, based on reference number 1 or 2, the step of acquiring the coordinates of a first target point of the 3D model and the step of acquiring the coordinates of a second target point of a sub-model of the 3D model include:

[0102] Calculating a bounding box of the 3D model according to the triangular mesh data of the 3D model, and using the coordinates of a center point of the bounding box of the 3D model as the coordinates of a first target point of the 3D model; and

[0103] The bounding box of the sub-model is calculated according to the triangle mesh data of the sub-model, and the coordinates of the center point of the bounding box of the sub-model are used as the coordinates of the second target point of the sub-model.

[0104] Reference number 4, based on reference number 1 or 2, the step of obtaining the coordinates of a first target point of the 3D model and the step of obtaining the coordinates of a second target point of a sub-model of the 3D model include:

[0105] The coordinates of the center of gravity of the 3D model are used as the coordinates of the first target point of the 3D model, and the coordinates of the center of gravity of the sub-model are used as the coordinates of the second target point of the sub-model.

[0106] Reference number 5, based on reference number 2, determining the display position of the sub-model in the decomposition effect diagram according to the coordinates of the first target point, the coordinates of the second target point and the decomposition degree parameter, includes:

[0107] Determine a vector pointing from the first target point to the second target point according to the coordinates of the first target point and the coordinates of the second target point;

[0108] The display position of the sub-model in the decomposition rendering is determined according to the vector and the decomposition degree parameter.

[0109] Reference number 6, based on reference number 5, determining the display position of the sub-model in the decomposition effect diagram according to the vector and the decomposition degree parameter, includes:

[0110] Based on the vector and the decomposition degree parameter, the display position of the sub-model in the decomposition effect diagram is calculated according to a first formula; the first formula is:

[0111] p_new=p_old+c×V

[0112] Among them, p_new is the display position of the sub-model in the decomposition effect diagram, p_old is the display position of the sub-model in the previous frame image of the decomposition effect diagram, c is the decomposition degree parameter, and V is the vector.

[0113] Label 7, based on label 2, the numerical range of the decomposition degree parameter is 0 to 1.

[0114] Reference number 8, based on reference number 2, the step of obtaining the decomposition degree parameter includes:

[0115] Get the user's control operation on the UI display controls;

[0116] The resolution degree parameter is generated according to the control operation.

[0117] Reference number 9, based on reference number 8, the method further includes:

[0118] According to the adjustment of the decomposition degree parameter by the user based on the UI display control, a decomposition effect diagram of different distances between the sub-model and the first target point is displayed;

[0119] Among them, if the user's adjustment of the decomposition degree parameter includes adjusting the decomposition degree parameter from large to small, then the distance alienation degree is from large to small; if the user's adjustment of the decomposition degree parameter includes adjusting the decomposition degree parameter from small to large, then the distance alienation degree is from small to large.

[0120] Reference numeral 10, based on reference numeral 8, after generating the decomposition degree parameter according to the control operation, the method further includes:

[0121] The decomposition degree parameter is adjusted according to the stored historical decomposition degree parameter.

[0122] Reference number 11, based on reference number 2, the step of obtaining the decomposition degree parameter includes:

[0123] Determining the decomposition degree parameter according to the stored historical decomposition degree parameter;

[0124] The method of determining the decomposition degree parameter includes: using the most frequently used historical decomposition degree parameter as the decomposition degree parameter, or using the average value of multiple historical decomposition degree parameters with a usage frequency greater than a preset threshold as the decomposition degree parameter.

[0125] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0126] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A 3D model processing method, characterized in that: include: Acquire coordinates of a first target point of a 3D model, and acquire coordinates of a second target point of a sub-model of the 3D model, wherein the 3D model includes at least two sub-models; Determining a display position of the sub-model in the decomposition rendering according to the coordinates of the first target point and the coordinates of the second target point; Displaying the decomposition effect diagram of the sub-model according to the display position; In response to a coloring instruction for a target sub-model in the decomposition rendering, the target sub-model is colored.

2. The method according to claim 1, characterized in that The step of determining the display position of the sub-model in the decomposition effect diagram according to the coordinates of the first target point and the coordinates of the second target point includes: Acquire a decomposition degree parameter, where the decomposition degree parameter is used to characterize the distance degree between the sub-model and the first target point in the decomposition effect diagram; The display position of the sub-model in the decomposition rendering is determined according to the coordinates of the first target point, the coordinates of the second target point and the decomposition degree parameter.

3. The method according to claim 1 or 2, characterized in that: The step of acquiring the coordinates of a first target point of the 3D model and acquiring the coordinates of a second target point of a sub-model of the 3D model includes: Calculating a bounding box of the 3D model according to the triangular mesh data of the 3D model, and using the coordinates of a center point of the bounding box of the 3D model as the coordinates of a first target point of the 3D model; and The bounding box of the sub-model is calculated according to the triangle mesh data of the sub-model, and the coordinates of the center point of the bounding box of the sub-model are used as the coordinates of the second target point of the sub-model.

4. The method according to claim 1 or 2, characterized in that: The step of acquiring the coordinates of a first target point of the 3D model and acquiring the coordinates of a second target point of a sub-model of the 3D model includes: The coordinates of the center of gravity of the 3D model are used as the coordinates of the first target point of the 3D model, and the coordinates of the center of gravity of the sub-model are used as the coordinates of the second target point of the sub-model.

5. The method according to claim 2, characterized in that: The step of determining the display position of the sub-model in the decomposition effect diagram according to the coordinates of the first target point, the coordinates of the second target point, and the decomposition degree parameter includes: Determine a vector pointing from the first target point to the second target point according to the coordinates of the first target point and the coordinates of the second target point; Determining a display position of the sub-model in the decomposition rendering according to the vector and the decomposition degree parameter; The step of determining the display position of the sub-model in the decomposition effect diagram according to the vector and the decomposition degree parameter includes: Based on the vector and the decomposition degree parameter, the display position of the sub-model in the decomposition effect diagram is calculated according to a first formula; the first formula is: p_new=p_old+c×V Among them, p_new is the display position of the sub-model in the decomposition effect diagram, p_old is the display position of the sub-model in the previous frame image of the decomposition effect diagram, c is the decomposition degree parameter, and V is the vector.

6. The method according to claim 2, characterized in that The numerical range of the decomposition degree parameter is from 0 to 1; The step of obtaining the decomposition degree parameter comprises: Get the user's control operation on the UI display controls; The resolution degree parameter is generated according to the control operation.

7. The method according to claim 6, characterized in that The method further comprises: According to the adjustment of the decomposition degree parameter by the user based on the UI display control, a decomposition effect diagram of different distances between the sub-model and the first target point is displayed; Wherein, if the user's adjustment of the decomposition degree parameter includes adjusting the decomposition degree parameter from large to small, the distance alienation degree is from large to small; if the user's adjustment of the decomposition degree parameter includes adjusting the decomposition degree parameter from small to large, the distance alienation degree is from small to large; After generating the decomposition degree parameter according to the control operation, the method further includes: The decomposition degree parameter is adjusted according to the stored historical decomposition degree parameter.

8. The method according to claim 2, characterized in that: The step of obtaining the decomposition degree parameter comprises: Determining the decomposition degree parameter according to the stored historical decomposition degree parameter; The method of determining the decomposition degree parameter includes: using the most frequently used historical decomposition degree parameter as the decomposition degree parameter, or using the average value of multiple historical decomposition degree parameters with a usage frequency greater than a preset threshold as the decomposition degree parameter.

9. A computer device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a program or instruction running on the processor, and when the program or instruction is executed by the processor, the steps of the 3D model processing method according to any one of claims 1 to 8 are implemented.

10. A readable storage medium having a program or instruction stored thereon, characterized in that: When the program or instruction is executed by a processor, the steps of the 3D model processing method according to any one of claims 1 to 8 are implemented.