Animation generation method and device, storage medium and electronic equipment

By creating associated skeletal nodes based on the base coil and controlling their movement, the problem of low animation generation efficiency in the prior art is solved, and efficient generation of object motion animation is achieved, especially the looping animation of three-dimensional mechanical components.

CN121582399APending Publication Date: 2026-02-27NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511158034.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-18
Publication Date
2026-02-27

AI Technical Summary

Technical Problem

Existing animation generation methods rely on the manual creation of a large number of keyframes, resulting in low animation generation efficiency, especially in animations of cyclical motion of components such as tracks and gear chains, which are tedious and time-consuming to produce.

Method used

By creating skeletal nodes associated with base coils and binding virtual objects to the skeletal nodes, the motion of the base coils is controlled to drive the skeletal nodes, thereby generating object motion animations. Techniques such as NURBS curves and line deformers are used to achieve flexible control of virtual objects.

Benefits of technology

It simplifies the process of generating object motion animations, reduces animation generation time, and improves animation generation efficiency. In particular, it significantly shortens the production cycle and improves generation flexibility in the loop animation of 3D mechanical components.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121582399A_ABST
    Figure CN121582399A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an animation generation method and device, a storage medium and electronic equipment, and belongs to the technical field of computers. At least one skeleton node associated with a basic coil is created for the basic coil, the number of the skeleton nodes is determined based on the number of virtual objects in the object motion animation to be generated, and the positions of the skeleton nodes are configured to change along with the change of the basic coil; binding corresponding virtual objects for the skeleton nodes; and controlling the basic coil to move so as to drive the skeleton nodes to move, thereby driving the virtual object to move along with the basic coil, and generating an object movement animation corresponding to the virtual object. Therefore, the position-associated skeleton nodes are created for the basic coil, so that the motion of the basic coil is controlled to drive the virtual objects bound with the skeleton nodes to move, the object motion animation for indicating the motion of the virtual objects can be generated, the generation process of the object motion animation is simplified, the animation generation time is shortened, and the animation generation efficiency is improved. And the animation generation efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and specifically to an animation generation method, apparatus, storage medium, and electronic device. Background Technology

[0002] In the fields of 3D animation and game production, in addition to character animation, element animation is also an indispensable artistic element. Existing animation generation methods often rely on animators manually creating a large number of keyframes and repeatedly adjusting the motion rhythm through a timeline curve editor to generate animations such as the cyclical motion of elements (such as the rotation of tracks, gear chains, etc.).

[0003] Research and practice of existing technologies have revealed that existing animation generation methods based on creating a large number of keyframes are cumbersome and time-consuming, resulting in low animation generation efficiency. Summary of the Invention

[0004] This application provides an animation generation method, apparatus, storage medium, and electronic device, which can simplify the process of generating object motion animation, reduce animation generation time, and thus improve animation generation efficiency.

[0005] This application provides an animation generation method, including:

[0006] At least one bone node is created associated with the base coil, the number of which is determined based on the number of virtual objects in the object motion animation to be generated, and the position of the bone node is configured to change as the base coil changes;

[0007] Bind the corresponding virtual object to the skeletal node;

[0008] The basic coil is controlled to move, thereby driving the skeletal nodes to move, which in turn drives the virtual object to move with the basic coil, generating an object motion animation corresponding to the virtual object.

[0009] Accordingly, embodiments of this application provide an animation generation apparatus, including:

[0010] A creation unit is used to create at least one bone node associated with the base coil, the number of bone nodes being determined based on the number of virtual objects in the object motion animation to be generated, and the position of the bone nodes being configured to change as the base coil changes;

[0011] A binding unit is used to bind a corresponding virtual object to the skeletal node;

[0012] The generation unit is used to control the movement of the base coil to drive the movement of the skeletal nodes, thereby driving the virtual object to move with the base coil and generating the object motion animation corresponding to the virtual object.

[0013] Furthermore, embodiments of this application also provide a computer-readable storage medium storing a computer program adapted for loading by a processor to execute steps in any of the animation generation methods provided in embodiments of this application.

[0014] Furthermore, this application also provides an electronic device, including a processor and a memory, wherein the memory stores an application program, and the processor is used to run the application program in the memory to implement the animation generation method provided in this application.

[0015] This application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. When the processor of an electronic device reads the computer program from the computer-readable storage medium, the processor executes the computer program, causing the electronic device to perform the steps in the animation generation method provided in this application.

[0016] This application embodiment creates at least one skeletal node associated with a base coil. The number of skeletal nodes is determined based on the number of virtual objects in the object motion animation to be generated. The positions of the skeletal nodes are configured to change with the base coil. Corresponding virtual objects are bound to the skeletal nodes. The base coil is controlled to move, thereby driving the skeletal nodes to move, which in turn drives the virtual objects to move with the base coil, generating object motion animations corresponding to the virtual objects. Thus, by creating position-associated skeletal nodes with the base coil, and controlling the movement of the base coil to drive the associated virtual objects, object motion animations indicating the movement of virtual objects can be generated. This simplifies the object motion animation generation process, reduces animation generation time, and thus improves animation generation efficiency. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is a schematic diagram illustrating an implementation scenario of an animation generation method provided in this application.

[0019] Figure 2 This is a flowchart illustrating an animation generation method provided in an embodiment of this application;

[0020] Figure 3a This is a schematic diagram of the tool interface of an animation generation method provided in an embodiment of this application;

[0021] Figure 3b This is a schematic diagram of animation generation according to an embodiment of the present application;

[0022] Figure 3c This is a schematic diagram of coil adjustment for an animation generation method provided in an embodiment of this application;

[0023] Figure 3d This is another schematic diagram of animation generation according to an embodiment of the present application;

[0024] Figure 3e This is a schematic diagram of object binding for an animation generation method provided in an embodiment of this application;

[0025] Figure 3f This is another animation generation diagram of an animation generation method provided in this application embodiment;

