Three-dimensional model deformation simulation method and device and storage medium
By distinguishing the deformation weights of flexible, transitional, and rigid regions of a 3D model and combining them with interactive forces to determine vertex displacement, the problem of poor 3D model deformation simulation in existing technologies is solved, achieving a more realistic deformation simulation effect.
Patent Information
- Application Number
- CN202510311417.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-17
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2045-03-17
AI Technical Summary
Existing technologies fail to effectively distinguish between flexible and rigid regions in 3D model deformation simulation, resulting in distorted deformation effects and poor overall simulation performance.
By acquiring the deformation weights and interaction forces of each vertex in the 3D model, we can distinguish between flexible regions, transition regions, and rigid regions. Based on the deformation weights and interaction forces, we can determine the displacement of the vertices and control the movement of the vertices to achieve different degrees of deformation.
It improves the realism of 3D model deformation simulation, realizes seamless deformation of flexible and rigid regions, avoids hard boundaries and discontinuities, and is suitable for complex simulation needs.
Smart Images

Figure CN120372894B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of three-dimensional model simulation, and in particular to a three-dimensional model deformation simulation method, device and storage medium. BACKGROUND
[0002] Flexible physical feedback simulation is applied in virtual reality, game development, medical simulation and many other fields, and the purpose is to make the three-dimensional model produce realistic deformation effect in the process of being stressed. In many application scenarios, the three-dimensional model has both flexible and rigid characteristics, and part of the area of the three-dimensional model can respond to interactive operation to occur flexible deformation, and another part of the area remains relatively rigid and does not occur significant deformation. For example, the head model of the human body, the cheeks, the lips and other parts can occur flexible deformation in the deformation simulation scene, and the remaining parts remain nearly rigid.
[0003] The prior art does not distinguish between the flexible area and the rigid area of the three-dimensional model when performing deformation simulation of the three-dimensional model, resulting in distortion of the deformation effect of part of the area and poor overall deformation effect. SUMMARY
[0004] The present application provides a three-dimensional model deformation simulation method, device and storage medium to solve the technical problem of poor three-dimensional model deformation simulation effect in the prior art.
[0005] The present application provides a three-dimensional model deformation simulation method, comprising:
[0006] Obtaining the deformation weight of each vertex of a three-dimensional model and the interactive force acting on it; wherein the deformation weight of the vertex in the flexible area, the transition area and the rigid area of the three-dimensional model is different;
[0007] Determining the displacement of each vertex according to the deformation weight and the interactive force;
[0008] Controlling the movement of each vertex according to the displacement.
[0009] According to the three-dimensional model deformation simulation method provided by the present application, the step of obtaining the deformation weight comprises:
[0010] Obtaining the texture coordinates of the vertex;
[0011] Determining the pixel value of the texture map corresponding to the texture coordinates; wherein the texture map is mapped on the surface of the three-dimensional model, and the pixel value corresponds to the texture coordinates one by one;
[0012] Determining the deformation weight according to the pixel value.
[0013] According to the three-dimensional model deformation simulation method provided by the present application, before obtaining the deformation weight, the method further comprises:
[0014] mapping a surface of the three-dimensional model to a two-dimensional plane and assigning the texture coordinates under the two-dimensional plane to each of the vertices;
[0015] drawing the deformation weights of each of the vertices;
[0016] generating the texture map according to the deformation weights of each of the vertices;
[0017] one-to-one correspondence between each of the pixel values of the texture map and each of the texture coordinates;
[0018] mapping the texture map to the three-dimensional model.
[0019] According to the three-dimensional model deformation simulation method provided by the application, the step of obtaining the interaction force comprises:
[0020] obtaining the interaction force borne by each control node of the flexible region;
[0021] corresponding to the control node closest to the vertex, as the interaction force borne by the vertex.
[0022] According to the three-dimensional model deformation simulation method provided by the application, before obtaining the interaction force, the method further comprises:
[0023] decomposing the flexible region and the transition region into a plurality of polyhedral units;
[0024] associating and binding the control node closest to the vertex in the polyhedral unit with the vertex.
[0025] According to the three-dimensional model deformation simulation method provided by the application, the decomposition of the flexible region and the transition region into a plurality of polyhedral units comprises:
[0026] creating a simplified model in the space corresponding to the flexible region and the transition region;
[0027] decomposing the simplified model into a plurality of polyhedral units.
[0028] According to the three-dimensional model deformation simulation method provided by the application, the polyhedral unit is a tetrahedral unit.
[0029] The application further provides a three-dimensional model deformation simulation device, comprising:
[0030] an obtaining module configured to obtain the deformation weights of each vertex of a three-dimensional model and the interaction force borne by each vertex; wherein the deformation weights of the vertices in the flexible region, the transition region and the rigid region of the three-dimensional model are different.
[0031] a determining module configured to determine a displacement amount of each vertex according to the deformation weight and the interaction force;
[0032] a control module configured to control movement of each vertex according to the displacement amount.
[0033] The present application also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the three-dimensional model deformation simulation method according to any one of the above embodiments when executing the program.
[0034] The present application also provides a non-transitory computer readable storage medium, which stores a computer program, wherein the computer program is executable on a processor to implement the three-dimensional model deformation simulation method according to any one of the above embodiments.
[0035] The present application also provides a computer program product, comprising a computer program, wherein the computer program is executable on a processor to implement the three-dimensional model deformation simulation method according to any one of the above embodiments.
[0036] The three-dimensional model deformation simulation method, device and storage medium provided by the present application have different deformation weights of each vertex in the flexible region, the transition region and the rigid region of the three-dimensional model, and the displacement amount of the vertex is positively correlated with the deformation weight, so that the movement of each vertex controlled according to the displacement amount can make the flexible region, the transition region and the rigid region of the three-dimensional model deform to different degrees, so that the three-dimensional model deformation simulation is more realistic, and the effect of the three-dimensional model deformation simulation is improved. BRIEF DESCRIPTION OF DRAWINGS
[0037] In order to more clearly illustrate the technical solutions of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0038] Figure 1 is a flowchart of the three-dimensional model deformation simulation method provided by the present application.
[0039] Figure 2 is an effect diagram of drawing the deformation weight provided by the present application.
[0040] Figure 3 is a schematic diagram of a tetrahedron unit provided by the present application.
[0041] Figure 4 is a structural schematic diagram of the three-dimensional model deformation simulation device provided by the present application.
[0042] Figure 5 is a structural schematic diagram of an electronic device provided by the present application. DETAILED DESCRIPTION
[0043] In order to make the objects, technical solutions and advantages of the present application clearer, the technical solutions of the present application will be clearly and completely described below with reference to the drawings in the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.
[0044] It should be noted that in the description of the present application, the terms "comprise", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitation, the element defined by the sentence "comprises a" does not exclude the presence of another identical element in the process, method, article or device comprising the element. The terms "upper", "lower" and the like indicate the orientation or positional relationship shown in the drawings, and are only used to facilitate the description of the present application and simplify the description, and do not indicate or imply that the devices or elements referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation on the present application. Unless otherwise specified and limited, the terms "mount", "connect", "connect" should be understood broadly, for example, it can be fixedly connected, or it can be detachably connected, or integrally connected; it can be mechanically connected, or it can be electrically connected; it can be directly connected, or it can be indirectly connected through an intermediate medium, or it can be connected inside two elements. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.
[0045] The terms "first", "second" and the like in the present application are used to distinguish similar objects, and are not used to describe a particular order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second" and the like are generally a class, and do not limit the number of objects, for example, the first object can be one or more. In addition, "and / or" means at least one of the connected objects, and the character " / ", generally means that the front and rear associated objects are in an "or" relationship.
[0046] The three-dimensional model deformation simulation method, device and storage medium provided by the present application will be described below. Figures 1-5 The three-dimensional model deformation simulation method, device and storage medium provided by the present application will be described below.
[0047] As shown in Figure 1 The three-dimensional model deformation simulation method of the present application comprises:
[0048] Step S1, obtaining the deformation weight of each vertex of the three-dimensional model and the interaction force suffered by the vertex; wherein the deformation weight of the vertex in the flexible region, the transition region and the rigid region of the three-dimensional model is different.
[0049] In some embodiments, the three-dimensional model can be a three-dimensional model of a human head.
[0050] Wherein, the vertex of the three-dimensional model determines the shape and structure of the model, and the polygon formed by the mutual connection between the vertices constitutes the surface of the model.
[0051] In some embodiments, the deformation weight of each vertex can be set according to the reading of the vertex index.
[0052] In flexible simulation, a skeleton structure is used to represent the deformation body, the skeleton is composed of a series of control nodes (mass points) and springs connecting these control nodes, and the spring-mass system formed by a series of control nodes and spring connections provides a structural basis for simulating the mechanical behavior inside the object. The interaction force is generated after the force feedback device collides with the control node. The force generated by the collision of the force feedback device and the control node is transmitted to other control nodes through the spring-mass system, so that the whole skeleton deforms.
[0053] In some embodiments, each control node and the spring connection between each control node can be manually set.
[0054] Wherein, the interaction force suffered by the vertex depends on the interaction force suffered by the surrounding control nodes. It can be understood that the greater the interaction force, the greater the displacement of the vertex should be, so that the deformation of the model is more realistic.
[0055] For a human head model, the flexible region can include regions such as the cheek and lip that deform finely when subjected to force, the rigid region is a region that does not deform substantially when subjected to force, and the transition region is a connecting region between the flexible region and the rigid region.
[0056] In one embodiment, the vertex deformation weight of different regions can be set to be different, which can be set according to the actual detected stiffness, or can be gradually reduced or stepped according to the deformation weight of the vertex in the flexible region, the transition region and the rigid region. For example, the vertex deformation weight in the flexible region can be close to 1, such as greater than 0.9; the vertex deformation weight in the transition region can vary gradually or stepwise between 0.1-0.9; the vertex deformation weight in the rigid region can be close to 0, such as less than 0.1.
[0057] Step S2: Determine the displacement of each vertex based on the deformation weight and interaction force.
[0058] If the deformation weights of the vertices in the flexible region, transition region, and rigid region decrease sequentially, then step S2 can determine the displacement of each vertex based on the principle that the displacement of the vertex is positively correlated with the deformation weight; for example, the larger the deformation weight, the larger the displacement of the vertex. Determining the displacement of each vertex based on the deformation weight and interaction force can be achieved by first determining a basic displacement based on the interaction force, and then multiplying the basic displacement by the deformation weight to obtain the displacement.
[0059] Step S3: Control the movement of each vertex according to the displacement.
[0060] Each vertex has an original position coordinate. The new position coordinate can be obtained by "new position coordinate = original position coordinate + displacement". Controlling the movement of a vertex means controlling the vertex to move from its original position coordinate to its new position coordinate. The movement of each vertex on a micro scale constitutes the deformation of the model on a macro scale.
[0061] As explained above, the different deformation weights of each vertex in the flexible, transition, and rigid regions of the 3D model of this invention result in different displacements in these regions. Therefore, controlling the movement of each vertex based on its displacement allows for varying degrees of deformation in the flexible, transition, and rigid regions of the 3D model, making the deformation simulation more realistic and improving its effectiveness. Furthermore, when the displacement of the vertices in the flexible, transition, and rigid regions is positively correlated with the deformation weight, the deformation in the flexible region is most pronounced, followed by the transition region, while the rigid region remains essentially unchanged, further enhancing the realism of the 3D model's deformation simulation.
[0062] Furthermore, the three-dimensional model of this invention achieves seamless deformation between flexible and rigid regions through smooth transition of deformation weights, avoiding hard boundaries and discontinuities; this invention allows for independent allocation of deformation weights to each vertex, providing precise control over local deformation, and is suitable for complex simulation requirements.
[0063] In some implementations, step S1, the step of obtaining the deformation weight, may include:
[0064] Get the texture coordinates of the vertex;
[0065] Determine the pixel values of the texture map corresponding to the texture coordinates; where the texture map is mapped to the surface of the 3D model, and the pixel values correspond one-to-one with the texture coordinates;
[0066] Deformation weights are determined based on pixel values.
[0067] In other words, the texture map is pre-mapped onto the surface of the 3D model, and a one-to-one correspondence between the pixel values of the texture map and the texture coordinates is pre-established. Texture coordinates are pre-assigned to each vertex, so that each vertex has a corresponding pixel value. During simulation, the corresponding pixel value can be determined based on the texture coordinates, and then the deformation weight can be determined based on the pixel value.
[0068] In some implementations, the corresponding pixel value of a vertex can be directly used as the deformation weight of that vertex. This allows deformation weights to be obtained without using texture mapping.
[0069] As mentioned above, obtaining deformation weights through texture mapping requires prior preparation. Therefore, in some embodiments, before obtaining the deformation weights, the 3D model deformation simulation method of the present invention may further include:
[0070] Map the surface of the 3D model to a 2D plane, and assign each vertex a surface to the 2D plane. Texture coordinates
[0071] Draw the deformation weights for each vertex;
[0072] A texture map is generated based on the deformation weights of each vertex;
[0073] The pixel values of the texture map are mapped one-to-one with the texture coordinates.
[0074] Map texture maps to 3D models.
[0075] In some implementations, the surface of a 3D model can be mapped to a 2D plane using UV unwrapping technology. Texture coordinates are essentially UV coordinates.
[0076] The deformation weights can be drawn manually using the weight drawing tool in 3D modeling software or automatically generated based on geometric properties using a programmed method. For example, if the 3D model is a human head model, the effect of drawing the deformation weights would be as follows: Figure 2 As shown in the figure, the red area is the flexible area, the blue area is the rigid area, and the middle colored area is the transition area.
[0077] This allows for the pre-generation of texture maps based on the weighted drawing results, the assignment of texture coordinates to each vertex, the establishment of a one-to-one correspondence between the pixel values of the texture map and the texture coordinates, and the mapping of the texture map onto the surface of the 3D model. This enables the determination of the deformation weights of each vertex based on the pixel values of the texture map during simulation.
[0078] In some implementations, step S1, the step of obtaining the interaction force, may include:
[0079] Obtain the interaction forces experienced by each control node in the flexible region;
[0080] The interaction force corresponding to the control node closest to the vertex is taken as the interaction force on the vertex.
[0081] The method for obtaining the interaction force on each control node can be as follows: First, ensure that the force feedback device and the control node are in the same coordinate system; otherwise, perform coordinate transformation. Then, obtain the position coordinates of the force feedback device and the control node in the virtual simulation environment, calculate the vector from the control node position to the force feedback device position, and determine the distance between the force feedback device and the control node based on the length of this vector. If this distance is greater than the sum of the radius of the force feedback device and the radius of the control node (the force feedback device and control node in the virtual scene are usually represented by a sphere), it means that the two do not intersect, and the interaction force is returned to zero, ending the calculation. If this distance is less than the sum of the radius of the force feedback device and the radius of the control node, it means that the force feedback device and the control node intersect, and the penetration depth (the sum of the radius of the force feedback device and the radius of the control node minus this distance) is calculated. The magnitude of the interaction force is the product of the penetration depth and the set stiffness coefficient, which is a known value.
[0082] Since the nearest control node has the greatest impact on the model vertex, taking the interaction force of the nearest control node to each vertex as the interaction force of that vertex can make the interaction force of the vertex closer to the actual force situation, which is beneficial to improving the effect of model deformation simulation.
[0083] As mentioned above, each control node and the spring connection between them can be set manually. However, manually set control nodes may be unevenly or unreasonably distributed, leading to abnormal simulation results (such as excessive or insufficient local deformation). Furthermore, manually setting spring connections requires clarifying the connection relationship between each control node. For complex geometries, clarifying these connection relationships is very tedious and prone to errors.
[0084] To ensure the stability and accuracy of model deformation simulation, in some embodiments, before obtaining the interaction force, the three-dimensional model deformation simulation method of the present invention may further include:
[0085] The flexible region and transition region are decomposed into multiple polyhedral units;
[0086] Associate and bind the control node that is closest to the vertex in the polyhedral unit with the vertex.
[0087] For example, the polyhedral element can be a tetrahedral element or a hexahedral element.
[0088] Three-dimensional models are typically represented as surface meshes, such as triangular meshes. This representation only describes the external outline of an object and lacks internal volume information. In physical simulations, surface information alone cannot accurately simulate the internal mechanical behavior of an object, such as elasticity, plasticity, or stress distribution. Therefore, further processing is required to obtain a volumetric representation.
[0089] After decomposing the flexible and transition regions into multiple polyhedral elements, these elements fill the internal space of the model, forming a complete volumetric representation. Each polyhedral element consists of multiple vertices and edges. In the flexible simulation, the vertices of the polyhedral elements serve as control nodes, possessing parameters such as mass, positional damping, and rotational damping. The edges (connections) of the polyhedral elements simulate spring behavior, possessing parameters such as tensile, bending, and torsional stiffness. These control nodes are interconnected through the edges of the polyhedral elements, forming a spring-mass system.
[0090] Polyhedral processing can automatically generate uniformly distributed and reasonable control nodes, which helps ensure the stability and accuracy of the simulation; it can also automatically generate control nodes and connection relationships, improving generation efficiency.
[0091] Of course, for rigid regions, they do not need to be decomposed into polyhedral elements. In this way, only the flexible and transition regions are decomposed into multiple polyhedral elements, which simplifies the calculation. The vertices of rigid regions may not be associated with control nodes or may be associated with the nearest control node.
[0092] In some embodiments, the polyhedral unit of the present invention can be a tetrahedral unit. Compared with hexahedral units, tetrahedral structures are simpler and easier to decompose. Tetrahedral units, such as... Figure 3 As shown, each tetrahedral element consists of four vertices and six edges. The vertices of the tetrahedron serve as control nodes, and the edges simulate spring behavior. The flexible region can be decomposed using Delaunay triangulation, eliminating the need for manual control node setting, thus improving generation efficiency and ensuring accuracy.
[0093] In some implementations, decomposing the flexible region and transition region into multiple polyhedral units may further include:
[0094] Create simplified models within the spaces corresponding to the flexible and transition regions;
[0095] The simplified model is decomposed into multiple polyhedral units.
[0096] To efficiently generate tetrahedral elements in flexible regions and achieve precise deformation control, this invention creates a simplified 3D model with essentially the same geometry in the space corresponding to the flexible and transition regions. The complexity is reduced by decreasing the number of vertices and faces, and this model is used as input to generate a tetrahedral mesh.
[0097] The purpose of creating a simplified model is to preserve the main geometric features of the flexible region while providing a simpler input for tetrahedral generation, reducing subsequent computation. Compared to directly tetrahedrifying the original complex model, this method significantly improves the efficiency of the generation process.
[0098] like Figure 4 As shown, the present invention provides a three-dimensional model deformation simulation device, comprising:
[0099] The acquisition module is used to acquire the deformation weights and interaction forces of each vertex of the 3D model; the deformation weights of vertices in the flexible region, transition region and rigid region of the 3D model are different.
[0100] The determination module is used to determine the displacement of each vertex based on the deformation weights and interaction forces.
[0101] The control module is used to control the movement of each vertex based on the displacement.
[0102] In some implementations, the acquisition module may be specifically used for:
[0103] Get the texture coordinates of the vertex;
[0104] Determine the pixel values of the texture map corresponding to the texture coordinates; where the texture map is mapped to the surface of the 3D model, and the pixel values correspond one-to-one with the texture coordinates;
[0105] Deformation weights are determined based on pixel values.
[0106] In some implementations, the three-dimensional model deformation simulation device may further include:
[0107] The mapping module is used to map the surface of a 3D model to a 2D plane and assign texture coordinates in the 2D plane to each vertex.
[0108] The drawing module is used to draw the deformation weights of each vertex;
[0109] The generation module is used to generate texture maps based on the deformation weights of each vertex;
[0110] The association module is used to map each pixel value of the texture map to each texture coordinate.
[0111] The mapping module is also used to map texture maps to 3D models.
[0112] In some implementations, the acquisition module may be specifically used for:
[0113] Obtain the interaction forces experienced by each control node in the flexible region;
[0114] The interaction force corresponding to the control node closest to the vertex is taken as the interaction force on the vertex.
[0115] In some implementations, the three-dimensional model deformation simulation device may further include:
[0116] The decomposition module is used to decompose the flexible region and transition region into multiple polyhedral units;
[0117] The association module is used to associate and bind the control node that is closest to the vertex in the polyhedral unit to the vertex.
[0118] In some implementations, the decomposition module can be specifically used for:
[0119] Create simplified models within the spaces corresponding to the flexible and transition regions;
[0120] The simplified model is decomposed into multiple polyhedral units.
[0121] In some implementations, the polyhedral element can be a tetrahedral element.
[0122] It should be noted that the three-dimensional model deformation simulation device provided by the present invention can execute the three-dimensional model deformation simulation method described in any of the above embodiments during specific operation, which will not be elaborated in this embodiment.
[0123] Figure 5 This is a schematic diagram of the structure of the electronic device provided by the present invention, such as... Figure 5 As shown, the electronic device may include a processor, a communication interface, a memory, and a communication bus. The processor, communication interface, and memory communicate with each other via the communication bus. The processor can call logical instructions from the memory to execute a three-dimensional model deformation simulation method. This method includes: obtaining the deformation weights and interaction forces of each vertex of the three-dimensional model; wherein the deformation weights of vertices in the flexible region, transition region, and rigid region of the three-dimensional model are different; determining the displacement of each vertex based on the deformation weights and interaction forces; and controlling the movement of each vertex based on the displacement.
[0124] Furthermore, the logical instructions in the aforementioned memory can be implemented as software functional units and sold or used as independent products, and can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0125] On the other hand, the present invention also provides a computer program product, the computer program product including a computer program stored on a non-transitory computer-readable storage medium, the computer program including program instructions, and when the program instructions are executed by a computer, the computer is able to execute the three-dimensional model deformation simulation method provided in the above embodiments, the method including: obtaining the deformation weight and the interaction force of each vertex of the three-dimensional model; wherein, the deformation weight of vertices in the flexible region, transition region and rigid region of the three-dimensional model are different; determining the displacement of each vertex according to the deformation weight and the interaction force; and controlling the movement of each vertex according to the displacement.
[0126] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the three-dimensional model deformation simulation method provided in the above embodiments. The method includes: obtaining the deformation weights and interaction forces of each vertex of the three-dimensional model; wherein the deformation weights of vertices in the flexible region, transition region, and rigid region of the three-dimensional model are different; determining the displacement of each vertex based on the deformation weights and interaction forces; and controlling the movement of each vertex based on the displacement.
[0127] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0128] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0129] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method of three-dimensional model morphing simulation, characterized by, The method comprises the following steps: obtaining deformation weights of each vertex of a three-dimensional model and an interaction force borne by each vertex; wherein the deformation weights of the vertices in a flexible region, a transition region and a rigid region of the three-dimensional model are different; The step of obtaining the deformation weights comprises: obtaining a texture coordinate of the vertex; determining a pixel value of a texture map corresponding to the texture coordinate; wherein the texture map is mapped on a surface of the three-dimensional model, and the pixel value corresponds to the texture coordinate one by one; and determining the deformation weight according to the pixel value; Before obtaining the deformation weights, the method further comprises: mapping the surface of the three-dimensional model to a two-dimensional plane, and assigning the texture coordinate of each vertex under the two-dimensional plane; drawing the deformation weight of each vertex; generating the texture map according to the deformation weight of each vertex; one-to-one corresponding each pixel value of the texture map to each texture coordinate; and mapping the texture map to the three-dimensional model; determining a displacement of each vertex according to the deformation weight and the interaction force; controlling the movement of each vertex according to the displacement.
2. The three-dimensional model morphing simulation method according to claim 1, wherein, The step of obtaining the interaction force comprises: obtaining the interaction force borne by each control node of the flexible region; taking the interaction force corresponding to the control node closest to the vertex as the interaction force borne by the vertex.
3. The three-dimensional model morphing simulation method according to claim 2, wherein, Before obtaining the interaction force, the method further comprises: decomposing the flexible region and the transition region into a plurality of polyhedral units; binding the control node closest to the vertex in the polyhedral unit to the vertex.
4. The three-dimensional model deformation simulation method according to claim 3, wherein The decomposition of the flexible region and the transition region into a plurality of polyhedral units comprises: creating a simplified model in a space corresponding to the flexible region and the transition region; decomposing the simplified model into a plurality of polyhedral units.
5. The three-dimensional model morphing simulation method according to claim 3 or 4, characterized by, The polyhedral unit is a tetrahedral unit.
6. A three-dimensional model deformation simulation apparatus characterized by comprising: The method comprises the following steps: obtaining deformation weights of each vertex of a three-dimensional model and an interaction force borne by each vertex; wherein the deformation weights of the vertices in a flexible region, a transition region and a rigid region of the three-dimensional model are different; The obtaining module is specifically configured to: obtain a texture coordinate of the vertex; determine a pixel value of a texture map corresponding to the texture coordinate; wherein the texture map is mapped on a surface of the three-dimensional model, and the pixel value corresponds to the texture coordinate one by one; and determine the deformation weight according to the pixel value; a mapping module is configured to map the surface of the three-dimensional model to a two-dimensional plane, and assign the texture coordinate of each vertex under the two-dimensional plane; a drawing module is configured to draw the deformation weight of each vertex; a generating module is configured to generate the texture map according to the deformation weight of each vertex; an association module is configured to one-to-one correspond each pixel value of the texture map to each texture coordinate; the mapping module is further configured to map the texture map to the three-dimensional model; a determining module is configured to determine a displacement of each vertex according to the deformation weight and the interaction force; a control module is configured to control the movement of each vertex according to the displacement.
7. A non-transitory computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program, when executed by a processor, implements the three-dimensional model deformation simulation method according to any one of claims 1 to 5.
8. A computer program product comprising a computer program, characterized in that, The computer program, when executed by a processor, implements the three-dimensional model deformation simulation method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Method for rigid deformation of three-dimensional model
CN107221033A
Ship drainage volume constraint space construction method
CN118306540A
Volume-based free form deformation weighting
US5796400A