Dynamic calculation method and device of model, electronic equipment and computer program product

By splitting the tree model into trunks, branches and leaves, and using rigid body dynamics for solving, the problems of unstable and difficult to control the dynamic effects of trees in the prior art are solved, and a more efficient and controllable dynamic effects of trees are achieved.

CN119540417APending Publication Date: 2025-02-28NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411640724.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-15
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

The prior art is difficult to achieve stable and natural tree dynamic effects, especially in the case of complex models, and the solution process is time-consuming and laborious and cannot be precisely controlled.

Method used

Split the tree model into trunk, branches and leaves parts, divide the trunk and branches into multiple model fragments and add constraint points. Use rigid body dynamics to solve the problem, and bind the leaves to the branches to achieve dynamic motion.

Benefits of technology

Through this method, the dynamic effects of trees can be achieved more efficiently, controllably and accurately, reducing costs, and achieving more natural dynamic performance of tree models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119540417A_ABST
    Figure CN119540417A_ABST
Patent Text Reader

Abstract

The invention relates to a dynamic calculation method and device of a model, electronic equipment and a computer program product, and belongs to the technical field of computers. The method comprises the following steps: splitting a tree model into a trunk part, a branch part and a leaf part; dividing the trunk part and the branch part into a plurality of model fragments, and adding a corresponding constraint point for each model fragment; the model fragments and the constraint points corresponding to the model fragments are introduced into rigid body dynamics for calculation, and dynamic calculation results of the trunk part and the branch part are obtained; and after the dynamic calculation results of the trunk part and the branch part are obtained, binding the leaf part and the branch part, so that the leaf part moves along with the branch part. According to the invention, a better dynamic effect of the tree model can be realized with lower cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a model dynamic solution method, a model dynamic solution device, an electronic device and a computer program product. Background Art

[0002] In the production of film and television works or CG (Computer Graphics) videos, dynamic resolution of trees in the scene is often encountered, such as tree swaying caused by wind, rain, characters or objects hitting trees, etc.

[0003] The current tree model solving method is difficult to achieve stable and natural tree dynamic effects, and when encountering more complex tree models, the solving process is time-consuming and labor-intensive, and precise control cannot be achieved.

[0004] In view of this, there is an urgent need in the art for a dynamic solution method of a model that can achieve better dynamic effects of tree models at a lower cost.

[0005] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0006] The purpose of the present disclosure is to provide a model dynamic solution method, a model dynamic solution device, an electronic device and a computer program product, thereby at least to a certain extent being able to achieve a better dynamic effect of a tree model at a lower cost.

[0007] According to a first aspect of the present disclosure, a dynamic solution method for a model is provided, comprising:

[0008] Split the tree model into trunk, branch and leaf parts;

[0009] Splitting the trunk part and the branch part into a plurality of model fragments, and adding a corresponding constraint point to each of the model fragments;

[0010] The model fragments and the constraint points corresponding to the model fragments are introduced into rigid body dynamics for solving, so as to obtain dynamic solution results of the trunk part and the branch part;

[0011] After obtaining the dynamic solution results of the trunk part and the branch part, the leaf part is bound to the branch part so that the leaf part moves along with the branch part.

[0012] According to a second aspect of the present disclosure, there is provided a dynamic solution device for a model, comprising:

[0013] A tree model splitting module is used to split the tree model into a trunk part, a branch part and a leaf part;

[0014] A model fragment segmentation module, used to segment the trunk part and the branch part into a plurality of model fragments, and add corresponding constraint points to each of the model fragments;

[0015] A model dynamic solution module, used for introducing the model fragments and the constraint points corresponding to the model fragments into rigid body dynamics for solution, and obtaining dynamic solution results of the trunk part and the branch part;

[0016] The leaf part binding module is used to bind the leaf part to the branch part after obtaining the dynamic solution results of the trunk part and the branch part, so that the leaf part moves with the branch part.

[0017] According to a third aspect of the present disclosure, there is provided an electronic device, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the dynamic solution method of the model described in any one of the above by executing the executable instructions.

[0018] According to a fourth aspect of the present disclosure, there is provided a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method for dynamically solving the model described in any one of the above is implemented.

