Object dynamic solution method, device, equipment and storage medium

By building a multi-node tree and collecting transformed data to bake keyframes, the problem of character special effects calculation in the existing technology is solved, quickly locking the role position and improving production efficiency.

CN115841500BActive Publication Date: 2025-08-22NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211304903.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-24
Publication Date
2025-08-22
Estimated Expiration
2042-10-24

AI Technical Summary

Technical Problem

In the prior art, when solving character special effects with too large changes through point locking schemes, it is easy to have a problem of missing character special effects, resulting in low production efficiency.

Method used

By creating multiple nodes, the first node tree is associated with the locked target point level and the second node tree under the world coordinate system, the transformed data of the third node in the second node tree at each time point is collected, and keyframes are baked based on these data to generate animation data of the object when it moves.

Benefits of technology

It realizes the quick locking of character positions, improves the production efficiency of character special effects solution, and solves the problem of misunderstanding of character special effects solution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115841500B_ABST
    Figure CN115841500B_ABST
Patent Text Reader

Abstract

The present invention provides a method, device, equipment and storage medium for dynamic solution of an object. The method obtains the model elements of the object, determines the locking target point of the object based on the model elements, creates multiple nodes based on the locking target point and the world coordinate system, and constructs a first node tree associated with the locking target point at the level of the multiple nodes and a second node tree associated with the world coordinate system. When the object moves, the transformation data of the third node in the second node tree at each time point is collected, and key frames are baked based on each transformation data, and animation data of the object in motion is generated based on each key frame. In this way, after creating multiple levels of nodes, it is only necessary to bake the data of the child nodes to achieve complete locking of the transformation data of the moving object points, which solves the problem of character special effects solution being exposed when the existing point locking solution solves character special effects with excessive changes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of special effects processing technology, and in particular to a method, device, equipment and storage medium for dynamic solution of an object. Background Art

[0002] In film and television production, a large number of character special effects are created for realism and camera effects. This is especially true in gaming scenes, where the realism of the characters is maximized by designing interactive animations for each character's special effects. These effects include character fabric and hair calculations. Since the character motion used in these effects is inherited from the animation, the animation has a significant impact on the resulting effects calculations.

[0003] To achieve the aforementioned effect, the current approach is to lock the character's position. Specifically, this involves locking the character's top-level transform controller, or recording the time and translation value pairs of a specific point on the character to be locked over a period of time. Then, an empty group is created, and the previous time and translation value pairs are set as keyframes, which are then connected to the empty group. The translation values ​​are also reversed, such as 1 to -1, and -2 to 2. The empty group is then parented to the top-level character controller. This offsets the character's translation changes, effectively locking the character's movement to a specific point. However, for flying shots or shots with large character motion ranges, due to large variations in character position within a short period of time or large fluctuations in character motion rate, simply locking the character's displacement based on a point can lead to artifacts in the character effects rendering. Therefore, a universal and fast method for locking character positions is needed to improve the rendering efficiency of the character effects department.

[0004] 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 prior art known to ordinary technicians in the field. Summary of the Invention

[0005] In view of this, the purpose of the present invention is to provide a method, device, equipment and storage medium for dynamic solution of objects, so as to solve the problem of character special effects being miscalculated when solving character special effects with excessive changes through a point locking scheme.

[0006] In a first aspect, an embodiment of the present invention provides a method for solving the dynamics of an object, the method comprising:

[0007] Acquire a model element of an object, and determine a locking target point of the object based on the model element, wherein the locking target point is a node used to lock the position of the object;

[0008] Creating a plurality of nodes based on the locked target point and a world coordinate system, and constructing a first node tree associated with the locked target point at a level and a second node tree associated with the world coordinate system based on the plurality of nodes, wherein the world coordinate system is a coordinate system of a space in which the object is located, a second node is provided on each of the first node tree and the second node tree, and transformation attribute data between the first node tree and the second node tree is associated through the second node;

[0009] When the object moves, the transformation data of the third node in the second node tree at each time point is collected, and the corresponding key frames are baked based on each of the transformation data, and the animation data of the object when it moves is generated based on each of the key frames.

[0010] In a second aspect, an embodiment of the present invention provides a dynamic solution device for an object, the solution device comprising:

[0011] an acquisition module, configured to acquire a model element of an object and determine a locking target point of the object based on the model element, wherein the locking target point is a node for locking the position of the object;

[0012] an association module, configured to create a plurality of nodes based on the locked target point and a world coordinate system, and construct, based on the plurality of nodes, a first node tree associated with the locked target point at a level thereof and a second node tree associated with the world coordinate system, wherein the world coordinate system is a coordinate system of the space in which the object is located, a second node being provided on each of the first node tree and the second node tree, and association of transformation attribute data between the first node tree and the second node tree being performed via the second node;

[0013] A solving module is used to collect the transformation data of the third node in the second node tree at each time point when the object moves, bake out corresponding key frames based on each transformation data, and generate animation data of the object when it moves based on each key frame.

[0014] In a third aspect, an embodiment of the present invention provides an electronic device including a processor and a memory, wherein the memory stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the above-mentioned object dynamic solution method.

[0015] In a fourth aspect, an embodiment of the present invention provides a machine-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the dynamic solution method of the above-mentioned object.

[0016] The embodiments of the present invention bring the following beneficial effects:

[0017] The dynamic solution method of the object provided above is applied to electronic devices. By obtaining the model elements of the object, the locking target point of the object is determined based on the model elements. The locking target point is a node used to lock the position of the object; multiple nodes are created based on the locking target point and the world coordinate system, and a first node tree associated with the locking target point level and a second node tree associated with the world coordinate system are constructed based on the multiple nodes, wherein the world coordinate system is the coordinate system of the space where the object is located, a second node is provided on both the first node tree and the second node tree, and the transformation attribute data between the first node tree and the second node tree are associated through the second node; when the object moves, the transformation data of the third node in the second node tree at each time point is collected, and key frames are baked based on each transformation data, and animation data of the object in motion is generated based on each key frame. By creating multiple nodes and associating them with the object's locked target point, when the locked target point in the object moves, other nodes also move accordingly. This solution method can quickly lock the movement and rotation of the object according to the internal points of the moving object, while maintaining the relative motion of the object. It solves the problem of existing point locking solutions that cause character special effects solutions to have too large a range of changes, which may cause problems.

[0018] Other features and advantages of the present invention will be described in the following description, and in part will become apparent from the description, or understood by practicing the present invention. The purposes and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.

[0019] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.

[0021] Figure 1A schematic diagram of a first embodiment of a method for dynamically calculating an object provided by an embodiment of the present invention;

[0022] Figure 2 A schematic diagram of a second embodiment of the object dynamic solution method provided by an embodiment of the present invention;

[0023] Figure 3 A schematic diagram of a third embodiment of the object dynamics solution method provided by an embodiment of the present invention;

[0024] Figure 4 A schematic diagram of the node hierarchy provided by an embodiment of the present invention;

[0025] Figure 5 A schematic diagram of a dynamic solution device for an object provided by an embodiment of the present invention;

[0026] Figure 6 A schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0027] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work shall fall within the scope of protection of the present invention.

[0028] Based on the above problems, an embodiment of the present invention provides a general solution method that can quickly lock the movement and rotation of an object according to the internal points of the moving object, while maintaining the relative motion of the object. The method mainly constructs a multi-level tree node by creating multiple nodes. In the multi-level tree node, in the world coordinate system, the child object will completely inherit the transform of the parent object, that is, when the parent object moves, the child object will also maintain a relative distance and move together. At the same time, in the parent object coordinate system, all child objects can maintain their respective relative motion.

[0029] See also Figure 1 The diagram shows an embodiment of a method for dynamic object resolution. This embodiment is implemented based on a terminal device. On the terminal device, there are multiple movable objects, such as game characters and character special effects. The method for dynamic object resolution includes the following steps:

[0030] Step S101 : obtaining a model element of an object, and determining a locking target point of the object based on the model element, wherein the locking target point is a node used to lock the position of the object.

[0031] In this embodiment, the target point refers to the transform node whose position is to be locked to the corresponding point position, i.e., the control point used to control the object's motion. Examples include a controller bound to a character, a point on a moving object, or a point formed by the center and normal of a face on the moving object. In this example, it refers to the waist controller bound to the moving character.

[0032] Specifically, firstly, a model element of the object is obtained, and a target point is created based on the model element;

[0033] Then, the position of the target point in the world coordinate system is obtained, the position of the target point is set based on the position, and the set target point is subjected to a parent-child constraint with no offset to the object to obtain a corresponding locked target point.

[0034] In actual applications, the locked target point can be determined according to the position of the above-mentioned controller, or it can be determined by the pixel points of the object. For example, the character includes the character's cloth and hair. The dynamic control points of the cloth and hair are determined by the character's model, and the corresponding positions are determined. Based on these control points, they can be understood as model elements. The corresponding target points are created through these model elements, and the locked target point of the character is created based on each target point.

[0035] Step S102: Create multiple nodes based on the locked target point and the world coordinate system, and construct a first node tree associated with the level of the locked target point and a second node tree associated with the world coordinate system based on the multiple nodes, wherein the world coordinate system is the coordinate system of the space where the object is located, and a second node is provided on both the first node tree and the second node tree, and the transformation attribute data between the first node tree and the second node tree is associated through the second node.

[0036] In this step, multiple first-category nodes are first set based on the locked target point. The first-category nodes can be understood as nodes bound to the locked target point. When the locked target point moves with the object, the first-category nodes also move with the locked target point.

[0037] After creating the first type of nodes, the position of the locked target point is written into the first type of nodes, and the second type of nodes is created, and then the second type of nodes is set as the origin in the world coordinate system; further, some of the nodes in the first type are selected to remove the parent-child relationship with the locked target point, and then placed under the root node in the world coordinate system.

[0038] After adjusting the positions of the nodes that have released the parent-child relationship, create a third type of node and place the third type of node under the root node of the world coordinate system. The third type of node is used as the parent node and child node respectively, and a parent-child constraint relationship is established with the corresponding second type of node, thereby creating two node trees. Each node tree has multiple levels of nodes, and the nodes between the two node trees are also set with attribute binding relationships, where the third type of node is the child node of the second type of node.

[0039] Step S103 , when the object moves, collects transformation data of the third node in the second node tree at each time point, bakes corresponding key frames based on each transformation data, and generates animation data of the object in motion based on each key frame.

[0040] In this embodiment, after creating multi-level node trees relative to the object coordinate system and the world coordinate system based on each target point of the object, when the object is detected to be moving, the transformation data of the third node in the second node tree in the world coordinate system in the two multi-level node trees is detected and collected, and the transformation data is baked into key frames based on the baking technology, thereby realizing the follow-up solution of the moving object and obtaining the animation data of the object during the movement.

[0041] In practical applications, the time frame or time range is used as the acquisition condition to collect the position of the object's movement from the child nodes in the second node tree, thereby obtaining corresponding transformation data, such as offset and rotation. By collecting these data from the child nodes, the relative movement position of the object and its related objects can be realized to achieve solution, thereby improving the rendering and display effect of the animation.