[0026] Figure 4 This is a schematic diagram of object motion animation provided in an embodiment of the animation generation method of this application;

[0027] Figure 5 This is a schematic diagram of the structure of the animation generation device provided in the embodiments of this application;

[0028] Figure 6 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0029] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0030] This application provides an animation generation method, apparatus, storage medium, and electronic device. The animation generation apparatus can be integrated into an electronic device, which may be a server or a terminal, etc.

[0031] The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery network (CDN) acceleration services, and big data and artificial intelligence platforms. The terminal can include, but is not limited to, mobile phones, computers, smart voice interaction devices, smart home appliances, vehicle terminals, and aircraft. The terminal and server can be directly or indirectly connected via wired or wireless communication, which is not limited herein.

[0032] Please see Figure 1 Taking the integration of animation generation devices into electronic devices as an example, Figure 1 This is a schematic diagram of an implementation scenario of the animation generation method provided in this application. The electronic device can create at least one skeletal node associated with the basic coil. The number of skeletal nodes is determined based on the number of virtual objects in the object motion animation to be generated. The position of the skeletal nodes is configured to change with the change of the basic coil. The corresponding virtual objects are bound to the skeletal nodes. The basic coil is controlled to move so as to drive the skeletal nodes to move, thereby driving the virtual objects to move with the basic coil and generating the object motion animation corresponding to the virtual objects.

[0033] It should be noted that, Figure 1 The illustrated scenario of the animation generation method is merely an example. The implementation environment of the animation generation method described in this application is intended to more clearly illustrate the technical solutions of this application and does not constitute a limitation on the technical solutions provided in this application. Those skilled in the art will recognize that, with the evolution of data processing and the emergence of new business scenarios, the technical solutions provided in this application are equally applicable to similar technical problems.

[0034] The solutions provided in this application are specifically illustrated through the following embodiments. It should be noted that the order of description of the following embodiments is not intended to limit the preferred order of the embodiments.

[0035] This embodiment will be described from the perspective of an animation generation device, which can be integrated into an electronic device, which can be a terminal and / or a server, and this application does not limit it.

[0036] Please see Figure 2 , Figure 2 This is a flowchart illustrating the animation generation method provided in an embodiment of this application. The animation generation method includes:

[0037] In step 101, at least one skeletal node is created that is associated with the base coil.

[0038] The number of bone nodes can be determined based on the number of virtual objects in the motion animation of the object to be generated, and the position of the bone node can be configured to change with the change of the base coil.

[0039] The base coil can be a coil used to control the movement of skeletal nodes. The shape of the base coil can indicate the movement trajectory of the skeletal nodes. These skeletal nodes can be control points (joints) in 3D modeling, controlling the deformation of the 3D model through coordinate system changes. The object motion animation can be an animation that instructs a virtual object to move. This virtual object can be a controlled object, and it can be a 3D model. For example, the virtual object can be a bell, ornament, wheel, vehicle, virtual character, virtual animal, or other virtual objects.

[0040] Optionally, the base coil can be a closed coil or a non-closed curve. In one embodiment, the base coil can be a non-uniform rational B-spline (NURBS) curve. NURBS curves provide precise control over the curve shape and flexible manipulation of the curve's geometric and topological properties. Therefore, based on the base coil belonging to the NURBS curve, flexible and accurate control over the motion trajectory of virtual objects can be achieved, thereby improving the generation effect of object motion animation and thus improving animation generation efficiency.

[0041] Optionally, the virtual object can also be an object that needs to perform periodic cyclical motion along a closed path. For example, the virtual object can be a component in a three-dimensional mechanical assembly. For example, the three-dimensional mechanical assembly can include mechanical components such as tracks, gear chains, and conveyor belts in a three-dimensional scene. The virtual object can be components such as track plates and track pins in a track, and can also be components such as gears in a gear chain.

[0042] The number of skeletal nodes is determined based on the number of virtual objects in the object motion animation to be generated. This can mean that the number of skeletal nodes created is the same as the number of virtual objects in the object motion animation to be generated, or that the number of skeletal nodes is greater than the number of virtual objects in the object motion animation.

[0043] There are several ways to create at least one skeletal node associated with the base coil. For example, for each skeletal node to be generated, the distribution parameters corresponding to the skeletal node can be determined; the skeletal node can be created, and the position information of the position point associated with the skeletal node can be determined on the base coil based on the distribution parameters; the position information of the position point can be associated with the position attribute of the skeletal node so that the skeletal node is associated with the base coil, wherein the position attribute is an attribute used to control the position of the skeletal node.

[0044] The distribution parameter can be a parameter indicating the distribution of the position points associated with each skeletal node on the base coil. The position information can be information indicating the position coordinates of the position points associated with each skeletal node on the base coil. The position attribute (translate) can be an attribute of the skeletal node used to control the position of the skeletal node in the world coordinate system or the parent coordinate system. For example, the position attribute can indicate the translation coordinates of the skeletal node in the world or parent coordinate system, that is, its position vector, which can be used to control the position of the skeletal node in the world coordinate system or the parent coordinate system. When the position attribute changes, it will control the skeletal node to translate based on the changed position attribute.

[0045] There are several ways to determine the distribution parameters corresponding to the skeletal nodes. For example, the number of skeletal nodes to be generated can be obtained, and the distribution parameters corresponding to the skeletal nodes can be determined based on the number of skeletal nodes.

[0046] Optionally, there are several ways to determine the distribution parameters corresponding to the skeletal nodes based on the number of skeletal nodes. For example, the basic coil can be divided into equal parts according to the number of skeletal nodes. For example, assuming there are 50 skeletal nodes, the basic coil can be used as a parameter space of 0-1. By calculating the result of param = float(i) / num_joints, the basic coil can be divided into 50 equal parts. float(i) means converting the current integer value of the loop variable i into a lowercase floating-point number. The value range of i is 0-49, which represents the i-th skeletal node. num_joints can represent the number of skeletal nodes, and param can represent the distribution parameters. Thus, the distribution parameters corresponding to each skeletal node can be obtained. The distribution parameter corresponding to the first skeletal node i = 0 can be 0.00, the distribution parameter corresponding to the second skeletal node i = 1 can be 0.02, and so on. The distribution parameter corresponding to the fiftieth skeletal node i = 49 can be 0.98, and so on.