[0019] The exemplary embodiments of the present disclosure may have the following beneficial effects:

[0020] In the dynamic solution method of the model in the example implementation of the present disclosure, the tree model is divided into trunk, branch and leaf parts based on the characteristics of different parts of the tree, and then the rigid body dynamics solution method is used to solve the dynamics of the tree by giving different constraint strengths to different parts of the tree, so that the trunk drives the branches, and the branches drive the leaves, so that the dynamics of the tree model can better achieve the form desired by the user. The dynamic solution method of the model in the example implementation of the present disclosure uses a rigid body dynamics driven method to achieve tree blowing effects and some special dynamic effects more efficiently, more controllably and more accurately, and can achieve the production of better dynamic effects of tree models at a lower cost.

[0021] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.

[0023] Figure 1 A schematic diagram of tree dynamics solution in accordance with a related embodiment of the present disclosure is schematically shown;

[0024] Figure 2 A schematic diagram of a linear dynamics solution in another related embodiment of the present disclosure is schematically shown;

[0025] Figure 3 A schematic diagram schematically shows the pulling deformation between models according to a related embodiment of the present disclosure;

[0026] Figure 4 A schematic flow chart showing a method for dynamically solving a model according to an exemplary embodiment of the present disclosure is shown;

[0027] Figure 5 A schematic diagram showing the process of tree model splitting according to an exemplary embodiment of the present disclosure;

[0028] Figure 6 A schematic diagram showing a process of splitting a tree model according to component sizes according to an exemplary embodiment of the present disclosure;

[0029] Figure 7 A schematic diagram of tree model splitting according to a specific embodiment of the present disclosure is schematically shown;

[0030] Figure 8 Schematically showing a schematic diagram of crushing a trunk and branches according to a specific embodiment of the present disclosure;

[0031] Fig. 9 A schematic diagram of adding constraint points to each fragment according to a specific implementation of the present disclosure is schematically shown;

[0032] Fig.10 A schematic diagram of a tree root portion according to a specific embodiment of the present disclosure is schematically shown;

[0033] Fig.11 A schematic diagram schematically shows a solution result after adding a wind field blowing toward the Z axis according to a specific embodiment of the present disclosure;

[0034] Fig.12A schematic diagram showing a flow chart of controlling the movement of a leaf portion according to an exemplary embodiment of the present disclosure;

[0035] Fig.13 A schematic diagram of binding leaves to tree branches according to a specific embodiment of the present disclosure is schematically shown;

[0036] Fig.14 A schematic diagram of converting a leaf model into a line model according to a specific embodiment of the present disclosure is schematically shown;

[0037] Fig.15 A schematic diagram schematically shows a leaf part solution according to a specific embodiment of the present disclosure;

[0038] Fig.16 A schematic diagram of tree model splitting under conventional effects according to a specific embodiment of the present disclosure is schematically shown;

[0039] Fig.17 A schematic diagram schematically shows the results of solving the trunk and branch parts under the conventional effect according to a specific embodiment of the present disclosure;

[0040] Fig.18 A schematic diagram schematically shows the overall solution result of the tree model under the conventional effect according to a specific embodiment of the present disclosure;

[0041] Fig.19 A schematic diagram schematically shows a tree collision effect under a special effect according to a specific embodiment of the present disclosure;

[0042] Fig. 20 A schematic diagram schematically shows the effect of rain hitting trees under a special effect according to a specific embodiment of the present disclosure;

[0043] Fig.21 A block diagram showing a dynamic solution device of a model according to an exemplary embodiment of the present disclosure;

[0044] Fig. 22 A schematic diagram of the structure of a computer system suitable for implementing the electronic device of the embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0045] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.

[0046] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.

[0047] In some related embodiments, the tree can be rigged with bones in Maya (modeling software) or Max (modeling software), a controller can be added, and then dynamics can be solved. Figure 1 However, this method is rather cumbersome. When encountering a more complex model, it takes a lot of time to bind, which is very time-consuming and labor-intensive. At the same time, this method cannot achieve more precise control. For example, when the leaves of a palm tree are blowing, the dynamics of the leaves themselves are difficult to control. For example, when it rains, the interaction between raindrops and leaves, etc., it is relatively difficult to achieve better dynamic effects using the above method.