[0042] The above-mentioned object dynamic solution method obtains the model elements of the object and determines the locking target point of the object based on the model elements. The locking target point is a node used to lock the position of the object; multiple nodes are created based on the locking target point and the world coordinate system, and a first node tree associated with the locking target point and a second node tree associated with the world coordinate system are constructed based on the multiple nodes, wherein the world coordinate system is the coordinate system of the space where the object is located, a second node is provided on each of the first node tree and the second node tree, and the transformation attribute data between the first node tree and the second node tree are associated through the second node; when the object moves, the transformation data of the third node in the second node tree at each time point is collected, and key frames are baked based on each transformation data, and animation data of the object in motion is generated based on each key frame. In this way, after creating multiple levels of nodes, only one transformation data baking is required to obtain the completely locked transformation data of the current moving object point, which solves the problem of character special effects solution being exposed when the existing point locking solution solves the character special effects with excessive changes.

[0043] See also Figure 2 FIG. 1 is a schematic diagram of another embodiment of a method for solving the dynamics of an object, the method comprising the following steps:

[0044] Step S201: Obtain model elements of the object and create target points based on the model elements.

[0045] In this embodiment, in order to facilitate the rendering and control of objects, multiple nodes are provided for the object itself, and each node can control the movement of the content corresponding to the object. For example, the hair follicles in the game character can be controlled overall by controlling the hair follicle nodes. To this end, the corresponding rendering model is determined by the object, and the elements in the rendering model are extracted. Based on the elements, the corresponding target points can be constructed, and based on the target points and the positional relationship between the target points, the node network of the object can be obtained.

[0046] Step S202: Obtain the position of the target point in the world coordinate system, set the position of the target point based on the position, and perform parent-child constraints on the set target point and the object without offset to obtain the corresponding locked target point.

[0047] In this embodiment, the position of each target point in the object is obtained, and then based on the relationship between the coordinate system of the object and the world coordinate system and the position of each target point, the position of each target point in the world coordinate system is calculated, and a locked target point is created for each target point that is completely bound to it and can move according to the object.

[0048] Specifically, when creating the locked target point of each target point, an empty node is created, and the position of the target point in the world coordinate system is set to the position of the empty node, and the empty node and the locked target point are bound through a parent-child constraint relationship without offset, so that the empty node can follow the movement of the target point, thereby obtaining the locked target point corresponding to the target point.

[0049] Step S203: Create a first node, a second node, and a third node with the locked target point as the root node.

[0050] In this embodiment, the first node, second node and third node created here include at least two, and the connection relationship between the three nodes is that the first node is the parent node of the second node, the second node is connected as the parent node or child node of the third node, and the first node is the child node of the lock point target point.

[0051] Step S204 : configuring the attribute relationship and the parent-child constraint relationship among the first node, the second node, and the third node to obtain a first node tree and a second node tree.

[0052] In this embodiment, each node in the first node tree uses the locked target node as the root node, and each node in the second node tree is connected to the root node of the world coordinate system. Specifically, after the three types of nodes are created, the three nodes are connected in sequence, wherein the first node is connected to the locked target point, the second node is connected to the first node, and the third node is connected to the second node. When the third node is connected to the second node, the third node is connected to the second node as a parent node, or the third node is connected to the second node as a child node. Then, a binding relationship is set between the locked target point and the first node, between the first node and the second node, between the second node and the third node, and between the second node and the second node, wherein the binding relationship can be understood as a follow-up relationship.

[0053] In practice, a non-offset parent-child constraint relationship is set between the locked target point and the first node, an inverse kinematic relationship is set between the first and second nodes, a parent-child constraint relationship is set between the second and third nodes, and the second nodes are connected to each other via attribute relationships, including Translate and Rotate properties. After configuration is complete, the second node tree is released from the locked target point and then placed in the world coordinate system, with a parent-child constraint relationship bound to the root node of the world coordinate system.

[0054] The following example creates two first nodes, two second nodes, and two third nodes. Figure 4 As shown, two first nodes, two second nodes, and two third nodes are created; the two first nodes are associated with the level of the locked target point, specifically, the level of the locked target point can be understood as the target point, and the first node is set under the level of the locked target point, that is, the first node is connected to the locked target point as a child node; the two second nodes are respectively set under the two first nodes, and similarly, the second nodes are connected to the first node as child nodes; the two third nodes are set under the root node of the world coordinate system and connected to the second node, wherein one of the two third nodes is connected to the corresponding second node as a parent node, and the other third node is connected to the corresponding second node as a child node. The coordinate systems corresponding to the first node tree and the second node tree are different. The first node tree is set based on the coordinate system of the object itself, and the second node tree is set based on the coordinate system of the space where the object is located.

[0055] Furthermore, the binding relationship is configured for the connected multi-level nodes to lock the time of each node. The specific implementation steps are as follows:

[0056] Restore the transformation data of the object through the hierarchical relationship between the two first nodes and the locked target point, and record it on the first node;

[0057] After restoring the transformation data of the object, the parent-child relationship between one of the two first nodes and the locked target point is removed, and the removed first node is set under the level corresponding to the root node in the world coordinate system;

[0058] Setting the positions of the two second nodes as the origin in the world coordinate system, and connecting the transformation attribute and the rotation attribute of the second node located under the locked target point to the second node located in the world coordinate system;

[0059] Establish a parent-child constraint relationship between the two third nodes and the corresponding second nodes to obtain a first node tree with the locked target node as the root node and a second node tree located in the world coordinate system, wherein the third node in the first node tree is the parent node and the second node in the second node tree is the parent node.

[0060] Wherein, after the step of setting the first node after the release at the level corresponding to the root node in the world coordinate system, the method further includes:

[0061] Setting the transformation attribute and the rotation attribute of the first node connected to the locked target point to zero;