[0047] There are several ways to determine the location information of the associated points of the skeletal node on the base coil based on the distribution parameters. For example, a corresponding curve sampler node can be created for the skeletal node; the location information of the associated points of the skeletal node on the base coil can be calculated by the curve sampler node based on the distribution parameters and the curve geometry information of the base coil.

[0048] The curve sampler node (pointOnCurveInfo) can be a node that samples on a curve. Given a curve and a parameter value, it can return in real-time information such as the position, tangent, normal, and curvature of the point on the curve corresponding to that parameter value, for use by downstream nodes or scripts. The position point associated with the skeleton node can be the position point sampled by the curve sampler node in the base coil based on the distribution parameters corresponding to the skeleton node.

[0049] The `pointOnCurveInfo` node can include attributes such as curve input (`inputCurve`), parameter, and position. `inputCurve` is used to input the curve's geometry information to be sampled. `parameter` can be the parameter value of the sampling point on this curve. `position` can be the world coordinates (x, y, z) of the point on the curve at that parameter, output by the `pointOnCurveInfo` node. This curve geometry information (`worldSpace`) can indicate the information of the base coil. In Maya (a 3D animation software), `worldSpace` is an array of output attributes on the shape node of the base coil, which can broadcast the geometric data of the entire curve in the world coordinate system in real time.

[0050] There are several ways to calculate the position information of the bone nodes associated with the base coil based on the distribution parameters and the curve geometry information of the base coil. For example, the curve sampler node can determine the curve to be sampled based on the curve geometry information of the base coil, and can determine the position points to be sampled in the base coil based on the distribution parameters, i.e. the position points associated with the bone nodes. Thus, the curve sampler node can determine the position points associated with each bone node in the base coil based on the distribution parameters corresponding to each bone node, and calculate the position information of the position points associated with the bone nodes in the base coil.

[0051] After determining the location information of the associated points of the skeletal nodes on the base coil based on the distribution parameters, the location information of the points can be associated with the location attributes of the skeletal nodes, so that each skeletal node is associated with the base coil. There are several ways to associate the location information of the points with the location attributes of the skeletal nodes. For example, a connectAttr node can be used to associate the location information of each point in the base coil with the location attributes of the skeletal nodes. The connectAttr node can directly and in real-time connect the output of one attribute to the input of another attribute, allowing data to flow automatically.

[0052] In one embodiment, when sampling the base coil using the pointOnCurveInfo node based on the distribution parameters of the skeletal nodes, the position of the pointOnCurveInfo node can be associated with the translate attribute of the corresponding skeletal node through the connectAttr node. This allows the pointOnCurveInfo node to calculate new position information corresponding to the associated position points of each skeletal node on the base coil in real time when the base coil moves or deforms. The new position information can then be connected to the translate attribute of the corresponding skeletal node. Thus, the skeletal node can be controlled to move based on the new position information in the translate attribute. This enables the position of the skeletal node to change in relation to the changes in the base coil. In this way, based on the base coil, convenient, efficient, and flexible motion control of the virtual object corresponding to the skeletal node can be achieved, thereby efficiently generating motion animations of the virtual object.

[0053] Optionally, the location points associated with the skeletal nodes can be control points in the base coil, which facilitates driving the skeletal nodes to perform associated movements when the base coil moves.

[0054] In a specific embodiment, taking a NURBS coil with 50 control points as the base coil and 50 skeletal nodes to be generated as an example, in Maya, a corresponding pointOnCurveInfo node can be created for each skeletal node. The pointOnCurveInfo node can then be used to attach the corresponding skeletal node to the base coil. The parameter of the pointOnCurveInfo node can adjust the position information of the skeletal node's associated position on the base coil. The worldspace of the base coil is input to the pointOnCurveInfo node. When the base coil deforms or moves, the pointOnCurveInfo node can automatically update the position information it reads in real time. Then, the position attribute can be associated with the translate attribute of the skeletal node. When the base coil deforms or moves, the new position information read by the pointOnCurveInfo node will be output to the skeletal node in real time, so that the position of the skeletal node changes in real time according to the changes in the base coil.

[0055] Optionally, the orientation of the bone nodes can also be controlled. For example, a tangent constraint node can be created to ensure that the value axis of the bone node is always aligned with the tangent of the base coil, so that the bone moves along the track like a train carriage, thereby enabling flexible control of the movement of the virtual object.

[0056] In one specific embodiment, the following script code can be used to create associated skeletal nodes for the base coil by executing a for loop:

[0057]

[0058]

[0059] In step 102, the corresponding virtual object is bound to the skeletal node.

[0060] Among these features, based on the needs of animation generation, corresponding virtual objects can be selected for each skeletal node and skinned.

[0061] Optionally, to facilitate efficient control of the shape of the base coil, a corresponding deformable coil can be created for the base coil. This allows for simultaneous adjustment of the shape of the base coil by changing the shape of the deformable coil. Specifically, a deformable coil can be created based on the base coil; the deformable coil and the base coil can be bound together using a wire deformer; and in response to the shape adjustment operation of the deformable coil, the shape of the base coil can be adjusted accordingly based on the wire deformer.

[0062] The deformable coil can be a coil used to change the shape of the base coil, and the shape adjustment operation can be an operation to adjust the shape of the deformable coil.

[0063] There are several ways to create a deformed coil based on a base coil. For example, the base coil can be copied to obtain a deformed coil corresponding to the base coil.