[0048] In other related embodiments, branches can be extracted in Houdini (a three-dimensional computer graphics software, an effective tool for creating advanced visual effects and programmatic generation) and then converted into lines, which can be implemented by solving line dynamics, such as Figure 2As shown. Although this method can easily achieve special effects, the problem with linear dynamics is that when the force field is relatively large, due to the soft characteristics of the line segment, it is easy to have problems such as over-stretching, twisting, and deformation. The final solved linear dynamics is driven by the pointdeform node to drive the original model movement. The transformation of point deformation is relatively unstable. When the model is too complex and the distance between points is very close, there is no way to accurately capture nearby points, resulting in Figure 3 The pulling deformation between the models shown.

[0049] Based on the above problems, this example implementation first provides a dynamic solution method for a model. Figure 4 As shown, the dynamic solution method of the above model may include the following steps:

[0050] Step S410: Split the tree model into a trunk part, a branch part and a leaf part.

[0051] Step S420: Divide the trunk and branch parts into multiple model fragments, and add corresponding constraint points to each model fragment.

[0052] Step S430: Introduce the model fragments and the constraint points corresponding to the model fragments into rigid body dynamics for solving, and obtain dynamic solution results of the trunk part and the branch part.

[0053] Step S440. After obtaining the dynamic solution results of the trunk part and the branch part, the leaf part is bound to the branch part so that the leaf part moves with the branch part.

[0054] In the dynamic solution method of the model in the example implementation of the present disclosure, the tree model is divided into trunk, branch and leaf parts based on the characteristics of different parts of the tree, and then the rigid body dynamics solution method is used to solve the dynamics of the tree by giving different constraint strengths to different parts of the tree, so that the trunk drives the branches, and the branches drive the leaves, so that the dynamics of the tree model can better achieve the form desired by the user. The dynamic solution method of the model in the example implementation of the present disclosure uses a rigid body dynamics driven method to achieve tree blowing effects and some special dynamic effects more efficiently, more controllably and more accurately, and can achieve the production of better dynamic effects of tree models at a lower cost.

[0055] The dynamic solution method of the model in the exemplary embodiment of the present disclosure can save a lot of binding time compared to the method using bone binding, and can achieve more precise control than the bone binding solution in terms of effect. In addition, compared with the linear dynamics solution method, the effect will be more stable and controllable.

[0056] Next, combine Figures 5 to 20The above steps of this exemplary embodiment are described in more detail.

[0057] In step S410, the tree model is split into a trunk part, a branch part and a leaf part.

[0058] In this example implementation, the tree model can be divided into a trunk part, a branch part and a leaf part according to the characteristics of each part of the tree model. Specifically, the trunk, branch and leaf parts can be calculated according to the volume of each part in the tree model.

[0059] In this example implementation, Figure 5 As shown in the figure, the tree model is divided into the trunk part, the branch part and the leaf part, which can be specifically divided into the following steps:

[0060] Step S510. Provide a bounding box for each model component in the tree model, and determine the component size of the model component according to the size of the bounding box.

[0061] Step S520: Divide the model components in the tree model into a trunk part, a branch part and a leaf part according to the component sizes.

[0062] In this example implementation, each model component in the tree model is traversed, a bounding box is wrapped around each component, and a rough value is calculated as the component size of the model component according to the size of the boundaries of each part of the tree. Specifically, the component size of the model component can be obtained according to the sum of the length, width, and height of the bounding box, and then the tree is divided into three parts: trunk, branches, and leaves according to the component size.

[0063] In this example implementation, Figure 6 As shown, the model components in the tree model are divided into a trunk part, a branch part and a leaf part according to the size of the components, which can specifically include the following steps:

[0064] Step S610: Acquire the maximum and minimum values ​​of the component sizes, and map the component sizes of all model components into a preset range according to the maximum and minimum values ​​of the component sizes.

[0065] For the component sizes of all model components in the tree model, the maximum and minimum values ​​are obtained, and these values ​​are mapped to a preset interval according to the maximum and minimum values ​​of the component sizes, for example, they can be mapped to an interval of 0 to 1.