[0062] The position information of the locked target point in the world coordinate system is acquired, and the position of the first node in the world coordinate system is set as the position information.

[0063] In actual applications, when creating a multi-level node network of an object based on the above method, the locked target point is first extracted based on each target point of the object as an independent node, and then a monitoring node is created for the locked target point to realize the linkage mapping of the internal structure of the object. Specifically, two first nodes are placed under the locked target point, and then two second nodes are created, and the two second nodes are set as the origin of the world coordinate system. One first node is released from the locked target point and placed under the root node of the world coordinate system, thereby realizing the mapping of the object to the world coordinate system. Finally, two third nodes are created and placed under the second node, and a parent-child constraint relationship is established. When baking and rendering the relative motion of the object, the transformation data of the object during movement can be directly collected by directly collecting the third node in the world coordinate system, and the collected transformation data is baked into key frames for display.

[0064] Specifically, the step of establishing a parent-child constraint relationship between the two third nodes and the corresponding second nodes to obtain a first node tree with the locked target node as the root node and a second node tree located in the world coordinate system includes:

[0065] One of the two third nodes is used as a parent node, and a parent-child constraint relationship without position offset is established with the corresponding second node. The other of the two third nodes is used as a child node, and a parent-child constraint relationship without position offset is established with the corresponding second node, thereby obtaining a first node tree with the locked target node as the root node and a second node tree located in the world coordinate system.

[0066] Step S205 , when the object moves, the transformation data of the third node in the second node tree is collected, and key frame baking is performed to obtain animation data of the object when it moves.

[0067] Specifically, the transformation data of the third node in the second node tree is collected, and the transformation data is baked into key frames according to a time frame or a time range to obtain the animation data.

[0068] In summary, by creating a multi-level node of the object through the above method, and collecting and rendering the motion data of the object based on the multi-level node, it is only necessary to bake the transformation data once to obtain the completely locked transformation data of the current moving object point, which solves the problem of the existing point locking solution for solving character special effects with too large a change amplitude, resulting in the problem of character special effects being solved incorrectly.

[0069] The following uses character effects in game scenes as an example to explain the character effects processing process in detail. Specifically, the processing is performed by collecting the character effects' Transform attribute data and creating a Transform node. Transform attribute data refers to transformation data, which in DCC software primarily includes the three attributes: Translate, Rotate, and Scale. The Transform node is the most basic node in DCC software, providing Translate, Rotate, and Scale attributes, representing the position of a point in the 3D world. Character effects refer to the special effects applied to CG game characters, including cloth simulation and hair simulation, and are a crucial component of the character's final appearance. The first node here includes nodes A and C, the second node includes nodes B and D, and the third node includes nodes E and F.

[0070] See also Figure 3 and 4 As shown, the dynamic solution method of the object includes the following steps:

[0071] Step S301: extract the target point of the object as an independent transform node Target, and obtain a transform that completely follows the target point of the object;

[0072] In this example, the target point refers to the transform node whose position is to be locked to the object. Specifically, this could be a controller rigged on a character, a point on a moving object, or a point formed by the center and normal of a face on the moving object. In this example, it refers to the waist controller rigged on the moving character.

[0073] Specifically, when extracting the target point Transform node Target, it is actually obtained by extracting the elements in the object. Since a certain point in the object belongs to an element of the model and not a basic node, for the convenience of subsequent operations and calculations, it is promoted to a basic Transform node Target. The node Target completely reproduces the position of the target point Target in the world coordinates.

[0074] like Figure 4 As shown, create a Transform node Target, obtain the world coordinate position of the character's special effect target point in each frame, and simultaneously set the position of the Target node. For example, this can be achieved by using the character's waist controller to parent the Target node without an offset. For internal elements such as model vertices, Maya's follicle node can be used to convert the element point into a fully followable Transform node, allowing the Target to fully follow the target point's movement in the world coordinate system.

[0075] Step S302: Create a transform node A, place it under the target node Target, and restore its transform data;

[0076] In this embodiment, a Transform node A is created and placed under the sub-level of the Target node, and the local Translate and local Rotate values ​​of A are set to 0. In this way, the node A completely overlaps with the Target node and the target point Target.

[0077] Step S303: Create a transform node B, place it under the node A level, and set the position of B to be the world coordinate origin;

[0078] In this step, create Transform node B and set its position to the world origin. Then, place node B below node A. This will allow you to obtain the world origin's position in node A's object coordinates.

[0079] Step S304: Create a transform node C, place it under the target node Target, and restore its transform data. Then, remove the parent-child relationship between node C and target node Target and place it back under the world root node.

[0080] Specifically, a Transform node C is created, the transform of the Target node in world coordinates is extracted, and then set to node C. This ensures that nodes A, C, and Target completely overlap with the target point in the current frame, but the Transform value of node C is in world coordinates. Furthermore, during subsequent motion, node C remains stationary and does not follow the movement of Target.

[0081] Step S305: Create a transform node D, place it under the node C level, and set the position of D to be the world coordinate origin;

[0082] Step S306: Create a transform node E and establish a parent-child constraint relationship between node E and node B.

[0083] Step S307, connect the translate and rotate attributes of node B to node D;

[0084] Specifically, create a Transform node E, set its position to the world origin, and assign a parent constraint (without position offset) to node B. This way, regardless of the movement of node A, the Target, or the target point, node B will always follow node E and remain at the world origin. Connect node B's translate and rotate values ​​to node D's translate and rotate properties.

[0085] Step S308: Create a transform node F and set a parent-child constraint relationship between node D and node F.

