Method, device, electronic equipment and computer program product for generating two-dimensional animation
Patent Information
- Application Number
- CN202610685155.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-18
- Publication Date
- 2026-08-18
AI Technical Summary
由于现有方案普遍依赖人工对每一帧中的对象位置、轮廓及姿态进行独立标定,导致终端在数据处理过程中需要存储和调用大量的关键帧数据文件
本公开示例实施方式的二维动画的生成方法中,通过获取针对目标对象设置的运动路径;确定针对目标对象设置的多个控制点,并将控制点绑定在运动路径上;基于运动参数控制控制点沿运动路径进行运动,以生成目标对象沿运动路径的二维运动动画。本公开示例实施方式中的二维动画的生成方法,提供了一种高效、精确且易于操作的动画生成方案,通过自动化绑定控制点和运动路径,并基于运动参数控制控制点沿运动路径进行运动,实现了高效、连续的二维动画生成,一方面,通过提供一致的制作、绑定标准,减少了人为制作可能产生的错误和调试时间,且能够实时进行参数的调整和迭代,允许制作人员通过参数化设置轻松实现动画效果的灵活调整;另一方面,极大地简化了动画制作流程,降低技术门槛,并且适用于复杂变形场景。
Smart Images

Figure CN122597604A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of animation production technology, and more specifically, to a method for generating two-dimensional animation, a device for generating two-dimensional animation, an electronic device, and a computer program product. Background Technology
[0002] In the field of computer graphics processing, the generation of path-based animations typically requires configuring trajectory coordinates and deformation parameters for moving objects frame by frame. Because existing solutions generally rely on manual calibration of the object's position, contour, and pose in each frame, the terminal needs to store and retrieve a large number of keyframe data files during data processing. In trajectory-based deformation animation generation scenarios, this method not only requires calculating a large number of spatial transformation matrices for each moving object, but is also prone to discontinuity in coordinates and deformation parameters between adjacent frames due to manual calibration errors. This causes additional computational load on the rendering engine during interpolation calculations, significantly increasing the computational pressure on the terminal processor and peak memory usage. Furthermore, when multiple layers or objects need to move collaboratively along the same trajectory simultaneously, frequent state switching and redundant position recalculations further exacerbate system resource consumption. Therefore, how to improve the generation efficiency and parameter accuracy of path-based motion animations while reducing the terminal's data processing pressure has become an urgent problem to be solved in current computer graphics processing technology.
[0003] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0004] The purpose of this disclosure is to provide a method for generating two-dimensional animation, a device for generating two-dimensional animation, an electronic device, and a computer program product, thereby simplifying the animation production process to at least a certain extent and generating animations efficiently and accurately.
[0005] According to a first aspect of this disclosure, a method for generating two-dimensional animation is provided, comprising: Identify the target art assets, which include the target object; Obtain the motion path set for the target object, wherein the motion path is used to represent the motion trajectory of the target object in the two-dimensional animation to be generated; Determine multiple control points set for the target object, and bind the control points to the motion path; Based on the motion parameters set for the target object, the control point is controlled to move along the motion path to generate a two-dimensional motion animation of the target object along the motion path.
[0006] According to a second aspect of this disclosure, an apparatus for generating two-dimensional animation is provided, comprising: The target object determination module is used to determine the target art material, which includes the target object; The motion path acquisition module is used to acquire the motion path set for the target object, wherein the motion path is used to represent the motion trajectory of the target object in the two-dimensional animation to be generated; The control point binding module is used to determine multiple control points set for the target object and bind the control points to the motion path; The motion animation generation module is used to control the control points to move along the motion path based on the motion parameters set for the target object, so as to generate a two-dimensional motion animation of the target object along the motion path.
[0007] According to a third aspect of this disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the method for generating a two-dimensional animation as described above by executing the executable instructions.
[0008] According to a fourth aspect of this disclosure, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the method for generating two-dimensional animation as described in any of the preceding claims.
[0009] The exemplary embodiments disclosed herein can have the following beneficial effects: In the two-dimensional animation generation method of the exemplary embodiments of this disclosure, a motion path set for a target object is obtained; multiple control points set for the target object are determined and bound to the motion path; and the control points are controlled to move along the motion path based on motion parameters to generate a two-dimensional motion animation of the target object along the motion path. The two-dimensional animation generation method in the exemplary embodiments of this disclosure provides an efficient, accurate, and easy-to-operate animation generation scheme. By automatically binding control points and motion paths and controlling the movement of control points along the motion path based on motion parameters, efficient and continuous two-dimensional animation generation is achieved. On the one hand, by providing consistent production and binding standards, errors and debugging time that may occur during manual production are reduced, and parameters can be adjusted and iterated in real time, allowing producers to easily and flexibly adjust animation effects through parameterized settings. On the other hand, it greatly simplifies the animation production process, lowers the technical threshold, and is applicable to complex deformation scenarios.
[0010] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0011] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
[0012] Figure 1 A flowchart illustrating a method for generating two-dimensional animation according to an exemplary embodiment of this disclosure is shown. Figure 2 A schematic diagram of generating a motion path according to a specific embodiment of the present disclosure is shown; Figure 3 A schematic diagram of generating control points according to a specific embodiment of the present disclosure is shown; Figure 4 A schematic diagram of the process of binding control points to a motion path is shown in an exemplary embodiment of this disclosure; Figure 5 A schematic diagram illustrating the movement of a control point along a motion path in an exemplary embodiment of this disclosure is shown. Figure 6 A schematic diagram showing the movement of a target object along a motion path according to a specific embodiment of the present disclosure is shown; Figure 7 A schematic diagram of a dynamically variable path shape according to a specific embodiment of the present disclosure is shown; Figure 8 A schematic diagram of a dynamically variable path shape according to another specific embodiment of the present disclosure is shown; Figure 9 A schematic diagram is shown illustrating multiple objects moving together along a path according to a specific embodiment of the present disclosure; Figure 10 A schematic diagram illustrating an application scenario of an animation generation method according to a specific embodiment of the present disclosure is shown; Figure 11 A block diagram of a two-dimensional animation generation apparatus according to an exemplary embodiment of the present disclosure is shown; Figure 12 A schematic diagram of the structure of a computer system suitable for implementing the embodiments of the present disclosure is shown. Detailed Implementation
[0013] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make this disclosure more comprehensive and complete, and to fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a full understanding of embodiments of this disclosure. However, those skilled in the art will recognize that the technical solutions of this disclosure can be practiced with one or more of the specific details omitted, or other methods, components, apparatus, steps, etc., can be employed. In other instances, well-known technical solutions are not shown or described in detail to avoid obscuring various aspects of this disclosure.
[0014] Furthermore, the accompanying drawings are merely illustrative of this disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0015] Table 1 shows the key properties and corresponding types of path animations:
[0016] Table 1
[0017] In some relevant embodiments, the technical solutions for animation production, as well as their applicability and limitations, are shown in Table 2:
[0018] Table 2
[0019] Among them, the BOA (Path Warp Plugin) and LoopFlow (Region Flow Plugin) solutions can solve about 60% of the types of cases, while the remaining types can be solved by using pins and pure animation.
[0020] However, the thumbtack creation method requires manually adding thumbtacks one by one to create the animation. This method is usually very labor-intensive, as a single object will generate a large number of keyframes. Furthermore, due to the inevitable errors in manual operation, it is difficult to achieve very fine results.
[0021] To address the aforementioned issues, this exemplary implementation first provides a method for generating two-dimensional animation. (Reference) Figure 1As shown, the above method for generating 2D animation may include the following steps: Step S110. Determine the target art assets, which include the target object.
[0022] Step S120. Obtain the motion path set for the target object, wherein the motion path is used to represent the motion trajectory of the target object in the two-dimensional animation to be generated.
[0023] Step S130. Determine multiple control points set for the target object and bind the control points to the motion path.
[0024] Step S140. Based on the motion parameters set for the target object, control points are controlled to move along the motion path to generate a two-dimensional motion animation of the target object along the motion path.
[0025] In the two-dimensional animation generation method of the exemplary embodiments of this disclosure, a motion path set for a target object is obtained; multiple control points set for the target object are determined and bound to the motion path; and the control points are controlled to move along the motion path based on motion parameters to generate a two-dimensional motion animation of the target object along the motion path. The two-dimensional animation generation method in the exemplary embodiments of this disclosure provides an efficient, accurate, and easy-to-operate animation generation scheme. By automatically binding control points and motion paths and controlling the movement of control points along the motion path based on motion parameters, efficient and continuous two-dimensional animation generation is achieved. On the one hand, by providing consistent production and binding standards, errors and debugging time that may occur during manual production are reduced, and parameters can be adjusted and iterated in real time, allowing producers to easily and flexibly adjust animation effects through parameterized settings. On the other hand, it greatly simplifies the animation production process, lowers the technical threshold, and is applicable to complex deformation scenarios.
[0026] Below, in conjunction with Figures 2 to 10 The steps described above in this example implementation will be explained in more detail.
[0027] In step S110, the target art material is determined, which includes the target object.
[0028] In this example implementation, the target art asset refers to the original image resource used to generate a 2D animation. It can be an image file or a graphic project containing multiple layers. This target art asset contains one or more target objects to be animated. A target object refers to a specific graphic element selected or identified within the target art asset that requires 2D animation processing. For example, in a character design sketch, a game character can be considered a target object; in a scene sketch, a tree or a vine can also be considered a target object. This target object is the main body of the animation, and its shape and movement will be the core content of the animation. In step S120, a motion path set for the target object is obtained, whereby the motion path is used to characterize the movement trajectory of the target object in the 2D animation to be generated.
[0029] In this example implementation, the motion path refers to a preset motion trajectory in a two-dimensional space, used to guide the direction and range of movement of the target object.
[0030] For example, you can use a tool called mask in Adobe After Effects (AE) to draw line paths and represent the trajectory of an object.
[0031] In a specific application scenario, it is necessary to generate an animation of vines moving and growing along their respective paths, based on pre-drawn vine assets. In this scenario, the vines are the target objects, and their movement paths are the paths along which the vines grow.
[0032] Figure 2 A schematic diagram of generating a motion path according to a specific embodiment of this disclosure is shown. A mask is drawn based on the desired vine movement trajectory, along which the vine will move. The motion path can be drawn manually according to animation requirements; it can be either an open or closed path. The mask-drawn path can serve as a medium for the next step of driving the animation with pins.
[0033] In step S130, multiple control points are determined for the target object and the control points are bound to the motion path.
[0034] In this example implementation, control points refer to anchor points set on the target object to associate with the motion path and drive the local or overall deformation of the target object. These control points can be bound to the motion path, and the movement of the control points can indirectly drive the target object to produce corresponding deformation and displacement, thereby achieving the animation effect.
[0035] Adding control points to a target object can be done manually by selecting and marking key areas of the object in graphic editing software. For example, for a "vine" target object that needs to move along a path, multiple control points can be evenly distributed on its stem.
[0036] For example, you can use the Thumbtack Tool (a tool built into After Effects that allows you to move the area where the thumbtack is located, essentially adding movable "joints" to the vine) to evenly add thumbtacks as control points along the shape of the object to control the movement of the target object.
[0037] In this example implementation, the initial distribution parameters and initial motion parameters of each control point can be automatically calculated and configured based on the geometric features of the target object and the path features of the motion path.
[0038] The geometric features of a target object refer to its geometric attributes, such as shape and size. For example, image analysis of target artwork can extract data such as its outline, skeleton, and keypoint coordinates to obtain the geometric features of the target object. The path features of a motion path can include attributes such as the path's length, curvature, direction, and speed variation trend. For example, the mathematical expression of the motion path can be analyzed to extract parameters such as its length, radius of curvature, and tangent direction; alternatively, its geometric attributes can be calculated by sampling and interpolating discrete points along the path.
[0039] Initial distribution parameters refer to the initial positions, relative spacing, weights, and other distribution parameters of control points on the target object. For example, control points can be distributed evenly or proportionally along the contour line of the target object, and their initial stretch range can be set. Initial motion parameters refer to the initial velocity, acceleration, phase, offset, etc., of the control points as they move along the motion path. For example, the initial velocity of the control points on the path can be automatically calculated based on the length of the motion path and the preset animation duration; or, the initial local offset of the control points on the path can be automatically adjusted based on the curvature changes of the motion path to adapt to the curvature of the path.
[0040] In this example implementation, by conducting in-depth analysis of the geometric features of the target object and the path features of its motion path, its attribute information is obtained. Based on these analysis results, the system can intelligently deduce the initial distribution parameters of each control point on the target object and the initial motion parameters along the motion path, thereby establishing a reasonable and efficient skeleton structure in the early stages of animation generation. This approach avoids the tedious manual adjustment process, not only improving the efficiency of 2D animation generation and reducing the professional skill requirements for operators, but also ensuring a more reasonable and accurate initial configuration of control points, laying the foundation for generating high-quality 2D animation.
[0041] Figure 3 The diagram illustrates the generation of control points according to a specific embodiment of this disclosure. The control points are evenly distributed on the vines, enabling them to move. This step can be manually drawn based on the direction of the material and the required animation precision, or the system can automatically calculate suitable initial distribution parameters based on the geometric features of the target object and the path features of the motion path, and then adjust them as needed.
[0042] In this example implementation, as Figure 4 As shown, binding control points to the motion path can specifically include the following steps: Step S410. In response to the control point binding command, dynamically sample the motion path and determine the nearest coordinate point from each control point to the motion path.
[0043] In this example implementation, responding to a control point binding command means the system receives a signal from the user or a preset program, instructing the system to begin binding control points to the motion path. Dynamic sampling refers to a sampling method where the sampling density adaptively adjusts according to different path lengths. For example, by calculating the distance from each control point to all sampling points on the motion path and selecting the sampling point with the smallest distance as the nearest coordinate point, it can be ensured that the control point is always attached to the point on the motion path that is geometrically closest to it. For example, the Euclidean distance calculation method can be used to directly calculate the straight-line distance between the control point and each sampling point on the path.
[0044] Step S420. Bind each control point to the nearest coordinate point corresponding to the motion path.
[0045] After determining the nearest coordinate point on the motion path for each control point, a logical binding relationship can be established between the control point and that nearest coordinate point. This binding can manifest as the control point's position directly referencing the nearest coordinate point, or the control point maintaining a fixed local offset relative to the nearest coordinate point. For example, the control point's position can be set to the position of the nearest coordinate point, or the control point's position can be set to the nearest coordinate point plus a preset local offset vector, allowing the control point to synchronously adjust its position as the motion path deforms or moves.
[0046] For example, after calculating the coordinates of the nearest point on the path, the coordinates of the nearest point can be converted to relative path coordinates by transforming two coordinate systems: the relative coordinates on the path and the spatial coordinates of the entire screen. For example, the starting point of the path might be 0, the ending point 1, and the intermediate points 0.5. The relative coordinates are fixed, while the spatial coordinates are dynamically updated as the mask path changes.
[0047] This dynamic binding mechanism ensures that even when the motion path itself deforms, moves, or the target object performs complex movements on the path, the control points can always accurately follow the local features of the motion path. This enables smooth, accurate, and deformable motion animation of the target object along the motion path, significantly improving the realism and visual effects of the animation.
[0048] In this example implementation, multiple sets of control points can be added to the target object, with each set of control points corresponding to a local area of the target object; for each set of control points, the control points are bound to a motion path, wherein the motion paths bound to each set of control points are different path segments of the same motion path or different motion paths.
[0049] The target object can be divided into several independent regions, such as a character's head, torso, and limbs. Each region is assigned a dedicated set of control points. By grouping these control points, independent control and fine-tuning of different regions of the target object can be achieved. This approach allows for independent animation design and adjustment of specific parts of the target object, resulting in richer and more natural animation effects. Binding control points to motion paths means that different control point groups can be independently associated with the motion path. Through grouping and binding, it can be ensured that the movement of each local region can be independent of other regions, or respond to the motion path in different ways.
[0050] The motion paths bound to each group of control points can be different segments of the same motion path or different motion paths, providing two flexible binding methods. Different segments of the same motion path refer to situations where the main body of the target object may move along a main motion path, while its local areas (such as a swinging arm) move relative to each other along sub-path segments on that main motion path. Different motion paths refer to situations where different local areas of the target object can be bound to their respective motion paths completely independently.
[0051] By employing the aforementioned technical solution, the target object is decomposed into multiple local regions, and an independent set of control points is set for each region. These control point sets are then allowed to be bound to different path segments of the same motion path or different motion paths, greatly enhancing the flexibility and expressiveness of 2D animation generation. This approach enables fine-grained control over each local region of the target object, achieving complex local movements and deformations. The resulting 2D animation is more vivid and natural, significantly improving the efficiency and quality of animation production.
[0052] In step S140, based on the motion parameters set for the target object, the control points are controlled to move along the motion path to generate a two-dimensional motion animation of the target object along the motion path.
[0053] In this example implementation, motion parameters refer to a series of numerical values or attributes used to describe the motion characteristics of the target object, such as velocity, acceleration, and duration. These parameters determine the specific manifestation of the target object's motion along the motion path. By adjusting these motion parameters, the rhythm and deformation effects of the target object's motion in the animation can be precisely controlled. Two-dimensional motion animation refers to the final generated visual sequence of frames or video used to demonstrate the displacement and deformation of the target object along the motion path.
[0054] Motion parameters can be obtained by the user manually inputting values in the interface, such as setting a fixed motion speed or a duration. Based on these motion parameters, the position of each control point along the motion path at different time points can be calculated. Thus, when the control point moves along the motion path, because it is bound to the target object, the target object will deform or move accordingly, ultimately forming a motion animation.
[0055] In this example implementation, as Figure 5 As shown, based on the motion parameters set for the target object, the control point is controlled to move along the motion path, which may specifically include the following steps: Step S510. Determine the geometric parameters of the motion path.
[0056] The geometric parameters of a motion path can include the total path length, which refers to the actual geometric length of the motion path from the starting point to the ending point.
[0057] In this example implementation, the total length of the motion path can be determined by the Bézier curve length estimation algorithm, or it can be obtained in other ways. For example, the path can be discretized into multiple small line segments, and then the lengths of these line segments can be summed to estimate the path length.
[0058] The Bézier curve length estimation algorithm is a mathematical method for calculating or approximating the total length of a Bézier curve. The algorithm aims to provide a reliable and efficient means to obtain accurate length information for complex curve paths. Implementation methods can include, but are not limited to: using numerical integration methods to obtain high-precision arc lengths by integrating over the curve's parameter domain; or using adaptive subdivision methods to recursively subdivide the Bézier curve into multiple small segments until each segment can be approximated as a straight line segment, and then summing the lengths of these straight line segments. Alternatively, it can be approximated by discretizing the Bézier curve into a sufficiently dense set of points and then calculating the sum of the lengths of the line segments between these points.
[0059] Step S520. Based on the geometric parameters of the motion path, determine the position information of each control point on the motion path. The position information includes the starting position, the ending position, and the relative position.
[0060] The starting position can refer to the initial point on the path where the control point begins its movement, such as the beginning or end of the path, or a specific percentage point on the path. The ending position can refer to the final point on the path where the control point ends its movement, such as the end of the path. Relative position refers to the offset of a control point on the path relative to a reference point (such as the starting position), or the relative distance between control points on the path. Relative position can be expressed as the ratio of the arc length parameter to the total path length, typically between 0 and 1. This positional information collectively defines the range and proportional relationship of the control point's movement on the path, allowing the animation system to independently manage the movement of each control point on the path, thereby achieving more refined animation effects.
[0061] For example, based on the previously obtained coordinates of the nearest point and path length data, the AE expression can be used to calculate and locate parameters such as the start and end points of the path, and the relative positions of points on the path. For instance, the start position of the first control point can be set to 0% of the total path length, and the end position can be set to 80% of the total path length; the start position of the second control point can be set to 20% of the total path length, and the end position can be set to 100% of the total path length; at the same time, the second control point can be set to always maintain a relative position of 20% of the path length relative to the first control point.
[0062] Step S530. Based on the motion parameters and position information, control the control point to move along the motion path.
[0063] In this example implementation, the offset position of the nearest coordinate point of the control point in each frame on the motion path can be calculated based on motion parameters and position information, and the control point can be controlled to move along the motion path based on the offset position.
[0064] Based on the motion parameters and the relative positions of the control points, the arc length of the control point on the path in each frame can be calculated. This arc length is then converted into three-dimensional coordinates on the path as offset positions. Once these offset positions are determined, the control points can be controlled to move along the motion path based on these offset positions. This control method ensures that the target object's motion in each frame accurately follows the preset motion path and motion parameters.
[0065] For example, each pin point can be associated with the coordinates of the nearest point on the path, and then the offset position of each point coordinate on the path can be dynamically calculated using AE expressions to achieve the function of moving along the path.
[0066] Through the above technical solution, the total length of the motion path can be accurately obtained during the animation generation process. Based on this length and the nearest coordinates of the control point on the path, the starting point, ending point, and relative position information of each control point on the path can be determined. This refined position management enables the dynamic calculation of the precise offset position of each frame when controlling the movement of control points based on motion parameters. This solves the problem of how to accurately control the movement of each control point on the target object under complex motion paths to achieve smooth, coordinated, and controllable animation effects.
[0067] Figure 6 A schematic diagram illustrating the movement of a target object along a motion path according to a specific embodiment of this disclosure is shown. All pins are automatically attached to a mask, allowing the pins to move as a whole along the mask, ultimately achieving the effect of vines moving along the mask, producing natural deformation. Furthermore, the movement trajectory can be dynamically changed by adjusting the mask.
[0068] Figure 7 and Figure 8 A schematic diagram of a dynamically variable path shape according to a specific embodiment of the present disclosure is shown. The path shape can be adjusted according to the type of target object or other requirements.
[0069] In this example implementation, when each set of control points corresponds to a local area of the target object, each set of control points can be controlled to move along the bound motion path to generate a local motion animation of the target object along the corresponding motion path.
[0070] When each set of control points controls a local area of the target object, the system can independently control the motion of different control point groups on the target object. Each set of control points can have independent motion parameters, motion trajectories, or motion laws, without being directly affected by other control point groups. By independently controlling the motion of each set of control points, an animation effect is ultimately produced in a local area of the target object. Local motion animation can include deformation, rotation, scaling, or translation, allowing different parts of the target object to move independently and hierarchically.
[0071] In this example implementation, the motion parameters of the target object can also be adjusted using visual parameter controls. A visual parameter control is a graphical user interface element that presents adjustable parameters in an intuitive and easy-to-understand way, allowing users to modify parameter values by directly manipulating these interface elements. For example, a visual parameter control could be a slider, which users drag to change values, thereby adjusting motion parameters; it could also be an input box, where users can directly enter values to set motion parameters; it could be a curve editor, where users can draw or modify curves to define how motion parameters change over time; or it could be a drop-down menu, providing preset motion parameter options for users to choose from. Its purpose is to visualize abstract motion parameters, lower the barrier to user operation, and improve the efficiency and accuracy of parameter adjustment.
[0072] The visual parameter control includes adjustable controls for parameters such as stretch start point, stretch end point, global offset, and individual pin offsets. By dragging these sliders or entering values, users can easily adjust the overall movement speed of the vine, its start and end positions, the degree of local stretching, and the fine-tuning offset of each pin. This allows for flexible control and precise adjustment of animation effects such as vine growth and swaying. For example, adjusting the stretch start point and stretch end point parameters can simulate the effect of a vine growing from a certain point and gradually extending; adjusting the global offset controls the overall position of the vine on the path; and the pin offset allows for fine-tuning of the vine's local shape.
[0073] Visual parameter controls can link animation data with the movement of thumbtacks, allowing animators to achieve fine and dynamic control over the overall movement, local deformation, and stretching effect of the vine by adjusting a few parameters such as the stretching start point, stretching end point, global offset, and the offset of each thumbtack, without having to manually adjust a large number of keyframes.
[0074] In addition, a brand-new binding and operation method can be adopted, which greatly simplifies the workload and allows for direct parameter adjustment. Specific operation controls include, for example, independent pin control, creation of location markers, and snapping to a path.
[0075] In this example implementation, the distribution parameters of the control points on the target object can also be adjusted, including at least one of the following steps: adjusting the stretching start point and stretching end point corresponding to the control points to limit the effective deformation range of the target object on the motion path; adjusting the global offset corresponding to the control points to synchronously control the overall translational position of the target object on the motion path; and adjusting the local offset corresponding to each control point to adjust the local shape of the target object.
[0076] Adjusting the distribution parameters of control points on a target object refers to changing attributes such as the relative position, density, spacing, or weight of the control points on the object's geometry. These parameters directly affect the control range and intensity of the control points over local areas of the target object. By adjusting the relative position or distribution parameters of these control points within the target object, deformation or positional changes in the object's geometry can be driven.
[0077] Adjusting the stretching start and end points corresponding to the control points limits the effective deformation range of the target object along the motion path. This aims to precisely control the range of deformation of the target object along the motion path by setting specific start and end points. For example, it can be set that the target object only begins to stretch or compress within a specific segment of the motion path, while maintaining its original shape or undergoing other types of deformation in other segments.
[0078] For example, when the distribution parameters of the control points on the target object are adjusted to be spread out in the direction of movement, the target object will be stretched accordingly; when the control points are moved closer together in the direction of movement, the target object will be compressed accordingly. This mechanism allows the deformation of the target object to be closely integrated with the movement of the motion path, realizing synchronous control of deformation and motion, thereby giving the target object rich dynamic deformation capabilities while maintaining its movement along a preset path.
[0079] Adjusting the global offset corresponding to the control point allows for synchronized control of the overall translational position of the target object along the motion path. This enables unified and synchronized adjustment of the target object's overall position along the motion path. For example, if the target object has already moved along the motion path, increasing or decreasing a uniform offset value can move it forward or backward without altering its relative deformation or orientation along the path.
[0080] Adjusting the local offsets corresponding to each control point allows for fine-tuning of the shape of specific local areas of the target object. For example, when the target object moves along a motion path, an independent offset can be applied to a specific control point or a group of control points, causing its position on the motion path to be slightly adjusted relative to other control points, thereby achieving effects such as deformation and distortion of local areas of the target object.
[0081] In this example implementation, by introducing adjustments to the control point distribution parameters, the expressiveness and fine-grained control of the animation are further enhanced based on the 2D animation generation method. When a target object is bound to a motion path and driven by control points, relying solely on the motion path and motion parameters may result in stiff or unnatural deformation and posture. By adjusting the distribution parameters of the control points on the target object, a deeper level of control over the object's deformation behavior can be achieved. These adjustment mechanisms work together to comprehensively control the animation effect of the target object from the overall perspective to the local level, thereby generating more artistic and realistic 2D motion animations.
[0082] In this example implementation, in addition to controlling the movement of a single object along a path, a function was developed to allow multiple objects to move together along a path, in order to solve the problem of group animation (such as flocks of birds, crowds, schools of fish, etc.). Its implementation principle is similar to that of a single source material, mainly requiring the conversion of controlling a thumbtack point into controlling multiple objects.
[0083] In this example implementation, target objects on different layers can also be identified, and control points corresponding to the target objects on each layer can be bound to the same motion path.
[0084] In animation production environments, individual target objects that constitute an animation scene—such as different characters, props, or background elements—can be placed on independent logical layers. Layers, as a common graphical organization method, allow animators to independently manage, edit, and render each target object without affecting objects on other layers. Building upon this layered approach, the control points added to target objects on each layer are no longer independently bound to different motion paths, but are uniformly bound to the same predefined motion path. When the control points of multiple target objects are bound to the same motion path, it means that these target objects will share the same motion trajectory.
[0085] Figure 9This diagram illustrates multiple objects moving together along a path according to a specific embodiment of the present disclosure. By drawing different target objects on different layers, independent management and editing of each target object are achieved, thus avoiding mutual interference between objects. Furthermore, by uniformly binding the control points corresponding to these target objects on different layers to the same motion path, multiple target objects can share the same motion trajectory. When the motion path is driven, all control points bound to it will move synchronously along the path, thereby animateing their respective target objects. This mechanism ensures a high degree of consistency and synchronization among multiple target objects during movement, greatly simplifies the animation setup process for multi-object collaborative motion, significantly improves animation production efficiency, and effectively avoids motion asynchrony problems caused by inconsistent paths.
[0086] Figure 10 The illustration shows an application scenario of the animation generation method according to a specific embodiment of the present disclosure. The animation generation method in this example embodiment can be applied to scenarios such as vines climbing and growing along a path, tentacles swaying, chains swaying, light flowing and passing through, flocks of birds, and schools of fish moving along a route.
[0087] In addition, more intelligent processing can be adopted to optimize efficiency and minimize manual operation, including: one-click binding, which encapsulates complex algorithms into simple operations; real-time preview, which uses visual marking to assist in adjustment; and intelligent default values, which automatically calculate reasonable initial parameters.
[0088] In practical applications, manually creating animations involves adjusting dozens to hundreds of keyframes, typically taking 30-60 minutes to complete a project. However, the automated binding animation generation method in this example, through parameterized adjustments, can control the number of keyframes to around 3-5, typically completing a project in 1-2 minutes, improving efficiency by over 90%.
[0089] Based on the above solution, combined with the other two technical solutions, it can basically cover all path animation production scenarios. The specific application scope of each solution is shown in Table 3:
[0090] Table 3
[0091] Ultimately, the three technical solutions can basically cover all path-related dynamic scenarios, forming a comprehensive, efficient, and easy-to-use technical solution and process.
[0092] It should be noted that although the steps of the method in this disclosure are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or a step may be broken down into multiple steps.
[0093] Furthermore, this disclosure also provides an apparatus for generating two-dimensional animation. (See reference) Figure 11 As shown, the device for generating the 2D animation may include a target object determination module 1110, a motion path acquisition module 1120, a control point binding module 1130, and a motion animation generation module 1140. Wherein: The target object determination module 1110 can be used to determine the target art material, which includes the target object; The motion path acquisition module 1120 can be used to acquire the motion path set for the target object, wherein the motion path is used to represent the motion trajectory of the target object in the two-dimensional animation to be generated; The control point binding module 1130 can be used to determine multiple control points set for a target object and bind the control points to the motion path; The motion animation generation module 1140 can be used to control the control points to move along the motion path based on the motion parameters set for the target object, so as to generate a two-dimensional motion animation of the target object along the motion path.
[0094] The specific details of each module in the above-mentioned two-dimensional animation generation device have been described in detail in the corresponding method embodiment section, and will not be repeated here.
[0095] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to exemplary embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0096] Figure 12 A schematic diagram of the structure of a computer system suitable for implementing the embodiments of the present disclosure is shown.
[0097] It should be noted that, Figure 12 The computer system 1200 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.
[0098] like Figure 12As shown, the computer system 1200 includes a central processing unit (CPU) 1201, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 1202 or programs loaded from storage section 1208 into random access memory (RAM) 1203. The RAM 1203 also stores various programs and data required for system operation. The CPU 1201, ROM 1202, and RAM 1203 are interconnected via a bus 1204. An input / output (I / O) interface 1205 is also connected to the bus 1204.
[0099] The following components are connected to I / O interface 1205: an input section 1206 including a keyboard, mouse, etc.; an output section 1207 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 1208 including a hard disk, etc.; and a communication section 1209 including a network interface card such as a LAN card, modem, etc. The communication section 1209 performs communication processing via a network such as the Internet. A drive 1210 is also connected to I / O interface 1205 as needed. Removable media 1211, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 1210 as needed so that computer programs read from them can be installed into storage section 1208 as needed.
[0100] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 1209, and / or installed from removable medium 1211. When the computer program is executed by central processing unit (CPU) 1201, it performs various functions defined in the system of this disclosure.
[0101] Exemplary embodiments of this disclosure also provide a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the above-described method for generating two-dimensional animation.
[0102] In one implementation, the computer program product can be a tangible product containing a computer program, such as a computer-readable storage medium storing the computer program. The readable storage medium can be a storage medium based on electrical, magnetic, optical, electromagnetic, infrared, or other signals, including but not limited to: random access memory (RAM), read-only memory (ROM), magnetic tape, floppy disk, flash memory, hard disk drive (HDD), solid-state drive (SSD), etc. For example, the computer program product can be implemented as a non-volatile storage medium storing a computer program, such as read-only memory, NAND flash memory, etc.
[0103] In one implementation, the computer program product can be an intangible product containing a computer program. For example, the computer program product can be implemented as a virtual digital product, such as an executable file, installation package, or other digital file storing the computer program.
[0104] Computer program code can be written in one or more programming languages. Examples of programming languages include C, Java, and C++. Program code can execute entirely on the user's computing device, partially on the user's computing device, or as a standalone software package. It can also execute partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, such as a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via an internet connection provided by a mobile network operator).
[0105] Computer programs can be carried or transmitted via signals such as electricity, magnetism, light, electromagnetic fields, and infrared radiation. Electronic devices can convert the signals carrying computer programs into digital signals, thereby running the computer programs. When a computer program runs on an electronic device, its code is used to cause the electronic device to execute (more specifically, to execute) the method steps of various exemplary embodiments of this disclosure, such as the method for generating two-dimensional animation described above.
[0106] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0107] It should be noted that although several modules for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules described above can be embodied in one module. Conversely, the features and functions of one module described above can be further divided and embodied by multiple modules.
[0108] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein.
[0109] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A method for generating two-dimensional animation, characterized in that, include: Identify the target art assets, which include the target object; Obtain the motion path set for the target object, wherein the motion path is used to represent the motion trajectory of the target object in the two-dimensional animation to be generated; Determine multiple control points set for the target object, and bind the control points to the motion path; Based on the motion parameters set for the target object, the control point is controlled to move along the motion path to generate a two-dimensional motion animation of the target object along the motion path.
2. The method for generating two-dimensional animation according to claim 1, characterized in that, The step of binding the control point to the motion path includes: In response to a control point binding command, the motion path is dynamically sampled, and the nearest coordinate point from each control point to the motion path is determined; Each control point is bound to the nearest coordinate point corresponding to the motion path.
3. The method for generating two-dimensional animation according to claim 1, characterized in that, The step of controlling the control point to move along the motion path based on motion parameters set for the target object includes: Determine the geometric parameters of the motion path; Based on the geometric parameters of the motion path, the position information of each control point on the motion path is determined, and the position information includes the starting position, the ending position, and the relative position. Based on the motion parameters and the position information, the control point is controlled to move along the motion path.
4. The method for generating two-dimensional animation according to claim 3, characterized in that, The step of controlling the control point to move along the motion path based on the motion parameters and the position information includes: The offset position of the nearest coordinate point corresponding to the control point in each frame on the motion path is calculated based on the motion parameters and the position information, and the control point is controlled to move along the motion path based on the offset position.
5. The method for generating two-dimensional animation according to claim 1, characterized in that, The step of determining multiple control points set for the target object and binding the control points to the motion path includes: Multiple sets of control points are added to the target object, and each set of control points corresponds to a local area of the target object. For each group of control points, the control points are bound to the motion path, wherein the motion path bound to each group of control points is a different segment of the same motion path or a different motion path.
6. The method for generating two-dimensional animation according to claim 5, characterized in that, The process of controlling the control point to move along the motion path to generate a two-dimensional motion animation of the target object along the motion path includes: Each group of control points is controlled to move along the bound motion path to generate a local motion animation of the target object along the corresponding motion path.
7. The method for generating two-dimensional animation according to claim 1, characterized in that, The method further includes: Adjust the distribution parameters of the control points on the target object; Adjusting the distribution parameters of the control points on the target object includes at least one of the following steps: Adjust the stretching start point and stretching end point corresponding to the control point to limit the effective deformation range of the target object on the motion path; Adjust the global offset corresponding to the control point to synchronously control the overall translational position of the target object on the motion path; Adjust the local offset corresponding to each of the control points to adjust the local shape of the target object.
8. The method for generating two-dimensional animation according to claim 1, characterized in that, The method further includes: Identify target objects on different layers, and bind the control points corresponding to the target objects on each layer to the same motion path.
9. The method for generating two-dimensional animation according to claim 1, characterized in that, The method further includes: Based on the geometric features of the target object and the path features of the motion path, the initial distribution parameters and initial motion parameters of each control point are automatically calculated and configured.
10. A device for generating two-dimensional animation, characterized in that, include: The target object determination module is used to determine the target art material, which includes the target object; The motion path acquisition module is used to acquire the motion path set for the target object, wherein the motion path is used to represent the motion trajectory of the target object in the two-dimensional animation to be generated; The control point binding module is used to determine multiple control points set for the target object and bind the control points to the motion path; The motion animation generation module is used to control the control points to move along the motion path based on the motion parameters set for the target object, so as to generate a two-dimensional motion animation of the target object along the motion path.
11. An electronic device, characterized in that, include: processor; as well as A memory for storing one or more programs that, when executed by the processor, cause the processor to implement the method for generating two-dimensional animation as described in any one of claims 1 to 9.
12. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method for generating two-dimensional animation as described in any one of claims 1 to 9.