[0066] Step S620: Divide the model components in the tree model into a trunk part, a branch part and a leaf part according to the mapping value of the component size within the preset interval and the corresponding preset size threshold within the preset interval.

[0067] The mapping value of each component size within the preset interval is compared with the preset size threshold to obtain the leaf part and the trunk and branch part. For example, assuming the preset interval is 0 to 1, the components with a mapping value of the component size within the preset interval less than 0.3 can be classified as the leaf part.

[0068] After dividing the model parts in the tree model into the trunk part, the branch part and the leaf part, the branch part can be divided more finely.

[0069] In this example implementation, for the model component of the branch part, the model component can also be divided into a first branch part and a second branch part according to the cross-sectional area of ​​the model component; wherein the cross-sectional area of ​​the model component of the first branch part is greater than or equal to the cross-sectional threshold, and the cross-sectional area of ​​the model component of the second branch part is less than the cross-sectional threshold.

[0070] For the branches, they can be divided into two types: large branches and small branches. In the process of division, since the size of large branches and small branches is not much different, the obtained data may be inaccurate. Therefore, the size can be judged more finely according to the thickness of the model components themselves. For example, the size of the cross section of the branch can be calculated, and the size of the branch can be judged by the thickness of the branch.

[0071] Figure 7 A schematic diagram of tree model splitting according to a specific embodiment of the present disclosure is schematically shown. Figure 7 The tree model on the left can be divided into the trunk part, large branch part, small branch part and leaf part on the right.

[0072] Continue to refer Figure 4 As shown, in step S420, the trunk part and the branch part are divided into a plurality of model fragments, and corresponding constraint points are added to each model fragment.

[0073] In this example implementation, all models can be wrapped into a whole, and then scattered for fragmentation. The purpose of wrapping the shape is to make the parts involved in the solution become a whole rather than separate parts, which is convenient for fragmentation and solution.

[0074] Figure 8 The schematic diagram of the crushing process of the trunk and branches according to a specific embodiment of the present disclosure is schematically shown. If a softer blowing result is required, the tree model can be crushed into smaller pieces, and if the calculation time needs to be reduced, the tree model can be crushed into larger model pieces.

[0075] Fig. 9The schematic diagram of adding constraint points to each fragment in a specific embodiment of the present disclosure is schematically shown. After the trunk and branches are broken into model fragments, constraint points are added to each model fragment to constrain them together to ensure that the branches remain a whole during the solution and will not break into fragments.

[0076] In step S430, the model fragments and the constraint points corresponding to the model fragments are introduced into rigid body dynamics for solving, and the dynamic solution results of the trunk part and the branch part are obtained.

[0077] In this example implementation, the model fragments and the constraint points corresponding to the model fragments can be introduced into a calculation engine based on rigid body dynamics to calculate the motion law of the rigid body under the action of external forces. Before entering the rigid body dynamics, the root part of the tree model can be determined from the trunk part, and the root part can be controlled not to participate in the solution process in the rigid body dynamics.

[0078] Fig.10 The schematic diagram of the root part of a tree in a specific embodiment of the present disclosure is schematically shown. Since the root of a tree is immobile, it is necessary to determine this part as a part that is not affected by the force field. Specifically, a containment body can be provided to the root part of the tree so that it will not be affected by the force field therein after entering the rigid body dynamics.

[0079] Next, all model fragments and corresponding constraint points are introduced into rigid body dynamics, and then influence fields are added to the dynamics. For example, resistance fields, wind fields, disturbance fields, interaction fields, custom force fields, or object collisions can be added to the dynamics to solve the dynamics. Some special force fields can also be added separately to control the dynamics of branches, which is not specifically limited in this example implementation.

[0080] Fig.11 The schematic diagram schematically shows the solution result after adding the wind field blowing toward the Z axis according to a specific embodiment of the present disclosure. It can be seen that, in addition to the root, the branches and trunk are affected by the wind field to produce dynamic effects.

[0081] In step S440, after the dynamic solution results of the trunk part and the branch part are obtained, the leaf part is bound to the branch part so that the leaf part moves with the branch part.