[0086] Specifically, create a Transform node F and assign node D to node F as a parent-child constraint without an offset. The following parent-child constraint relationships exist: A parent-child constraint with an offset means that when the parent node moves and rotates in world coordinates, the child node also moves and rotates in world coordinates, but with a certain offset between the parent and child nodes. This offset does not change with the movement or rotation of the parent and child nodes. A parent-child constraint without an offset means that the positions of the parent and child nodes completely overlap, with an offset of 0.

[0087] Step S309: bake out the Translate and Rotate properties of node F by baking keyframes per frame, and record the information of the current time frame on node F, to obtain the Transform data that can completely lock the target point Target in the current time frame:

[0088] In step S310, using node F, parent-child constraints are applied to the top-level valid controller of the object in the current time frame, so that the current moving object can be locked with this moving point as the target while maintaining the relative movement within the moving object.

[0089] In this example, nodes A and C are at the same position in the current frame. Node A follows the motion of node Target, while node C does not. Nodes B and D are at the same position, with node B constrained to the world origin by node E. Node D's local coordinate Transform value is connected to node B and is therefore identical.

[0090] At this time, the movement of the target point Target in other time frames will drive the Target and A to move together. However, since node B is restricted to the origin, the change in the local coordinate Transform value of node B is the inverse change in the Transform value of node A. It is similar to node A making a movement of tx=1, ty=2, tz=3 in the world coordinate system. If node B is not restricted to the world coordinate origin, node B will also make a movement of the corresponding values ​​(tx=1, ty=2, tz=3) in the world coordinate system. However, B is restricted to the world coordinate origin. Therefore, B is equivalent to making a movement of tx=-1, ty=-2, tz=-3 in the local coordinate system of A, which is the opposite of A's movement.

[0091] Since the Translate and Rotate properties of node D are connected by node B, the relative motion effect of node D and node C is the same as the relative motion effect of node B and node A.

[0092] Since node D has a parent-child constraint on node F, the position of node F in the world coordinates is the same as that of node D. The coordinate value of node F is the value in the world coordinates.

[0093] Furthermore, the Transform value of node F is sampled according to the required time range and baked into keyframes.

[0094] At this time, node F is the inverse motion node to be calculated. Using this node to perform parent-child constraints with offsets on the highest level of the control object can lock the object's Transform according to a certain point on the object while maintaining the object's relative motion.

[0095] In summary, in a multi-level tree node, in the world coordinate system, the child object will completely inherit the transform of the parent object, that is, when the parent object moves, the child object will also maintain a relative distance and move together. At the same time, in the parent object coordinate system, all child objects can maintain their own relative motion. By creating multiple nodes and associating and binding them with the object's locked target point, when the locked target point in the object moves, other nodes also move accordingly. This solution method can quickly lock the movement and rotation of the object according to the internal points of the moving object, and at the same time maintain the relative motion of the object, solving the problem of the existing point locking solution solving character special effects with too large a range of changes, which will cause the character special effects solution to be exposed.

[0096] Corresponding to the above method embodiment, applied to electronic equipment, see Figure 5 A schematic diagram of a dynamic solution device for an object shown in FIG. 1 , the device comprising:

[0097] An acquisition module 501 is configured to acquire a model element of an object and determine a locking target point of the object based on the model element, wherein the locking target point is a node for locking the position of the object;

[0098] An association module 502 is configured to create a plurality of nodes based on the locked target point and a world coordinate system, and construct, based on the plurality of nodes, a first node tree associated with the locked target point and a second node tree associated with the world coordinate system, wherein the world coordinate system is a coordinate system of the space in which the object is located, a second node is provided on each of the first node tree and the second node tree, and transformation attribute data between the first node tree and the second node tree is associated via the second node;

[0099] The solving module 503 is used to collect the transformation data of the third node in the second node tree at each time point when the object moves, bake out the corresponding key frame based on each transformation data, and generate the animation data of the object when it moves based on each key frame.

[0100] The acquisition module 501 is specifically used for:

[0101] Obtaining model elements of the object and creating target points based on the model elements;

[0102] The position of the target point in the world coordinate system is obtained, the position of the target point is set based on the position, and the set target point is parent-child constrained with the object without offset to obtain the corresponding locked target point.

[0103] The above-mentioned association module 502 is specifically used for:

[0104] Creating a first node, a second node, and a third node with the locked target point as a root node;

[0105] Configure the attribute relationship and parent-child constraint relationship between the first node, the second node and the third node to obtain a first node tree and a second node tree, wherein each node in the first node tree takes the locked target node as the root node, and each node in the second node tree is connected to the root node of the world coordinate system.

[0106] The above-mentioned association module 502 is specifically used for:

[0107] Create two first nodes, two second nodes, and two third nodes;

[0108] Using the two first nodes as child nodes of the locked target point and connecting them to the locked target point;

[0109] Set the two second nodes as child nodes of the first node and connect them to the two first nodes;

[0110] The two third nodes are used as child nodes of the first node and connected to the second node.

[0111] The above-mentioned association module 502 is specifically used for:

[0112] Restore the transformation data of the object through the hierarchical relationship between the two first nodes and the locked target point, and record it on the first node;

[0113] After restoring the transformation data of the object, the parent-child relationship between one of the two first nodes and the locked target point is removed, and the removed first node is set under the level corresponding to the root node in the world coordinate system;

[0114] Setting the positions of the two second nodes as the origin in the world coordinate system, and connecting the transformation attribute and the rotation attribute of the second node located under the locked target point to the second node located in the world coordinate system;

[0115] Establish a parent-child constraint relationship between the two third nodes and the corresponding second nodes to obtain a first node tree with the locked target node as the root node and a second node tree located in the world coordinate system, wherein the third node in the first node tree is the parent node and the second node in the second node tree is the parent node.

[0116] The association module 502 is further configured to:

[0117] Setting the transformation attribute and the rotation attribute of the first node connected to the locked target point to zero;

[0118] The position information of the locked target point in the world coordinate system is acquired, and the position of the first node in the world coordinate system is set as the position information.

[0119] The above-mentioned association module 502 is specifically used for:

[0120] One of the two third nodes is used as a parent node, and a parent-child constraint relationship without position offset is established with the corresponding second node. The other of the two third nodes is used as a child node, and a parent-child constraint relationship without position offset is established with the corresponding second node, thereby obtaining a first node tree with the locked target node as the root node and a second node tree located in the world coordinate system.

[0121] In summary, by obtaining the model elements of the object, determining the locking target point of the object based on the model elements, creating multiple nodes based on the locking target point and the world coordinate system, and constructing a first node tree associated with the level of the locking target point and a second node tree associated with the world coordinate system based on the multiple nodes, wherein the world coordinate system is the coordinate system of the space where the object is located, a second node is provided on both the first node tree and the second node tree, and the transformation attribute data between the first node tree and the second node tree are associated through the second node; when the object moves, the transformation data of the third node in the second node tree at each time point is collected, and key frames are baked based on each transformation data, and animation data of the object in motion is generated based on each key frame. In this way, after creating multiple levels of nodes, it is only necessary to bake the data of the child nodes to achieve complete locking of the transformation data of the moving object points, which solves the problem of character special effects being solved by existing point locking solutions with excessive changes, resulting in problems in the character special effects solution.

[0122] This embodiment further provides an electronic device, including a processor and a memory, wherein the memory stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the above-mentioned interface control method. The electronic device can be a server or a terminal device.

[0123] See also Figure 6 As shown, the electronic device includes a processor 600 and a memory 601 , wherein the memory 601 stores machine executable instructions that can be executed by the processor 600 , and the processor 600 executes the machine executable instructions to implement the above-mentioned interface control method.

[0124] Furthermore, Figure 6 The electronic device shown further includes a bus 602 and a communication interface 603 , and the processor 600 , the communication interface 603 and the memory 601 are connected via the bus 602 .

[0125] The memory 601 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. The communication connection between the system network element and at least one other network element is achieved through at least one communication interface 603 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used. The bus 602 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or one type of bus.

[0126] The processor 600 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by hardware integrated logic circuits in the processor 600 or by software instructions. The above processor 600 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in conjunction with the embodiments of the present invention can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other storage media that are well-known in the art. The storage medium is located in memory 601. The processor 600 reads the information in memory 601 and, in conjunction with its hardware, completes the following steps:

[0127] Acquire a model element of an object, and determine a locking target point of the object based on the model element, wherein the locking target point is a node used to lock the position of the object;

[0128] Creating a plurality of nodes based on the locked target point and a world coordinate system, and constructing a first node tree associated with the locked target point at a level and a second node tree associated with the world coordinate system based on the plurality of nodes, wherein the world coordinate system is a coordinate system of a space in which the object is located, a second node is provided on each of the first node tree and the second node tree, and transformation attribute data between the first node tree and the second node tree is associated through the second node;

[0129] When the object moves, the transformation data of the third node in the second node tree at each time point is collected, and the corresponding key frames are baked based on each of the transformation data, and the animation data of the object when it moves is generated based on each of the key frames.

[0130] The step of obtaining the model elements of the object and determining the locking target point of the object based on the model elements includes:

[0131] Obtaining model elements of the object and creating target points based on the model elements;

[0132] The position of the target point in the world coordinate system is obtained, the position of the target point is set based on the position, and the set target point is parent-child constrained with the object without offset to obtain the corresponding locked target point.

[0133] The steps of creating multiple nodes based on the locked target point and the world coordinate system, and constructing a first node tree associated with the level of the locked target point and a second node tree associated with the world coordinate system based on the multiple nodes include:

[0134] Creating a first node, a second node, and a third node with the locked target point as a root node;

[0135] Configure the attribute relationship and parent-child constraint relationship between the first node, the second node and the third node to obtain a first node tree and a second node tree, wherein each node in the first node tree takes the locked target node as the root node, and each node in the second node tree is connected to the root node of the world coordinate system.

[0136] The above step of creating the first node, the second node, and the third node with the locked target point as the root node includes:

[0137] Create two first nodes, two second nodes, and two third nodes;

[0138] Using the two first nodes as child nodes of the locked target point and connecting them to the locked target point;

[0139] Set the two second nodes as child nodes of the first node and connect them to the two first nodes;

[0140] The two third nodes are used as child nodes of the first node and connected to the second node.

[0141] The above step of configuring the attribute relationship and the parent-child constraint relationship between the first node, the second node, and the third node to obtain the first node tree and the second node tree includes:

[0142] Restore the transformation data of the object through the hierarchical relationship between the two first nodes and the locked target point, and record it on the first node;

[0143] After restoring the transformation data of the object, the parent-child relationship between one of the two first nodes and the locked target point is removed, and the removed first node is set under the level corresponding to the root node in the world coordinate system;

[0144] Setting the positions of the two second nodes as the origin in the world coordinate system, and connecting the transformation attribute and the rotation attribute of the second node located under the locked target point to the second node located in the world coordinate system;

[0145] Establish a parent-child constraint relationship between the two third nodes and the corresponding second nodes to obtain a first node tree with the locked target node as the root node and a second node tree located in the world coordinate system, wherein the third node in the first node tree is the parent node and the second node in the second node tree is the parent node.

[0146] After the step of placing the first node after the release at the level corresponding to the root node in the world coordinate system, the method further includes:

[0147] Setting the transformation attribute and the rotation attribute of the first node connected to the locked target point to zero;

[0148] The position information of the locked target point in the world coordinate system is acquired, and the position of the first node in the world coordinate system is set as the position information.