[0064] There are several ways to bind the deformable coil and the base coil using a wire deformer. For example, a wire deformer can be created in both the base coil and the deformable coil. By changing the shape of the deformable coil, the shape of the base coil can be altered. Based on the flexible shape change of the base coil, it is possible to adapt to the cyclic motion paths of various virtual objects and maximize the deformation of the cyclic path. Furthermore, the base coil does not have to be a perfect circle, and the cyclic motion path of the virtual object does not have to be a perfect circle. In addition, it can avoid the need to readjust other related data caused by directly adjusting the shape of the base coil. This allows for flexible and accurate control of the motion path of the virtual object when generating the object's motion animation, thereby improving the efficiency of animation generation.

[0065] In one embodiment, if the smoothness of the base coil is poor, curve reconstruction can be performed on the base coil. For example, curve reconstruction nodes can be created for the base coil. Based on the number of coil control points of the input curve reconstruction nodes and the curve geometry information of the base coil, curve reconstruction is performed on the base coil to smooth it.

[0066] The curve reconstruction node (rebuildCurve) can be a node used to recreate the curve, the number of coil control points can be the number of control points on the base coil being reconstructed, and the curve geometry information can be the geometric data of the base coil in the world coordinate system.

[0067] For example, a `rebuildCurve` node can be created for the base coil, and the number of control points and the curve geometry information of the base coil can be input into the `rebuildCurve` node. This allows the number of control points in the base coil to be changed through the `rebuildCurve` node, and curve smoothing can also be performed on the base coil. Optionally, the number of control points can be set to be the same as the number of skeleton nodes. When the motion path of the virtual object is not a perfect circle, the curve accuracy of the base coil can be smoothed using `rebuildCurve`. In this way, based on curve reconstruction of the base coil, flexible and precise control of the motion path of the virtual object can be achieved, thus enabling object motion animation with various virtual object motion paths.

[0068] In step 103, the base coil is controlled to move, thereby driving the skeletal nodes to move, which in turn drives the virtual object to move with the base coil, generating the object motion animation corresponding to the virtual object.

[0069] The object motion animation can be an animation in which a virtual object moves according to the movement of a base coil. The change in the position of the base coil can drive the virtual object to move. In the object motion animation, the base coil can be invisible. Therefore, based on the base coil, object motion animation with various motion paths can be realized. There is no need to create a large number of keyframes or design complex motion displacement formulas to determine the movement position of the virtual object. This greatly simplifies the production process of object motion animation, reduces the animation production time, and thus effectively improves the animation generation efficiency.

[0070] There are several ways to control the movement of the base coil to drive the movement of the skeletal nodes, thereby driving the virtual object to move with the base coil and generating the corresponding object motion animation. For example, the base coil can be controlled to move, and the new position information of the position points associated with each skeletal node can be determined when the base coil moves. Based on the association between the skeletal nodes and the base coil, as well as the new position information, the movement of the skeletal nodes can be controlled to drive the virtual object to move with the base coil and generate the corresponding object motion animation.

[0071] The relationship between the skeletal node and the base coil can refer to the relationship between the position information of the position point in the base coil and the position attribute of the skeletal node. When the position information of the position point changes, the new position information can be transmitted to the position attribute of the corresponding skeletal node based on this relationship. Thus, the skeletal node can be controlled to move based on the new position information in the position attribute.

[0072] When the basic coil moves, the new position information of the position points associated with the skeleton node can be calculated in real time through the pointOnCurveInfo node. Then, based on the association between the position property of the pointOnCurveInfo node and the translate property of the skeleton node, the new position information can be connected to the translate property of the corresponding skeleton node. Thus, the skeleton node can move based on the new position information, thereby driving the virtual object bound to the skeleton node to move.

[0073] Optionally, the basic coil can be controlled to move, thereby driving the skeletal nodes to move, and thus driving the virtual object to move with the basic coil. There are several other ways to generate the object motion animation corresponding to the virtual object. For example, a frame number indicator parameter can be obtained; based on the frame number indicator parameter, the basic coil can be controlled to rotate around a preset direction axis, thereby driving the skeletal nodes to rotate, and thus driving the virtual object to rotate with the basic coil, generating an object motion animation that indicates the cyclic movement of the virtual object.

[0074] The frame count parameter can be used to indicate the number of animation frames corresponding to one cycle of motion of a virtual object in the object's motion animation. The number of animation frames can include the start frame and the end frame of one cycle of motion. The preset direction axis can be the rotation axis of the base coil. The specific direction axis can be set according to actual needs, and this embodiment of the application does not limit it.

[0075] For example, the base coil can be controlled to rotate along the Y-axis, and the corresponding start and end frames can be set using the frame setting command (setKeyframe), thereby generating an object motion animation in which the virtual object moves in a loop around the Y-axis of the base coil.

[0076] Therefore, the animation generation method provided in this application embodiment can drive the skeletal nodes to move based on the shape control and motion control of the basic coil, thereby achieving flexible and accurate motion trajectory control of the virtual object. This allows for the convenient and efficient generation of object motion animations that describe the movement of the virtual object, effectively improving the generation efficiency of object motion animations.

[0077] In one embodiment, this application provides a Joint Motion Loop Tool for creating object motion animations that control virtual objects to perform cyclical motion. This tool can be used to load NURBS coils and make adjustments. For example, please refer to... Figure 3a , Figure 3aThis is a schematic diagram of the tool interface for an animation generation method provided in this application embodiment. In the tool interface of the skeletal loop animation tool, for field a, the "Attach" button is used to load the NURBS coil to be created, i.e., to obtain the base coil. For field b, "Joint Count" can be used to generate the required number of bone nodes on the base coil in real time. For field c, it is used to control the length of the loop bone. For field d, the "EditMode" button can be used to adjust the shape of the base coil, and the "Display Mode" button can be used to restore the preview state. For field e, "Span Count" can be used to increase or decrease the control points of the base coil in real time. For field f, "JointRadius" can be used to adjust the bone size in real time. For the automatic keyframe field, the required animation frame range can be entered, i.e., the start frame and end frame, and the "Create Loop Animation" button can be used to generate loop animation, i.e., object motion animation.