[0082] In this example implementation, the branches and trunk are extracted and introduced into rigid body dynamics, the dynamics of the branches and trunk are solved, and then the leaves are bound to the branches so that they move with the branches.

[0083] For some special trees, such as palm trees, the leaves are relatively slender. If they are driven entirely by the dynamics of the branches, they may be relatively stiff. Users also need the leaves themselves to have some natural dynamics. Therefore, you can also process the dynamic requirements of the leaves separately and add dynamic effects to the leaves separately.

[0084] In this example implementation, Fig.12 As shown, the leaf part is bound to the branch part so that the leaf part moves along with the branch part. Specifically, the following steps may be included:

[0085] Step S1210: Obtain the connection points between the model component of the leaf part and the branch part, and constrain the connection points on the model component of the branch part.

[0086] Use the attribute transfer method to select the points where leaves and branches meet, constrain them to dynamic branches, and let the roots of the leaves swing with the branches.

[0087] Fig.13 A schematic diagram of binding leaves to branches according to a specific embodiment of the present disclosure is schematically shown, wherein the black part is constrained to the branch and the white part is affected by the hair dynamics.

[0088] Step S1220: Convert the model components of the leaf part into a line model, and obtain the force field properties of the line model according to the force field properties of the branch part.

[0089] Fig.14 The schematic diagram of converting a leaf model into a line model in a specific embodiment of the present disclosure is schematically shown. The leaf model is converted into a line model, the force field properties of the branches are transferred to these line models, and a disturbed wind field is separately set.

[0090] Step S1230: Introduce the wire model into the hair dynamics, perform a solution based on the force field properties of the wire model, and obtain a dynamic solution result of the leaf part.

[0091] After setting the required force field properties on the wire model, introduce the wire model into the hair dynamics for solving. After setting the basic properties such as constraint points, hair hardness, curvature, etc., you can start solving.

[0092] After the leaves are solved in the hair dynamics, the wire model can be used to drive the leaves by controlling the orientation through the matrix, and finally make the leaves swing.

[0093] Fig.15The schematic diagram of the leaf part solution in a specific embodiment of the present disclosure is schematically shown. It can be seen that the leaf part obtains a more natural effect after being solved separately.

[0094] In this exemplary implementation, a breaking angle threshold of the branch part may also be set. When the bending angle of the branch part reaches the breaking angle threshold, the branch part is controlled to achieve a breaking effect.

[0095] During the dynamics solution, you can also set the branch break data. For example, when simulating a strong wind scene, some branches can be broken after reaching a certain bending angle, and then blown away by the wind. Here you can set a break value to meet this requirement.

[0096] In this example implementation, if the branch part is further divided, the model fragments in the trunk part and the first branch part, and the constraint points corresponding to the model fragments can be introduced into rigid body dynamics for solution to obtain dynamic solution results of the trunk part and the first branch part.

[0097] After obtaining the dynamic solution results of the trunk part and the first branch part, the leaf part and the second branch part can be bound to the first branch part, so that the leaf part and the second branch part move with the first branch part.

[0098] The solved large branches are constrained with the small branches and leaves that are not involved in the solution, so that the dynamic large branches can drive the small branches and leaves to move together. The specific steps are similar to the above method and will not be repeated here.

[0099] Fig.16 A schematic diagram of tree model splitting under conventional effects in a specific embodiment of the present disclosure is schematically shown, where the tree model is split into leaf parts and trunk and branch parts, wherein the trunk and branch parts will participate in rigid body dynamics solution.

[0100] Fig.17 A schematic diagram of the solution results of the trunk and branch parts under the conventional effect in a specific embodiment of the present disclosure is schematically shown. After the trunk and branch parts are solved by rigid body dynamics, a dynamic effect is obtained.

[0101] Fig.18 The schematic diagram of the overall solution result of the tree model under the conventional effect according to a specific embodiment of the present disclosure is schematically shown. After the trunk and branches are solved, the leaves are bound to follow the movement.

[0102] Fig.19A schematic diagram of a tree collision effect under a special effect according to a specific embodiment of the present disclosure is schematically shown. When a tree is collided with an object, a dynamic collision effect can be generated.