[0149] The step of establishing a parent-child constraint relationship between the two third nodes and the corresponding second nodes to obtain a first node tree with the locked target node as the root node and a second node tree located in the world coordinate system includes:

[0150] One of the two third nodes is used as a parent node, and a parent-child constraint relationship without position offset is established with the corresponding second node. The other of the two third nodes is used as a child node, and a parent-child constraint relationship without position offset is established with the corresponding second node, thereby obtaining a first node tree with the locked target node as the root node and a second node tree located in the world coordinate system.

[0151] In summary, this method creates a multi-level node of the object, and collects and renders the object's motion data based on the multi-level node. Only one transformation data baking is required to obtain the completely locked transformation data of the current moving object point, which solves the problem of character special effects calculation errors caused by existing point locking solutions for character special effects with excessive changes.

[0152] This embodiment further provides a machine-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the following steps:

[0153] Acquire a model element of an object, and determine a locking target point of the object based on the model element, wherein the locking target point is a node used to lock the position of the object;

[0154] Creating a plurality of nodes based on the locked target point and a world coordinate system, and constructing a first node tree associated with the locked target point at a level and a second node tree associated with the world coordinate system based on the plurality of nodes, wherein the world coordinate system is a coordinate system of a space in which the object is located, a second node is provided on each of the first node tree and the second node tree, and transformation attribute data between the first node tree and the second node tree is associated through the second node;

[0155] When the object moves, the transformation data of the third node in the second node tree at each time point is collected, and the corresponding key frames are baked based on each of the transformation data, and the animation data of the object when it moves is generated based on each of the key frames.

[0156] The step of obtaining the model elements of the object and determining the locking target point of the object based on the model elements includes:

[0157] Obtaining model elements of the object and creating target points based on the model elements;

[0158] The position of the target point in the world coordinate system is obtained, the position of the target point is set based on the position, and the set target point is parent-child constrained with the object without offset to obtain the corresponding locked target point.

[0159] The steps of creating multiple nodes based on the locked target point and the world coordinate system, and constructing a first node tree associated with the level of the locked target point and a second node tree associated with the world coordinate system based on the multiple nodes include:

[0160] Creating a first node, a second node, and a third node with the locked target point as a root node;

[0161] Configure the attribute relationship and parent-child constraint relationship between the first node, the second node and the third node to obtain a first node tree and a second node tree, wherein each node in the first node tree takes the locked target node as the root node, and each node in the second node tree is connected to the root node of the world coordinate system.

[0162] The above step of creating the first node, the second node, and the third node with the locked target point as the root node includes:

[0163] Create two first nodes, two second nodes, and two third nodes;

[0164] Using the two first nodes as child nodes of the locked target point and connecting them to the locked target point;

[0165] Set the two second nodes as child nodes of the first node and connect them to the two first nodes;

[0166] The two third nodes are used as child nodes of the first node and connected to the second node.

[0167] The above step of configuring the attribute relationship and the parent-child constraint relationship between the first node, the second node, and the third node to obtain the first node tree and the second node tree includes:

[0168] Restore the transformation data of the object through the hierarchical relationship between the two first nodes and the locked target point, and record it on the first node;

[0169] After restoring the transformation data of the object, the parent-child relationship between one of the two first nodes and the locked target point is removed, and the removed first node is set under the level corresponding to the root node in the world coordinate system;

[0170] Setting the positions of the two second nodes as the origin in the world coordinate system, and connecting the transformation attribute and the rotation attribute of the second node located under the locked target point to the second node located in the world coordinate system;

[0171] Establish a parent-child constraint relationship between the two third nodes and the corresponding second nodes to obtain a first node tree with the locked target node as the root node and a second node tree located in the world coordinate system, wherein the third node in the first node tree is the parent node and the second node in the second node tree is the parent node.

[0172] After the step of placing the first node after the release at the level corresponding to the root node in the world coordinate system, the method further includes:

[0173] Setting the transformation attribute and the rotation attribute of the first node connected to the locked target point to zero;

[0174] The position information of the locked target point in the world coordinate system is acquired, and the position of the first node in the world coordinate system is set as the position information.

[0175] The step of establishing a parent-child constraint relationship between the two third nodes and the corresponding second nodes to obtain a first node tree with the locked target node as the root node and a second node tree located in the world coordinate system includes:

[0176] One of the two third nodes is used as a parent node, and a parent-child constraint relationship without position offset is established with the corresponding second node. The other of the two third nodes is used as a child node, and a parent-child constraint relationship without position offset is established with the corresponding second node, thereby obtaining a first node tree with the locked target node as the root node and a second node tree located in the world coordinate system.

[0177] In summary, this method creates a multi-level node of the object, and collects and renders the object's motion data based on the multi-level node. Only one transformation data baking is required to obtain the completely locked transformation data of the current moving object point, which solves the problem of character special effects calculation errors caused by existing point locking solutions for character special effects with excessive changes.

[0178] The computer program product of the object dynamic solution method and related equipment provided in the embodiments of the present invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the method described in the previous method embodiment. The specific implementation can be found in the method embodiment and will not be repeated here.

[0179] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems and devices can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0180] In addition, in the description of the embodiments of the present invention, unless otherwise expressly specified or limited, the terms "mounted," "connected," and "connected" should be understood in a broad sense. For example, they may refer to fixed connections, detachable connections, or integral connections; they may refer to mechanical connections or electrical connections; they may refer to direct connections or indirect connections through an intermediate medium; and they may refer to internal communication between two components. Those skilled in the art will understand the specific meanings of the above terms in the present invention based on the specific circumstances.