[0078] In the actual use of skeletal loop animation tools, for example, please refer to... Figure 3b , Figure 3b This is a schematic diagram illustrating the animation generation method provided in this application embodiment. The tool can be opened, and the "Attach" button can be clicked to load a base coil. The base coil can be a preset coil or a custom-created coil. Next, please continue to refer to... Figure 3b You can enter the desired number of bones in the "Joint Count" field, for example, 20. You can also set the number of coil control points to 200. The more control points, the smoother the base coils, and the more precise the motion trajectory of the controlled virtual object. Next, please refer to... Figure 3c , Figure 3c This is a schematic diagram of coil adjustment for an animation generation method provided in this application embodiment. Pressing the "Edit Mode" button allows you to begin adjusting the shape of the basic coil and matching the movement path of the virtual object. In this case, the loop path of the virtual object is approximately equal to a triangle. After adjustment, pressing the "Display Mode" button returns to preview mode. For example, please refer to... Figure 3d , Figure 3dThis is another animation generation diagram of an animation generation method provided in this application embodiment, where the shape of the basic coil is adjusted to a triangle. Furthermore, different viewing angles can be switched, and the number of bones, coil control points, etc., can be increased according to the actual situation to make the overall coil closer to the model mesh. Next, the start and end frames can be entered, which are 0 frames and 150 frames respectively. Then, the corresponding skeletal animation can be created by pressing the "Create Loop Animation" button.

[0079] In addition, please refer to Figure 3e , Figure 3e This is a schematic diagram of object binding for an animation generation method provided in this application embodiment, which can select the model of the corresponding virtual object for binding and skinning for the skeletal nodes. Then, please refer to... Figure 3f , Figure 3f This is another animation generation diagram of an animation generation method provided in this application embodiment. It can control the basic coil to rotate around the Y-axis and can also make minor rhythm adjustments to the animation to be generated. Thus, the "CreateLoop Animation" button can be used to generate an animation in which a virtual object moves in a loop based on the path determined by the basic coil.

[0080] In one embodiment, please refer to Figure 4 , Figure 4 This is a schematic diagram of an object motion animation provided by an embodiment of the present application. Assuming that the starting frame of the object motion animation to be generated is frame 0 and the ending frame is frame 150, the animation frames from frame 0 to frame 150 can be generated by the animation generation method provided by the embodiment of the present application, thereby obtaining the object motion animation.

[0081] In the fields of 3D animation and game production, besides character animation, element animation is also an indispensable artistic element. Currently, the creation of looping element animations (such as tracks, gear chains, etc.) mainly relies on two methods: keyframe creation and expression-driven methods. For the keyframe creation method, animators need to manually set rotation / displacement keyframes for each segment of the skeleton (for example, a single track animation requires over 200 keyframes), and repeatedly adjust the motion rhythm using a timeline curve editor. The expression-driven method requires writing Maya Embedded Language (MEL) or Python script expressions to control bone displacement, but this requires pre-defining precise mathematical formulas for the motion trajectory, demanding extremely high technical and artistic skills. It is evident that in the production of loop animations for 3D mechanical components (such as tracks and gear chains), existing technologies rely on manual keyframe adjustments frame by frame. A single track animation requires approximately 200 keyframes, accounting for more than 30% of the total animation production time. Furthermore, traditional path animation cannot dynamically respond to curve modifications, and adjusting the motion trajectory requires solving skeletal constraints, resulting in low iteration efficiency. Moreover, neither the current mainstream path animation nor methods such as expression-driven bone displacement can achieve fast and accurate skeletal linkage effects. In addition, most current skeletal animation solutions only support character bone reuse or object-level control, lacking a closed-loop synchronous control mechanism for rigid mechanical motion, leading to motion distortion. At the same time, the lack of bone generation and matrix cascade driving effects results in low efficiency in generating loop animations for components.

[0082] To address this, this application provides an automated loop animation generation method. It generates skeletal loop animation based on NURBS coils, and by adjusting the coil shape, other types of loop animations can be created, significantly shortening the production cycle of component animations and greatly improving their production flexibility. This eliminates repetitive keyframe operations in the production of mechanical component loop animations. Simultaneously, it can construct a real-time response architecture of NURBS curves-skeleton-drive matrix, achieving high-precision chain motion under single-parameter control. Specifically, the animation generation method provided in this application uses NURBS coils as skeleton generators. Skeletons can be created at the control points of the NURBS coils, and the spatial displacement information of the control points is associated with the position attributes of the skeleton nodes through the pointOnCurveInfo node, generating a circular skeleton. The control points on the base coil can drive the skeleton displacement in real time. Furthermore, the rebuildCurve node and wire deformer node in Maya are used to increase the variability of the shape of the base coil or the motion path of the virtual object, allowing the base coil to maintain the rotation of the motion path even when it is not a perfect circle. In addition, the skeleton displacement can be driven by rotating the base coil, achieving efficient and convenient generation of skeletal loop animations.

[0083] Therefore, based on the animation generation method provided in this application embodiment, innovation in the animation generation mechanism can be achieved. Using NURBS coils as a skeleton generator, corresponding skeleton nodes are created, and the coil world matrix is ​​connected to the skeleton displacement parent matrix, enabling real-time skeleton generation and driving displacement. During the generation process, the number of NURBS coil control points can be changed in real time to smooth the required animation accuracy. Furthermore, by changing the coil shape, different cyclic motion paths can be created. Moreover, based on the animation generation method provided in this application embodiment, innovation in the driving method can also be achieved. Traditional cyclic animations rely on keyframes or expressions, while this application embodiment triggers skeletal chain motion through the uniaxial rotation operation of a single coil, simplifying the process of cyclic animation for track and gear components and effectively reducing the workload of relevant technical personnel. In addition, based on the animation generation method provided in this application embodiment, innovation in application scenarios can also be achieved. The animation generation method provided in this application embodiment can be applied to cyclic animation of three-dimensional mechanical components, not limited to traditional character path animation. For example, it can be applied to the creation of animations such as track link rolling animation, gear meshing transmission systems, conveyor belts, and chain cyclic motion, greatly improving animation generation efficiency.