[0103] Fig. 20 A schematic diagram of the effect of rain hitting trees under a special effect according to a specific embodiment of the present disclosure is schematically shown. When the trees are hit by raindrops, a dynamic hitting effect can be generated.

[0104] It should be noted that although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.

[0105] Furthermore, the present disclosure also provides a dynamic solution device for the model. Fig.21 As shown, the dynamic solution device of the model may include a tree model splitting module 2110, a model fragment segmentation module 2120, a model dynamic solution module 2130 and a leaf part binding module 2140. Among them:

[0106] The tree model splitting module 2110 may be used to split the tree model into a trunk portion, a branch portion, and a leaf portion;

[0107] The model fragment segmentation module 2120 may be used to segment the trunk part and the branch part into a plurality of model fragments, and add corresponding constraint points to each model fragment;

[0108] The model dynamic solution module 2130 can be used to introduce the model fragments and the constraint points corresponding to the model fragments into rigid body dynamics for solution, and obtain the dynamic solution results of the trunk and branch parts;

[0109] The leaf part binding module 2140 can be used to bind the leaf part to the branch part after obtaining the dynamic solution results of the trunk part and the branch part, so that the leaf part moves with the branch part.

[0110] In some exemplary embodiments of the present disclosure, the tree model splitting module 2110 may include a bounding box generation unit and a model component division unit.

[0111] The bounding box generation unit may be used to provide a bounding box for each model component in the tree model, and determine a component size of the model component according to a size of the bounding box;

[0112] The model component division unit may be used to divide the model components in the tree model into a trunk part, a branch part and a leaf part according to the component sizes.

[0113] In some exemplary embodiments of the present disclosure, the bounding box generating unit may include a component size calculating unit, which may be configured to obtain the component size of the model component according to the sum of the length, width, and height of the bounding box.

[0114] In some exemplary embodiments of the present disclosure, the model component division unit may include a component size mapping unit and a size threshold division unit.

[0115] The component size mapping unit can be used to obtain the maximum value and the minimum value of the component size, and map the component sizes of all model components to a preset range according to the maximum value and the minimum value of the component size;

[0116] The size threshold division unit can be used to divide the model components in the tree model into a trunk part, a branch part and a leaf part according to the mapping value of the component size within a preset interval and the corresponding preset size threshold within the preset interval.

[0117] In some exemplary embodiments of the present disclosure, the model dynamic solution module 2130 may also include a root part separation unit, which can be used to determine the root part from the trunk part of the tree model and control the root part not to participate in the solution process in rigid body dynamics.

[0118] In some exemplary embodiments of the present disclosure, the leaf part binding module 2140 may include a contact point constraint unit, a force field attribute determination unit, and a leaf part solving unit.

[0119] The connection point constraint unit can be used to obtain the connection points between the model component of the leaf part and the branch part, and constrain the connection points on the model component of the branch part;

[0120] The force field property determination unit may be used to convert the model components of the leaf part into a line model, and obtain the force field properties of the line model according to the force field properties of the branch part;

[0121] The leaf part solving unit can be used to introduce the wire model into the hair dynamics, and solve it according to the force field properties of the wire model to obtain the dynamic solution result of the leaf part.

[0122] In some exemplary embodiments of the present disclosure, the tree model splitting module 2110 may also include a branch part splitting unit, which can be used to divide the model component of the branch part into a first branch part and a second branch part according to the cross-sectional area of ​​the model component; wherein the cross-sectional area of ​​the model component of the first branch part is greater than or equal to the cross-sectional threshold, and the cross-sectional area of ​​the model component of the second branch part is less than the cross-sectional threshold.

[0123] In some exemplary embodiments of the present disclosure, the model dynamic solution module 2130 may also include a first branch part solution unit, which can be used to introduce the model fragments in the trunk part and the first branch part, and the constraint points corresponding to the model fragments into rigid body dynamics for solution, so as to obtain dynamic solution results of the trunk part and the first branch part.

[0124] In some exemplary embodiments of the present disclosure, the leaf part binding module 2140 may also include a second branch part binding unit, which can be used to bind the leaf part and the second branch part to the first branch part so that the leaf part and the second branch part follow the movement of the first branch part.

