CN-122023609-A - Animation generation method, device, electronic equipment, storage medium and program product
Abstract
The application discloses an animation generation method, an animation generation device, electronic equipment, a storage medium and a program product, and relates to the technical field of computers, wherein the method comprises the steps of obtaining motion tracks of a plurality of action mark points of a target object under a target action; the method comprises the steps of determining a first virtual skeleton node which is directly driven and at least one secondary virtual skeleton node which is sequentially connected with the first virtual skeleton node based on a preset skeleton template and a motion track, determining a matched weight distribution strategy according to object attributes of a target object, distributing a first motion constraint weight for the first node according to the strategy, distributing a second motion constraint weight for each secondary node, correcting the motion track based on the distributed weights, and generating a motion animation of the target object under the target motion. By implementing the technical scheme of the application, the motion animation which is more natural and more in line with the attribute characteristics of the object can be generated.
Inventors
- XIA ZIPENG
Assignees
- 网易(杭州)网络有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20251203
Claims (11)
- 1. A method of animation generation, the method comprising: Acquiring motion trajectories of a plurality of action mark points generated by a target object under a target action; determining a first virtual skeleton node driven by the motion trail and at least one secondary virtual skeleton node connected with the first virtual skeleton node based on a preset skeleton template and the motion trail, wherein each secondary virtual skeleton node is sequentially connected; determining a weight allocation strategy matched with the object attribute based on the object attribute of the target object; assigning a first action constraint weight to the first virtual skeleton node based on the weight assignment policy, and assigning a second action constraint weight to each of the secondary virtual skeleton nodes; And correcting the motion trail of the target motion based on the first motion constraint weight and the second motion constraint weight to generate motion animation of the target object under the target motion.
- 2. The method of claim 1, wherein the assigning a first action constraint weight to the first virtual skeleton node and a second action constraint weight to each of the secondary virtual skeleton nodes based on the weight assignment policy comprises: Determining a constraint relationship between the action marker point and the first virtual skeleton node and each of the secondary virtual skeleton nodes; And under the constraint relation, distributing a first action constraint weight for the first virtual skeleton node according to the weight distribution strategy, and distributing a second action constraint weight for each secondary virtual skeleton node.
- 3. The method of claim 2, wherein said assigning a first action constraint weight to said first virtual skeleton node and a second action constraint weight to each of said secondary virtual skeleton nodes according to said weight assignment policy comprises: Responsive to the object attribute being a first attribute and the first virtual bone node characterizing a first location, assigning a first bone constraint weight to the first virtual bone node according to the weight assignment policy, the first action constraint weight comprising the first bone constraint weight; Assigning a second skeletal constraint weight to each of the secondary virtual skeletal nodes based on a distance between each of the secondary virtual skeletal nodes and the first virtual skeletal node, the second action constraint weight comprising the second skeletal constraint weight; wherein the further from the first virtual bone node, the less the second bone constraint weight.
- 4. A method according to claim 3, characterized in that the method further comprises: Responsive to the object attribute being a second attribute and the first virtual bone node characterizing the first location, assigning a third bone constraint weight to the first virtual bone node according to the weight assignment policy, the third bone constraint weight being equal to the first bone constraint weight; assigning a fourth skeletal constraint weight to each of the secondary virtual skeletal nodes based on a distance between each of the secondary virtual skeletal nodes and the first virtual skeletal node; the fourth bone constraint weight is smaller as the distance from the first virtual bone node is farther, and the fourth bone constraint weight corresponding to each secondary virtual bone node is smaller than the second bone constraint weight corresponding to each secondary virtual bone node.
- 5. The method of claim 2, wherein said assigning a first action constraint weight to said first virtual skeleton node and a second action constraint weight to each of said secondary virtual skeleton nodes according to said weight assignment policy comprises: and if the first virtual skeleton node represents a second position, the first action constraint weight is the same as each second action constraint weight.
- 6. The method according to claim 1, wherein the method further comprises: acquiring a motion angle threshold value of the target object under the target action; a deployment location between the first virtual bone node and each of the secondary virtual bone nodes is determined based on the motion angle threshold.
- 7. The method according to claim 1, wherein the obtaining the motion trajectories of the plurality of motion mark points generated by the target object under the target motion includes: acquiring position data corresponding to each action mark point of the target object under the target action; And processing the position data by using a space mark reconstruction mode to obtain the motion trail of each action mark point.
- 8. An animation generation device, the device comprising: the first acquisition module is used for acquiring motion trajectories of a plurality of action mark points generated by the target object under the target action; The first determining module is used for determining a first virtual skeleton node driven by the motion trail and at least one secondary virtual skeleton node connected with the first virtual skeleton node based on a preset skeleton template and the motion trail, and the secondary virtual skeleton nodes are sequentially connected; the second determining module is used for determining a weight distribution strategy matched with the object attribute based on the object attribute of the target object; the distribution module is used for distributing a first action constraint weight to the first virtual skeleton node based on the weight distribution strategy and distributing a second action constraint weight to each secondary virtual skeleton node; the generation module is used for correcting the motion trail of the target motion based on the first motion constraint weight and the second motion constraint weight, and generating motion animation of the target object under the target motion.
- 9. An electronic device, comprising: A memory and a processor, the memory and the processor being communicatively connected to each other, the memory having stored therein computer instructions, the processor executing the computer instructions to perform the animation generation method of any of claims 1 to 7.
- 10. A computer-readable storage medium having stored thereon computer instructions for causing a computer to perform the animation generation method of any one of claims 1 to 7.
- 11. A computer program product comprising computer instructions for causing a computer to perform the animation generation method of any of claims 1 to 7.
Description
Animation generation method, device, electronic equipment, storage medium and program product Technical Field The present application relates to the field of computer technology, and in particular, to an animation generation method, an animation generation device, an electronic device, a storage medium, and a program product. Background Motion capture technology has become an important way of animation generation by collecting real motion data and converting it into virtual skeletal animation. In a typical process, the motion trail is captured by tracking the mark points on the actor, and then a preset skeleton template is driven to generate an animation. However, there are certain technical limitations in such systems that drive bones based on marker points. The motion of many secondary bones is not directly driven by the marker points, but is calculated by interpolation of the primary bones to which it is connected. This approach may result in stiff, unnatural motion effects of the generated animation, and even significant pose distortion or misalignment under certain actions. Disclosure of Invention In view of the above, the present application provides an animation generation method, apparatus, electronic device, storage medium and program product, so as to solve the problem that the animation motion generated in the related art is not natural and real enough. The application provides an animation generation method, which comprises the steps of obtaining motion trajectories of a plurality of motion mark points generated by a target object under a target motion, determining a first virtual skeleton node driven by the motion trajectories and at least one secondary virtual skeleton node connected with the first virtual skeleton node based on preset skeleton templates and the motion trajectories, sequentially connecting the secondary virtual skeleton nodes, determining a weight distribution strategy matched with the object attributes based on the object attributes of the target object, distributing a first motion constraint weight for the first virtual skeleton node based on the weight distribution strategy, distributing a second motion constraint weight for the secondary virtual skeleton node, and correcting the motion trajectories of the target motion based on the first motion constraint weight and the second motion constraint weight to generate a motion animation of the target object under the target motion. In an alternative embodiment, the method for allocating the first action constraint weight to the first virtual skeleton node and the second action constraint weight to each secondary virtual skeleton node based on the weight allocation policy comprises the steps of determining constraint relations between action marking points and the first virtual skeleton node and each secondary virtual skeleton node, allocating the first action constraint weight to the first virtual skeleton node according to the weight allocation policy under the constraint relations, and allocating the second action constraint weight to each secondary virtual skeleton node. In an alternative embodiment, assigning a first action constraint weight to a first virtual bone node according to a weight assignment policy and assigning a second action constraint weight to each secondary virtual bone node includes assigning a first bone constraint weight to the first virtual bone node according to the weight assignment policy in response to the object attribute being a first attribute and the first virtual bone node characterizing a first location, the first action constraint weight including a first bone constraint weight, assigning a second bone constraint weight to each secondary virtual bone node based on a distance between each secondary virtual bone node and the first virtual bone node, the second action constraint weight including a second bone constraint weight, wherein the second bone constraint weight is smaller the further from the first virtual bone node. In an alternative embodiment, in response to the object attribute being a second attribute and the first virtual bone node representing a first location, a third bone constraint weight is assigned to the first virtual bone node according to a weight assignment policy, the third bone constraint weight being equal to the first bone constraint weight, each secondary virtual bone node being assigned a fourth bone constraint weight based on a distance between each secondary virtual bone node and the first virtual bone node, wherein the further from the first virtual bone node the fourth bone constraint weight is smaller, and each secondary virtual bone node corresponds to a fourth bone constraint weight that is less than its corresponding second bone constraint weight. In an alternative embodiment, assigning a first action constraint weight to the first virtual skeleton node and assigning a second action constraint weight to each secondary virtual skeleton node according to a wei