[0084] As described above, this embodiment of the application creates at least one skeletal node associated with a basic coil. The number of skeletal nodes is determined based on the number of virtual objects in the object motion animation to be generated. The position of the skeletal nodes is configured to change with the basic coil. Corresponding virtual objects are bound to the skeletal nodes. The basic coil is controlled to move, thereby driving the skeletal nodes to move, which in turn drives the virtual objects to move with the basic coil, generating object motion animations corresponding to the virtual objects. Therefore, by creating position-associated skeletal nodes with the basic coil, and controlling the movement of the basic coil to drive the associated virtual objects, object motion animations indicating the movement of virtual objects can be generated. This simplifies the object motion animation generation process, reduces animation generation time, and thus improves animation generation efficiency.

[0085] To better implement the above methods, embodiments of the present invention also provide an animation generation device, which can be integrated into an electronic device, such as a terminal or a server.

[0086] For example, such as Figure 5 The diagram shown is a structural schematic of an animation generation device provided in an embodiment of this application. The animation generation device may include a creation unit 201, a binding unit 202, and a generation unit 203, as follows:

[0087] Creation unit 201 is used to create at least one bone node associated with the base coil. The number of bone nodes is determined based on the number of virtual objects in the motion animation of the object to be generated. The position of the bone nodes is configured to change as the base coil changes.

[0088] Binding unit 202 is used to bind corresponding virtual objects to skeletal nodes;

[0089] The generation unit 203 is used to control the basic coil to move, thereby driving the skeletal nodes to move, and thus driving the virtual object to move with the basic coil, generating the object motion animation corresponding to the virtual object.

[0090] In some embodiments, the creation unit 201 is used for:

[0091] For each skeletal node to be generated, determine the distribution parameters corresponding to the skeletal node;

[0092] Create skeletal nodes and determine the location information of the associated points of the skeletal nodes on the base coil based on the distribution parameters;

[0093] The location information of the location point is associated with the location attributes of the skeletal node so that the skeletal node is associated with the base coil. The location attributes are used to control the position of the skeletal node.

[0094] In some embodiments, the above determination of the distribution parameters corresponding to the skeletal nodes is specifically used for:

[0095] Get the number of skeletal nodes to be generated;

[0096] The distribution parameters corresponding to the skeletal nodes are determined based on the number of skeletal nodes.

[0097] In some embodiments, the location information of the bone node-associated location points determined on the base coil based on the distribution parameters is specifically used for:

[0098] Create corresponding curve sampler nodes for the skeletal nodes;

[0099] Based on the distribution parameters and the curve geometry information of the base coil, the position information of the skeleton node associated with the position point on the base coil is calculated through the curve sampler node.

[0100] In some embodiments, the generating unit 203 is configured to:

[0101] Control the movement of the base coil and determine the new position information of the associated position points of each skeletal node when the base coil moves;

[0102] Based on the relationship between the skeletal nodes and the base coils, as well as the new position information, the movement of the skeletal nodes is controlled, thereby driving the virtual object to move with the base coils and generating the corresponding object motion animation.

[0103] In some embodiments, the generating unit 203 is configured to:

[0104] Get the frame count indicator parameter, which is used to indicate the number of animation frames corresponding to one loop of the virtual object in the object's motion animation;

[0105] Based on the frame rate indicator parameter, the base coil is controlled to rotate around a preset direction axis to drive the bone nodes to rotate, thereby driving the virtual object to rotate with the base coil and generating an object motion animation that indicates the cyclical motion of the virtual object.

[0106] In some embodiments, the animation generation apparatus further includes a deformation control unit, configured to:

[0107] Create deformable coils based on basic coils;

[0108] The deformed coil and the base coil are bonded together using a wire deformer;

[0109] In response to the shape adjustment operation of the deformed coil, the base coil is adjusted accordingly based on the wire deformer.

[0110] In some embodiments, the animation generation apparatus further includes a coil adjustment unit for:

[0111] Create curve reconstruction nodes for the base coil;

[0112] Based on the number of coil control points of the input curve reconstruction node and the curve geometry information of the base coil, the curve of the base coil is reconstructed to smooth the base coil.

[0113] In practice, each of the above units can be implemented as an independent entity or can be arbitrarily combined to be implemented as the same or several entities. For the specific implementation of each of the above units, please refer to the previous method embodiments, which will not be repeated here.

[0114] As described above, in this embodiment, the creation unit 201 creates at least one skeletal node associated with the basic coil. The number of skeletal nodes is determined based on the number of virtual objects in the object motion animation to be generated. The position of the skeletal nodes is configured to change with the basic coil. The binding unit 202 binds the corresponding virtual objects to the skeletal nodes. The generation unit 203 controls the basic coil to move, thereby driving the skeletal nodes to move, which in turn drives the virtual objects to move with the basic coil, generating the object motion animation corresponding to the virtual objects. Therefore, by creating position-associated skeletal nodes with the basic coil, and then controlling the movement of the basic coil to drive the associated virtual objects to move, object motion animations indicating the movement of virtual objects can be generated. This simplifies the object motion animation generation process, reduces animation generation time, and thus improves animation generation efficiency.

[0115] This application also provides an electronic device, such as... Figure 6 The diagram shows a schematic representation of the structure of an electronic device according to an embodiment of this application. This electronic device can be a terminal or a server. Specifically:

[0116] The electronic device 300 includes a processor 301 with one or more processing cores, a memory 302 with one or more computer-readable storage media, and a computer program stored in the memory 302 and executable on the processor. The processor 301 and the memory 302 are electrically connected. Those skilled in the art will understand that the electronic device structure shown in the figures does not constitute a limitation on the electronic device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0117] The processor 301 is the control center of the electronic device 300. It connects various parts of the electronic device 300 through various interfaces and lines. By running or loading software programs and / or modules stored in the memory 302, and calling data stored in the memory 302, it performs various functions of the electronic device 300 and processes data, thereby monitoring the electronic device 300 as a whole.

[0118] In this embodiment, the processor 301 in the electronic device 300 loads the instructions corresponding to the processes of one or more applications into the memory 302 according to the following steps, and the processor 301 runs the applications stored in the memory 302 to realize various functions:

[0119] Create at least one bone node associated with the base coil. The number of bone nodes is determined based on the number of virtual objects in the motion animation of the object to be generated. The position of the bone nodes is configured to change as the base coil changes.

[0120] Bind the corresponding virtual object to the skeletal node;

[0121] The basic coil is controlled to move, which in turn drives the skeletal nodes to move, thereby driving the virtual object to move with the basic coil and generating the corresponding object motion animation.

[0122] This solution involves creating at least one skeletal node associated with a base coil. The number of skeletal nodes is determined by the number of virtual objects in the object motion animation to be generated, and the position of the skeletal nodes is configured to change with the base coil. Corresponding virtual objects are then bound to the skeletal nodes. The base coil is controlled to move, thereby moving the skeletal nodes and driving the virtual objects to move with the base coil, generating object motion animations that indicate the movement of virtual objects. In this way, by creating position-associated skeletal nodes with the base coil, and controlling the movement of the base coil to drive the associated movement of the virtual objects bound to each skeletal node, object motion animations that indicate the movement of virtual objects can be generated. This simplifies the object motion animation generation process, reduces animation generation time, and thus improves animation generation efficiency.

[0123] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0124] Optional, such as Figure 6 As shown, the electronic device 300 also includes: a touch display screen 303, a radio frequency circuit 304, an audio circuit 305, an input unit 306, and a power supply 307. The processor 301 is electrically connected to the touch display screen 303, the radio frequency circuit 304, the audio circuit 305, the input unit 306, and the power supply 307. Those skilled in the art will understand that... Figure 6 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0125] The touch display screen 303 can be used to display a graphical user interface (GUI) and receive operation commands generated by the user interacting with the GUI. The touch display screen 303 may include a display panel and a touch panel. The display panel can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of the electronic device. These graphical user interfaces can be composed of graphics, text, icons, video, and any combination thereof. Optionally, the display panel can be configured using a liquid crystal display (LCD), organic light-emitting diode (OLED), or other similar technologies. The touch panel can be used to collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch panel), generate corresponding operation commands, and execute the corresponding program according to the operation commands. Optionally, the touch panel may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch location and the signal generated by the touch operation, transmitting the signal to the touch controller. The touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends it to the processor 301. It can also receive and execute commands from the processor 301. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it transmits the information to the processor 301 to determine the type of touch event. Subsequently, the processor 301 provides corresponding visual output on the display panel based on the type of touch event. In this embodiment, the touch panel and the display panel can be integrated into the touch display screen 303 to achieve input and output functions. However, in some embodiments, the touch panel and the touch display screen 303 can be implemented as two independent components to achieve input and output functions. That is, the touch display screen 303 can also be used as part of the input unit 306 to achieve input functions.

[0126] The radio frequency circuit 304 can be used to transmit and receive radio frequency signals to establish wireless communication with network devices or other electronic devices, and to transmit and receive signals with network devices or other electronic devices.

[0127] Audio circuitry 305 can be used to provide an audio interface between a user and an electronic device via a speaker and a microphone. Audio circuitry 305 converts received audio data into electrical signals, transmits them to the speaker, and the speaker converts them into sound signals for output. Conversely, the microphone converts collected sound signals into electrical signals, which are then received by audio circuitry 305, converted back into audio data, and then processed by processor 301 before being transmitted via radio frequency circuitry 304 to, for example, another electronic device, or output to memory 302 for further processing. Audio circuitry 305 may also include an earphone jack to facilitate communication between peripheral headphones and electronic devices.

[0128] The input unit 306 can be used to receive input numbers, characters, or user characteristic information (such as fingerprints, iris, facial information, etc.), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.

[0129] Power supply 307 is used to supply power to various components of electronic device 300. Optionally, power supply 307 can be logically connected to processor 301 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. Power supply 307 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0130] although Figure 6 As not shown in the diagram, the electronic device 300 may also include a camera, sensor, wireless fidelity module, Bluetooth module, etc., which will not be described in detail here.

[0131] In the above embodiments, the descriptions of each embodiment have different focuses. Parts not described in detail in a particular embodiment can be found in the relevant descriptions of other embodiments. It should be noted that the electronic device provided in this application embodiment and the animation generation method described above belong to the same concept; its specific implementation process is detailed in the above method embodiments and will not be repeated here.

[0132] As can be seen from the above, the electronic device provided in this application embodiment can create at least one skeletal node associated with the basic coil. The number of skeletal nodes is determined based on the number of virtual objects in the object motion animation to be generated, and the position of the skeletal nodes is configured to change with the change of the basic coil. The skeletal nodes are then bound to corresponding virtual objects. The basic coil is controlled to move, thereby driving the skeletal nodes to move, which in turn drives the virtual objects to move with the basic coil, generating an object motion animation corresponding to the virtual objects. Thus, by creating position-associated skeletal nodes with the basic coil, and thereby controlling the movement of the basic coil to drive the associated virtual objects to move, an object motion animation indicative of virtual object movement can be generated. This simplifies the object motion animation generation process, reduces animation generation time, and thus improves animation generation efficiency.

[0133] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by a computer program, or by a computer program controlling related hardware. The computer program can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0134] Therefore, embodiments of this application provide a computer-readable storage medium storing a computer program that can be loaded by a processor to execute the steps of any of the animation generation methods provided in embodiments of this application. For example, the computer program can execute the following steps:

[0135] Create at least one bone node associated with the base coil. The number of bone nodes is determined based on the number of virtual objects in the motion animation of the object to be generated. The position of the bone nodes is configured to change as the base coil changes.

[0136] Bind the corresponding virtual object to the skeletal node;

[0137] The basic coil is controlled to move, which in turn drives the skeletal nodes to move, thereby driving the virtual object to move with the basic coil and generating the corresponding object motion animation.

[0138] This solution involves creating at least one skeletal node associated with a base coil. The number of skeletal nodes is determined by the number of virtual objects in the object motion animation to be generated, and the position of the skeletal nodes is configured to change with the base coil. Corresponding virtual objects are then bound to the skeletal nodes. The base coil is controlled to move, thereby moving the skeletal nodes and driving the virtual objects to move with the base coil, generating object motion animations that indicate the movement of virtual objects. In this way, by creating position-associated skeletal nodes with the base coil, and controlling the movement of the base coil to drive the associated movement of the virtual objects bound to each skeletal node, object motion animations that indicate the movement of virtual objects can be generated. This simplifies the object motion animation generation process, reduces animation generation time, and thus improves animation generation efficiency.

[0139] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0140] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0141] Since the computer program stored in the computer-readable storage medium can execute the steps in any of the animation generation methods provided in the embodiments of this application, the beneficial effects that any of the animation generation methods provided in the embodiments of this application can achieve can be realized, as detailed in the preceding embodiments, and will not be repeated here.

[0142] According to one aspect of this application, a computer program product is provided, comprising a computer program stored in a computer-readable storage medium; when a processor of an electronic device reads the computer program from the computer-readable storage medium, the processor executes the computer program, causing the electronic device to perform the methods provided in the various optional implementations of the above embodiments.

[0143] The above provides a detailed description of an animation generation method, apparatus, storage medium, and electronic device provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. An animation generation method characterized by comprising: The method comprises the following steps: creating at least one skeleton node associated with the base loop for the base loop, the number of the skeleton nodes being determined based on the number of virtual objects in an object motion animation to be generated, the position of the skeleton nodes being configured to change with the change of the base loop; binding the corresponding virtual object to the skeleton node; controlling the base loop to move to drive the skeleton node to move, so as to drive the virtual object to move with the base loop, and generate the object motion animation corresponding to the virtual object.

2. The animation generation method of claim 1, wherein, The step of creating at least one skeleton node associated with the base loop for the base loop comprises the following steps: determining the distribution parameter corresponding to the skeleton node to be generated for each skeleton node; creating the skeleton node, and determining the position information of the position point associated with the skeleton node on the base loop based on the distribution parameter; associating the position information of the position point with the position attribute of the skeleton node to associate the skeleton node with the base loop, wherein the position attribute is an attribute used to control the position of the skeleton node.

3. The animation generation method of claim 2, wherein, The step of determining the distribution parameter corresponding to the skeleton node comprises the following steps: obtaining the number of skeleton nodes to be generated; determining the distribution parameter corresponding to the skeleton node based on the number of the skeleton nodes.

4. The animation generation method of claim 2, wherein, The step of determining the position information of the position point associated with the skeleton node on the base loop based on the distribution parameter comprises the following steps: creating a corresponding curve sampler node for the skeleton node; calculating the position information of the position point associated with the skeleton node on the base loop through the curve sampler node based on the distribution parameter and the curve geometric information of the base loop.

5. The animation generation method of claim 2, wherein, The step of controlling the base loop to move to drive the skeleton node to move, so as to drive the virtual object to move with the base loop, and generate the object motion animation corresponding to the virtual object comprises the following steps: controlling the base loop to move to determine the new position information of the position point associated with each skeleton node when the base loop moves; controlling the skeleton node to move based on the association relationship between the skeleton node and the base loop and the new position information, so as to drive the virtual object to move with the base loop, and generate the object motion animation corresponding to the virtual object.

6. The animation generation method of claim 1, wherein, The step of controlling the base loop to move to drive the skeleton node to move, so as to drive the virtual object to move with the base loop, and generate the object motion animation corresponding to the virtual object comprises the following steps: obtaining a frame number indication parameter, the frame number indication parameter being used to indicate the animation frame number corresponding to the cyclic motion of the virtual object in the object motion animation; controlling the base loop to rotate around a preset direction axis to drive the skeleton node to rotate, so as to drive the virtual object to rotate with the base loop, and generate the object motion animation indicating the cyclic motion of the virtual object based on the frame number indication parameter.

7. The animation generation method according to any one of claims 1 to 6, characterized by, The method further comprises the following steps: creating a deformation loop based on the base loop; binding the deformation loop and the base loop through a line deformer. In response to a shape adjustment operation on the deformed coil, the base coil is correspondingly adjusted in shape based on the wire deformer.

8. The animation generation method according to any one of claims 1 to 6, characterized by, Further comprising: creating a curve reconstruction node for the base coil; reconstructing a curve for the base coil based on an input number of coil control points of the curve reconstruction node and curve geometry information of the base coil to smooth the base coil.

9. An animation generation apparatus characterized by comprising: Comprising: a creating unit configured to create at least one skeleton node associated with the base coil for the base coil, a number of the skeleton nodes being determined based on a number of virtual objects in an object motion animation to be generated, and a position of the skeleton node being configured to change with a change of the base coil; a binding unit configured to bind a corresponding virtual object to the skeleton node; a generating unit configured to control the base coil to move to drive the virtual object to move with the base coil, and generate an object motion animation corresponding to the virtual object.

10. An electronic device, comprising: It comprises a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the method in any one of claims 1-8.

11. A computer readable storage medium, characterized in that, It comprises a computer program, and when the computer program runs on an electronic device, the computer program is used to make the electronic device execute the steps of the method in any one of claims 1-8.