[0125] In some exemplary embodiments of the present disclosure, a dynamic solution device of a model provided by the present disclosure may further include a fracture effect realization module, and the fracture effect realization module may include a fracture angle threshold determination unit and a fracture angle threshold judgment unit.

[0126] The breaking angle threshold determination unit may be used to set a breaking angle threshold of the branch portion;

[0127] The breaking angle threshold judgment unit can be used to control the branch part to achieve a breaking effect when the bending angle of the branch part reaches the breaking angle threshold.

[0128] The specific details of each module / unit in the dynamic solution device of the above model have been described in detail in the corresponding method implementation example part and will not be repeated here.

[0129] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the exemplary embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.

[0130] Fig. 22 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present disclosure is shown.

[0131] It should be noted that Fig. 22 The computer system 2200 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0132] like Fig. 22 As shown, the computer system 2200 includes a central processing unit (CPU) 2201, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 2202 or the program loaded from the storage part 2208 to the random access memory (RAM) 2203. In the RAM 2203, various programs and data required for system operation are also stored. The CPU 2201, the ROM 2202, and the RAM 2203 are connected to each other through a bus 2204. An input / output (I / O) interface 2205 is also connected to the bus 2204.

[0133] The following components are connected to the I / O interface 2205: an input section 2206 including a keyboard, a mouse, etc.; an output section 2207 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 2208 including a hard disk, etc.; and a communication section 2209 including a network interface card such as a LAN card, a modem, etc. The communication section 2209 performs communication processing via a network such as the Internet. A drive 2210 is also connected to the I / O interface 2205 as needed. A removable medium 2211, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 2210 as needed, so that a computer program read therefrom is installed into the storage section 2208 as needed.

[0134] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication section 2209, and / or installed from a removable medium 2211. When the computer program is executed by a central processing unit (CPU) 2201, various functions defined in the system of the present disclosure are executed.

[0135] The exemplary embodiments of the present disclosure also provide a computer program product, which includes a computer program, and when the computer program is executed by a processor, the dynamic solution method of the above model is implemented.

[0136] In one embodiment, the computer program product may be a tangible product containing a computer program, such as a computer-readable storage medium storing a computer program. The readable storage medium may be a storage medium based on electrical, magnetic, optical, electromagnetic, infrared, or other signals, including but not limited to: random access memory (RAM), read-only memory (ROM), magnetic tape, floppy disk, flash memory (Flash), mechanical hard disk (HDD), solid-state drive (SSD), and the like. Exemplarily, the computer program product may be implemented as a non-volatile storage medium storing a computer program, such as a read-only memory, a NAND flash memory, and the like.

[0137] In one embodiment, the computer program product may be an intangible product including a computer program. Exemplarily, the computer program product may be implemented as a virtual digital product, such as a digital file storing an executable file, an installation package, etc. of the computer program.

[0138] The code of the computer program can be written in one or more programming languages. Programming languages ​​such as C language, Java, C++, etc. The program code can be executed entirely on the user computing device, or partially on the user computing device, or as a separate software package, or partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, such as a local area network (LAN), a wide area network (WAN), etc., or can be connected to an external computing device (e.g., an Internet connection provided by an operator).

[0139] The computer program may be carried or transmitted via electrical, magnetic, optical, electromagnetic, infrared, or other signals. The electronic device may convert the signal carrying the computer program into a digital signal, thereby running the computer program. When the computer program is run on an electronic device, its code is used to enable the electronic device to execute (more specifically, the processor of the electronic device may execute) the method steps of various exemplary embodiments of the present disclosure, such as the dynamic solution method of the above-mentioned model.

[0140] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0141] It should be noted that, although several modules of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules described above can be concretized in one module. Conversely, the features and functions of one module described above can be further divided into multiple modules to be concretized.

[0142] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure.

[0143] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A dynamic solution method for a model, characterized in that: include: Split the tree model into trunk, branch and leaf parts; Splitting the trunk part and the branch part into a plurality of model fragments, and adding a corresponding constraint point to each of the model fragments; The model fragments and the constraint points corresponding to the model fragments are introduced into rigid body dynamics for solving, so as to obtain dynamic solution results of the trunk part and the branch part; After obtaining the dynamic solution results of the trunk part and the branch part, the leaf part is bound to the branch part so that the leaf part moves along with the branch part.