[0181] If the functions are implemented in the form of software functional units and sold or used as independent products, they 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 the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0182] In the description of the present invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings and are intended solely to facilitate and simplify the description of the present invention. They are not intended to indicate or imply that the devices or components referred to must have, be constructed, or operate in a specific orientation, and therefore should not be construed as limitations on the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0183] Finally, it should be noted that the above embodiments are only specific implementation methods of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that any person skilled in the art can modify or easily conceive of changes to the technical solutions described in the above embodiments within the technical scope disclosed by the present invention, or replace some of the technical features therein with equivalents. Such modifications, changes or replacements do not deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.

Claims

1. A method for dynamic solution of an object, characterized in that: The dynamic solution method of the object includes: Acquire a model element of an object, and determine a locking target point of the object based on the model element, wherein the locking target point is a node used to lock the position of the object; Creating a plurality of nodes based on the locked target point and a world coordinate system, and constructing a first node tree associated with the locked target point at a level and a second node tree associated with the world coordinate system based on the plurality of nodes, wherein the world coordinate system is a coordinate system of a space in which the object is located, a second node is provided on each of the first node tree and the second node tree, and transformation attribute data between the first node tree and the second node tree is associated through the second node; When the object moves, the transformation data of the third node in the second node tree at each time point is collected, and the corresponding key frames are baked based on each of the transformation data, and the animation data of the object when it moves is generated based on each of the key frames.

2. The object dynamic solution method according to claim 1, characterized in that: The step of acquiring a model element of an object and determining a locking target point of the object based on the model element comprises: Obtaining model elements of the object and creating target points based on the model elements; The position of the target point in the world coordinate system is obtained, the position of the target point is set based on the position, and the set target point is parent-child constrained with the object without offset to obtain the corresponding locked target point.

3. The object dynamic solution method according to claim 1, characterized in that: The step of creating a plurality of nodes based on the locked target point and the world coordinate system, and constructing a first node tree associated with the level of the locked target point and a second node tree associated with the world coordinate system based on the plurality of nodes includes: Creating a first node, a second node, and a third node with the locked target point as a root node; Configure the attribute relationship and parent-child constraint relationship between the first node, the second node and the third node to obtain a first node tree and a second node tree, wherein each node in the first node tree takes the locked target node as the root node, and each node in the second node tree is connected to the root node of the world coordinate system.

4. The object dynamic solution method according to claim 3, characterized in that: The step of creating a first node, a second node, and a third node with the locked target point as the root node includes: Create two first nodes, two second nodes, and two third nodes; Using the two first nodes as child nodes of the locked target point and connecting them to the locked target point; Set the two second nodes as child nodes of the first node and connect them to the two first nodes; The two third nodes are used as child nodes of the first node and connected to the second node.

5. The object dynamic solution method according to claim 4, characterized in that: The step of configuring the attribute relationship and the parent-child constraint relationship among the first node, the second node, and the third node to obtain the first node tree and the second node tree includes: Restore the transformation data of the object through the hierarchical relationship between the two first nodes and the locked target point, and record it on the first node; After restoring the transformation data of the object, the parent-child relationship between one of the two first nodes and the locked target point is removed, and the removed first node is set under the level corresponding to the root node in the world coordinate system; Setting the positions of the two second nodes as the origin in the world coordinate system, and connecting the transformation attribute and the rotation attribute of the second node located under the locked target point to the second node located in the world coordinate system; Establish a parent-child constraint relationship between the two third nodes and the corresponding second nodes to obtain a first node tree with the locked target node as the root node and a second node tree located in the world coordinate system, wherein the third node in the first node tree is the parent node and the second node in the second node tree is the parent node.

6. The object dynamic solution method according to claim 5, characterized in that: After the step of placing the released first node at a level corresponding to the root node in the world coordinate system, the method further includes: Setting the transformation attribute and the rotation attribute of the first node connected to the locked target point to zero; The position information of the locked target point in the world coordinate system is acquired, and the position of the first node in the world coordinate system is set as the position information.

7. The object dynamic solution method according to claim 5, characterized in that: The step of establishing a parent-child constraint relationship between the two third nodes and the corresponding second nodes to obtain a first node tree with the locked target node as the root node and a second node tree located in the world coordinate system includes: One of the two third nodes is used as a parent node, and a parent-child constraint relationship without position offset is established with the corresponding second node. The other of the two third nodes is used as a child node, and a parent-child constraint relationship without position offset is established with the corresponding second node, thereby obtaining a first node tree with the locked target node as the root node and a second node tree located in the world coordinate system.

8. A dynamic solution device for an object, characterized in that: The dynamic solution device of the object includes: an acquisition module, configured to acquire a model element of an object and determine a locking target point of the object based on the model element, wherein the locking target point is a node for locking the position of the object; an association module, configured to create a plurality of nodes based on the locked target point and a world coordinate system, and construct, based on the plurality of nodes, a first node tree associated with the locked target point at a level thereof and a second node tree associated with the world coordinate system, wherein the world coordinate system is a coordinate system of the space in which the object is located, a second node being provided on each of the first node tree and the second node tree, and association of transformation attribute data between the first node tree and the second node tree being performed via the second node; A solving module is used to collect the transformation data of the third node in the second node tree at each time point when the object moves, bake out corresponding key frames based on each transformation data, and generate animation data of the object when it moves based on each key frame.

9. An electronic device, characterized in that: The invention comprises a processor and a memory, wherein the memory stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the dynamic solution method of an object according to any one of claims 1 to 7.

10. A machine-readable storage medium, characterized in that The machine-readable storage medium stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the object dynamic solution method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Animation image generation method and device and electronic equipment

    CN112509098A

  • Character animation generation method and device, equipment and storage medium

    CN112634417A