2. The dynamic solution method of the model according to claim 1, characterized in that: The tree model is split into a trunk part, a branch part and a leaf part, including: providing a bounding box for each model component in the tree model, and determining a component size of the model component based on a size of the bounding box; The model components in the tree model are divided into a trunk part, a branch part and a leaf part according to the component sizes.

3. The dynamic solution method of the model according to claim 2, characterized in that: Determining the size of the model component according to the size of the bounding box includes: The component size of the model component is obtained according to the sum of the length, width and height of the bounding box.

4. The dynamic solution method of the model according to claim 2, characterized in that: The step of dividing the model components in the tree model into a trunk part, a branch part and a leaf part according to the component sizes comprises: Acquire the maximum value and the minimum value of the component size, and map the component sizes of all the model components into a preset interval according to the maximum value and the minimum value of the component size; According to the mapping value of the component size within the preset interval and the corresponding preset size threshold within the preset interval, the model components in the tree model are divided into a trunk part, a branch part and a leaf part.

5. The dynamic solution method of the model according to claim 1, characterized in that: The method further comprises: A root portion is determined from the trunk portion of the tree model, and the root portion is controlled not to participate in the solving process of the rigid body dynamics.

6. The dynamic solution method of the model according to claim 1, characterized in that: The step of binding the leaf part to the branch part so that the leaf part follows the movement of the branch part comprises: Obtaining the connection points between the model component of the leaf part and the branch part, and constraining the connection points on the model component of the branch part; Converting the model components of the leaf part into a line model, and obtaining the force field properties of the line model according to the force field properties of the branch part; The wire model is introduced into the hair dynamics, and the solution is performed according to the force field properties of the wire model to obtain the dynamic solution result of the leaf part.

7. The dynamic solution method of the model according to claim 2, characterized in that: The method further comprises: For the model component of the branch part, the model component is divided into a first branch part and a second branch part according to the cross-sectional area of ​​the model component; wherein the cross-sectional area of ​​the model component of the first branch part is greater than or equal to a cross-sectional threshold, and the cross-sectional area of ​​the model component of the second branch part is less than the cross-sectional threshold.

8. The dynamic solution method of the model according to claim 7, characterized in that: The model fragments and the constraint points corresponding to the model fragments are introduced into rigid body dynamics for solving, and the dynamic solution results of the trunk part and the branch part are obtained, including: The model fragments in the trunk part and the first branch part, and the constraint points corresponding to the model fragments are introduced into rigid body dynamics for solving, so as to obtain dynamic solution results of the trunk part and the first branch part.

9. The dynamic solution method of the model according to claim 8, characterized in that: The method further comprises: The leaf part and the second branch part are bound to the first branch part, so that the leaf part and the second branch part follow the movement of the first branch part.

10. The dynamic solution method of the model according to claim 1, characterized in that: The method further comprises: Setting a breaking angle threshold of the branch portion; When the bending angle of the branch part reaches the breaking angle threshold, the branch part is controlled to achieve a breaking effect.

11. A dynamic solution device for a model, characterized in that: include: A tree model splitting module is used to split the tree model into a trunk part, a branch part and a leaf part; A model fragment segmentation module, used to segment the trunk part and the branch part into a plurality of model fragments, and add corresponding constraint points to each of the model fragments; A model dynamic solution module, used for introducing the model fragments and the constraint points corresponding to the model fragments into rigid body dynamics for solution, and obtaining dynamic solution results of the trunk part and the branch part; The leaf part binding module is used to bind the leaf part to the branch part after obtaining the dynamic solution results of the trunk part and the branch part, so that the leaf part moves with the branch part.

12. An electronic device, characterized in that: include: processor; as well as A memory for storing one or more programs, which, when executed by the processor, enables the processor to implement the dynamic solution method of the model as described in any one of claims 1 to 10.

13. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the dynamic solution method of the model according to any one of claims 1 to 10 is implemented.