Animation playing method and device, medium and product

By building a physical baking animation curve production pipeline, the object motion data calculated in real time by the physics engine is converted into callable prefabricated animation curve resources, which solves the problems of precise controllability and physical credibility of object state backtracking in game level design, and realizes efficient animation playback and time backtracking.

CN120612403APending Publication Date: 2025-09-09SHANGHAI MIHA YOUHAIYUANCHENG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510693802.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-27
Publication Date
2025-09-09

AI Technical Summary

Technical Problem

In game level design, existing technologies cannot simultaneously meet the precise controllability of object state backtracking and the physical credibility of motion trajectories, resulting in a loss of both development efficiency and dynamic performance.

Method used

By building a physical baking animation curve production pipeline, the object motion data calculated in real time by the physics engine is converted into prefabricated animation curve resources that can be directly called in the editor. By combining the non-displacement attribute control logic of the original animation clip with the animation curve data generated by the physical simulation, high-precision animation playback and time retracing can be achieved.

Benefits of technology

It improves the accuracy and traceability of animation playback, maintains the integrity of animation visual performance, optimizes resource utilization efficiency, and significantly improves development efficiency and the system's adaptability to complex physical scenes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120612403A_ABST
    Figure CN120612403A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to the technical field of computers, and discloses an animation playing method and device, a medium and a product. The method comprises the following steps: determining a driving mode of a target object; the driving mode at least comprises a driving mode based on animation curve resources, the animation curve resources comprise original animation segments and animation curve data, and the animation curve data are generated through pre-conversion of a real-time simulation process of a physical engine; and carrying out animation playing according to the driving mode. The technical problem that development efficiency and dynamic performance cannot be achieved at the same time in related technologies can be solved at least.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to an animation playback method, device, medium, and product. Background Art

[0002] In modern game design, time rewinding is widely used in puzzle-solving and narrative scenarios. The core mechanic of this gameplay is to manipulate the timeline to change the state of objects, thereby affecting the game's progression. Typical manifestations of this gameplay include reversing object animations and moving backward along historical motion paths.

[0003] The inventors discovered that the related art presents at least the following technical issues: In game level design, object state backtracking requires a balance between precise controllability of the object's motion path and the physical plausibility of the trajectory. However, traditional solutions based on the related art fail to simultaneously meet the requirements for physical realism, precise path control, and agile development efficiency, resulting in a technical dilemma of achieving both development efficiency and dynamic performance. Summary of the Invention

[0004] One purpose of the present application is to provide an animation playback method, device, medium and product, at least to solve the technical problem in related technologies that development efficiency and dynamic performance cannot be achieved at the same time.

[0005] To achieve the above objectives, some embodiments of the present application provide the following aspects:

[0006] In a first aspect, some embodiments of the present application also provide an animation playback method, which includes: determining a driving mode of a target object; the driving mode includes at least a driving mode based on an animation curve resource, the animation curve resource includes original animation clips and animation curve data, and the animation curve data is pre-converted and generated through a real-time simulation process of a physical engine; and animation playback is performed according to the driving mode.

[0007] In a second aspect, some embodiments of the present application further provide an electronic device comprising: one or more processors; and a memory storing computer program instructions, wherein the computer program instructions, when executed, cause the processor to perform the steps of the method described above.

[0008] In a third aspect, some embodiments of the present application further provide a computer-readable medium having computer program instructions stored thereon, wherein the computer program instructions can be executed by a processor to implement the method described above.

[0009] In a fourth aspect, some embodiments of the present application further provide a computer program product, comprising a computer program / instruction, which implements the steps of the above-described method when executed by a processor.

[0010] Compared to related technologies, the solution provided in the embodiments of this application builds a physics-baked animation curve production pipeline. Through the innovative method of "real-time physics simulation recording-animation resource conversion," the object motion data calculated in real time by the physics engine is converted into prefabricated animation curve resources that can be directly called in the editor. On this basis, this application implements a drive mode based on animation curve resources by determining the drive mode of the target object. It combines the non-displacement property control logic of the original animation clip with the animation curve data generated by the physical simulation, successfully decoupling the displacement and non-displacement animation control. During animation playback, the animation curve data accurately drives the position and orientation of the target object, eliminating random deviations from real-time physics calculations and ensuring path accuracy and physical realism. The original animation clip maintains the non-displacement properties of the target object, such as skeletal animation and material changes, to ensure the integrity of the animation visual performance. In addition, this solution supports time retracing, significantly improving the accuracy and traceability of animation playback while maintaining compatibility with traditional animation processes. After the designer modifies the animation, they only need to re-record and export the resource file, and the system will automatically update it without the need for secondary adjustment of instance data, significantly improving development efficiency. Moreover, while ensuring the quality of animation, this application can enhance the system's adaptability to complex physical scenes, optimize resource utilization efficiency, and effectively solve the technical problem of separating animation production and physical simulation in traditional animation development. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] One or more embodiments are exemplarily illustrated by pictures in the corresponding drawings. These exemplifications do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings are represented as similar elements. Unless otherwise stated, the figures in the drawings do not constitute proportional limitations.

[0012] Figure 1 An exemplary flow chart of an animation playback method provided in some embodiments of the present application;

[0013] Figure 2 An exemplary flow chart of the target object creation in an animation playback method provided in some embodiments of the present application;

[0014] Figure 3 An exemplary flow chart for determining a driving mode of a target object in an animation playback method provided in some embodiments of the present application;

[0015] Figure 4 An exemplary flow chart of target object loading and animation data processing in an animation playback method provided in some embodiments of the present application;

[0016] Figure 5An exemplary structural diagram of an electronic device provided for some embodiments of the present application. DETAILED DESCRIPTION

[0017] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0018] The following terms are used in this article.

[0019] Baking: In this solution, it refers to the process of converting the object motion trajectory simulated in real time by the physics engine into a prefabricated animation curve.

[0020] Animation: A technique that describes the motion of an object through a series of keyframe sequences.

[0021] Time rewind: In this solution, it refers to playing the animation in reverse or reversing the motion trajectory data to achieve the effect of time and space reversal, so that the object can return to the starting state along the historical path.

[0022] In game development, objects are a general concept that refers to all interactive and actionable entities or elements in the game scene. It's an abstract general term for all things in the game world, and can be both visible physical objects and invisible logical carriers.

[0023] Animation frame interpolation: Generate transition frames between key frames to achieve smooth transition of animation.

[0024] The Unity engine is a cross-platform game development tool developed by Unity Technologies. It integrates a rich set of components, support for multiple scripting languages, a stable physics simulation mechanism, and powerful cross-platform publishing capabilities. It is widely used in games, VR, AR, and other fields. The Unity engine's core modules include the rendering engine, physics engine, animation system, and scripting system.

[0025] Rigidbody: A rigidbody component used in Unity to implement object physics simulations. It automatically calculates gravity, handles collision responses, and other dynamic behaviors, ensuring that in-game objects behave more realistically. For example, the Rigidbody component is essential for achieving effects like objects falling from heights and bouncing off each other.

[0026] FixedUpdate: This is an update method in the Unity engine that is called at a fixed time step. In this method, the physics system performs various calculations, such as calculating the forces and motion state of objects. It also records the object's motion trajectory to ensure the timing consistency of the physics simulation and trajectory recording.

[0027] Quaternion: A mathematical tool used to represent rotation in three-dimensional space. It consists of four parameters (x, y, z, w) and is used to describe the rotation state of an object in three-dimensional space.

[0028] Rotation quaternions are quaternions used to describe the rotational state of an object. They avoid the gimbal lock problem caused by Euler angles, ensuring that the object's rotational state is accurately represented. They also ensure smooth rotation interpolation.

[0029] Animation Clips are a basic type of animation curve data in the Unity engine. Animation Clips store animation data for an object over a period of time, such as how properties like position, rotation, and scale change over time. By creating and editing animation clips, developers can define various actions and behaviors for game objects, such as character walking, jumping, and attacking animations, and apply these animation clips to specific game objects.

[0030] Animation state machine: It is a system managed by the Animator component in the Unity engine, which is used to control the switching logic between animation states. The animation state machine defines the transition conditions and methods between animation segments, and uses parameters (such as the character's speed, health, etc.) to determine when to switch from one animation state to another, such as switching from the "standby" state to the "running" state, or from the "attack" state back to the "standby" state, thereby achieving smooth connection and intelligent control of character or object animation. In this application, the animation state machine realizes the separate drive of displacement and non-displacement attributes through the data mapping relationship established with the state backtracking prototype data, providing support for the time backtracking function.

[0031] GameObjectRecorder: A built-in runtime data recording component in the Unity engine that is used to capture the transformation properties (such as position and rotation) of a specified game object during game execution. Based on the captured transformation properties, it generates corresponding animation clips.

[0032] First embodiment

[0033] The first embodiment of the present application relates to a method for playing an animation. Figure 1 As shown, the method may include the following steps:

[0034] Step S101, determining a driving mode of a target object; the driving mode at least includes a driving mode based on an animation curve resource, the animation curve resource including original animation clips and animation curve data, the animation curve data being pre-converted and generated through a real-time simulation process of a physics engine;

[0035] Step S102: Play the animation according to the driving mode.

[0036] The following describes each of the above steps in detail.

[0037] With respect to step S101, specifically, in some examples, in the animation playback process, it may be necessary to first determine the driving mode based on the properties of the target object and the application scenario. The driving mode at least includes a driving mode based on animation curve resources, wherein the animation curve resources are composed of two parts: the original animation clip and the animation curve data. The original animation clip is a complete animation generated by traditional methods, such as manual production by an animation editor or real-time simulation by a physics engine, which contains the full animation information of the object (such as displacement, rotation, bone deformation, etc.); the animation curve data is lightweight path data pre-converted and generated by the real-time simulation process of the physics engine, which is used to solidify the precise trajectory of the object in a specific motion and eliminate the random deviation caused by real-time physical calculations.

[0038] The target object refers to the physical object that needs to be animated in the virtual game. For example, the target object can be a character, prop, or vehicle with physical interactive properties, such as a running character or a moving vehicle in the game, or an environmental element with visual dynamic effects, such as a tree swaying in the wind or a flowing waterfall.

[0039] In some examples, it is possible to determine whether to enable the animation curve resource drive mode by parsing the configuration parameters in the object prototype data (such as backtracking flags and physical simulation parameters) and the personalized settings in the instance data, thereby selecting a better drive strategy for subsequent animation playback.

[0040] Optionally, in some embodiments, animation production personnel can record the animation. After completing the recording, they can enter the level editor to configure the data application. Specifically, the personnel can enter the exported animation curve data, state backtracking prototype data, and other related file paths into the property panel of the corresponding target object in the level. After the configuration is completed, when the game is launched, the system can automatically read the data resources under these paths and execute the relevant animation playback process, allowing personnel to instantly view the animation recording effect.

[0041] Furthermore, if the user is dissatisfied with the current animation performance, they can re-record the animation. After re-recording and exporting the data, the new data export path remains the same as the original path. This eliminates the need to modify the data path configuration in the level editor and allows the user to simply launch the game to view the updated animation. This design significantly simplifies the animation debugging process, avoids repeated configuration work, significantly improves the user's work efficiency, and facilitates rapid iteration and optimization of animation content.

[0042] Regarding step S102, specifically, in some examples, after determining the drive mode, the corresponding animation playback logic can be executed. For example, it can be detected whether the animation curve data is included in the animation curve resource. If the animation curve data is not included, a traditional drive mode based on related technologies can be adopted; if the animation curve data is included, the drive mode based on the animation curve resource provided in this embodiment can be adopted. It should be noted that the traditional drive mode based on related technologies is a prior art and is not described in detail in this embodiment.

[0043] If a driving mode based on animation curve resources is adopted, the system can simultaneously load the original animation clip and animation curve data, and achieve high-precision animation playback through collaborative control of the dual data sources: on the one hand, the non-displacement properties of the original animation clip (such as skeletal animation and material changes) maintain the original control logic to ensure the visual integrity of the animation; on the other hand, the animation curve data will replace the displacement control in the original animation clip, and drive the position and orientation changes of the target object based on the pre-generated precise trajectory to achieve a smooth and retracesable motion effect. This driving mode is particularly suitable for scenarios that require frequent time retracing or precise path reproduction, such as skill replay in games. By separating the displacement and non-displacement control logic, it significantly improves system performance and resource utilization while ensuring animation quality.

[0044] It is understandable that, taking the time retracing implementation of a rolling ball as an example, in related technologies, developers usually adopt the following two technical paths:

[0045] The first is a prefabricated animation solution, which means that animators pre-make a scrolling animation that conforms to the laws of physics, and achieve the sphere movement and backtracking effect by controlling the forward / reverse playback of the animation. Its corresponding typical performance is: directly playing the prefabricated animation in reverse to make the sphere's scrolling animation play in reverse, presenting the effect of "object animation playing in reverse" where time flows backwards. In addition, since the complete movement path of the sphere has been preset in the animation, it will naturally return along the original path when played back. For example, in a maze level, the sphere rolls along the forward path preset by the developer, and moves strictly in the reverse direction along the same path when retracing, achieving "reverse movement along the historical movement path"; using this solution, the path is fully controllable and can accurately match the level design, and it can avoid the randomness risks brought by real-time physical simulation, ensuring stable game effects.

[0046] The second is a physical simulation solution, which refers to the real-time simulation of the ball's motion trajectory based on the physics engine provided by the game engine, and the recording of the ball's position and orientation data frame by frame. When time rewinding is triggered, the system reversely infers the state of the ball based on the stored data snapshot. When this solution achieves typical performance, on the one hand, the reverse playback of the object animation is achieved by reversely playing the recorded motion data, so that the ball's movement presents a time-reversal effect; on the other hand, the use of historical data makes the ball move strictly in the opposite direction of the previous movement. For example, in a simulated slope rolling scene, the offset trajectory of the ball after colliding with an obstacle will also be accurately reproduced during retracing. This enables the ball to dynamically respond to collision interactions in the scene, greatly enhancing the sense of physical immersion.

[0047] In the first prefabricated animation solution mentioned above, there are at least the following technical problems: First, to ensure that the animation conforms to the laws of physics, animators need to spend a lot of time and energy to repeatedly adjust the motion curve, which increases manpower and time costs; second, the gameplay prototype verification is completely dependent on the animation production progress, and testing can only be carried out after the animation is completed, which forces the development process to be lengthened and significantly extends the game development cycle; third, because prefabricated animations lack dynamic adjustment capabilities, once physical parameters (such as initial velocity, mass, etc.) need to be modified or the scene needs to be iterated, the completed animation cannot be directly adapted, and the animator must re-produce the entire set of animations, resulting in a waste of resources and difficulty in meeting agile development requirements. The second physical simulation solution mentioned above has at least the following technical problems: First, due to the inherent characteristics of physical engine calculations, errors are difficult to avoid each time the object's motion path is simulated, which will cause the actual motion trajectory of the object to deviate from the designed route, affecting the accuracy of the level; second, due to the chaotic characteristics of the physical system, the coordinates of the object's movement endpoint cannot be accurately predicted before the simulation is completed, making it impossible for designers to implement the "end point preset" function - for example, it is impossible to pre-set the trigger mechanism when the object reaches a specified position. This uncertainty greatly limits the flexibility and controllability of level design.

[0048] It can be seen that in related technologies, designers are forced to make a one-way choice between pre-made animation solutions with higher development efficiency and physical simulation solutions with better dynamic performance. Although the former can ensure path controllability and physical stability, it has problems with high production costs and low iteration efficiency. Although the latter can achieve dynamic physical interaction, it has problems with simulation errors and unpredictable end points. Therefore, the production of animation resources and physical simulation are separated from each other, causing designers to face a dilemma: although the use of pre-made animation can ensure path controllability and physical stability, it requires manual production frame by frame, resulting in high development costs and low iteration efficiency. Although relying on physical simulation can achieve dynamic interaction, simulation errors make the trajectory uncontrollable and the end point difficult to predict. This makes it impossible for traditional solutions to strike a balance between development efficiency and dynamic performance, becoming a technical bottleneck.

[0049] It's easy to see that compared to related technologies, the solution provided in the embodiments of this application builds a physics-baked animation curve production pipeline. Through the innovative method of "real-time physics simulation recording-animation resource conversion," this solution converts object motion data calculated in real time by the physics engine into prefabricated animation curve resources that can be directly called from the editor. Furthermore, this application implements a drive mode based on animation curve resources by determining the target object's drive mode. This combines the non-displacement property control logic of the original animation clip with the animation curve data generated by the physics simulation, successfully decoupling displacement and non-displacement animation control. During animation playback, the animation curve data precisely drives the position and orientation of the target object, eliminating random deviations from real-time physics calculations and ensuring path accuracy and physical realism. The original animation clip maintains the target object's non-displacement properties, such as skeletal animation and material changes, to ensure the integrity of the animation's visual presentation. Furthermore, this solution supports time retracing, significantly improving the accuracy and traceability of animation playback while maintaining compatibility with traditional animation processes. After designers modify an animation, they simply re-record and export the resource file, and the system automatically updates, eliminating the need for secondary adjustments to instance data, significantly improving development efficiency. Moreover, while ensuring the quality of animation, this application can enhance the system's adaptability to complex physical scenes, optimize resource utilization efficiency, and effectively solve the technical problem of separating animation production and physical simulation in traditional animation development.

[0050] In addition, this application can provide a rich toolset for level designers: on the one hand, it supports a variety of physical parameter configuration methods. Designers can customize the initial physical properties of objects, such as mass, initial velocity, collision coefficient, etc., to accurately control the basic conditions for object movement; they can also achieve differentiated settings of local physical rules within the scene by defining the area of ​​action of physical parameters. For example, adjusting the gravity coefficient or friction in a specific area can create unique interactive effects. On the other hand, equipped with an intuitive and easy-to-use animation track interceptor, designers can flexibly adjust the object's motion trajectory based on actual needs, and make fine-grained edits to the animation curve by adding, deleting or modifying keyframes. The adjustment effect can be previewed in real time, effectively realizing creative design, and significantly improving the flexibility and efficiency of level production.

[0051] Second embodiment

[0052] The second embodiment of the present application relates to an animation playback method. The second embodiment is an improvement on the first embodiment, and the specific improvement is that: in this embodiment, a method for determining animation curve data is provided.

[0053] Specifically, the method for determining the animation curve data may include the following steps:

[0054] Step S201, determining object prototype data and object instance data; wherein the object prototype data is used to define the general properties, physical simulation parameters, and state backtracking rules of the target object; and the object instance data is used to record the spatial position, personalized configuration, and backtracking mark of the target object in the game scene;

[0055] Step S202 : determining animation curve data according to the object prototype data and the object instance data.

[0056] Specifically, when building an animation system, by parsing the object prototype, the system splits the data into two levels: object prototype data and object instance data. Object prototype data serves as the basic template for similar objects. It encapsulates common properties such as prefab resources, object ID, physical simulation parameters such as mass, collision volume, and state backtracking rules, such as whether time backtracking is supported, providing a unified behavioral benchmark for all instances; while object instance data records the personalized characteristics of objects in specific scenes, including runtime states such as spatial position (X, Y, Z coordinates), posture parameters (rotation angle), material overrides, and backtracking markers. This layered design not only ensures the logical consistency of similar objects, but also allows differentiated configurations through instance data, providing a flexible and standardized data source for the subsequent generation of animation curves. Furthermore, animation curve data can be generated based on object prototype data and object instance data.

[0057] Optionally, in some embodiments, the method may further include: if the target object's tag information indicates time reversal, deriving state reversal prototype data; the state reversal prototype data is based on information from the animation state machine. This step allows for the construction of a precise reversal control system for objects that support time reversal.

[0058] Specifically, the system can determine whether the target object has the ability to backtrack in time through the "backtrackable object" mark in the object prototype data. If it is marked as supporting backtracking, the state backtracking prototype data can be generated based on the animation state machine information. The animation state machine, as the core module for managing the target object animation playback logic, records key information such as the switching rules and playback order of the animation segments, and the state backtracking prototype data extracts its core elements, including the animation state name (such as "running" and "jumping"), playback duration, playback rate and other parameters. These parameters will become the key basis for the system to control the animation playback progress and backtracking logic at runtime. For example, when performing reverse playback, the system can accurately calculate the backtracking state of each frame according to the playback duration and rate, so that the target object can be played back according to the preset trajectory, ensuring the continuity and accuracy of the animation performance during the time backtracking process, thereby meeting the time control requirements of scenes such as game playback and animation special effects rewind.

[0059] It is not difficult to find that compared with related technologies, by determining the layered object prototype data and object instance data, the system is able to uniformly define common properties, physical simulation rules and backtracking logic at the prototype level, and record personalized spatial status and configuration tags at the instance level, forming a data structure that is both standardized and flexible; then, the physical engine can be activated based on the physical simulation parameters of the prototype data to calculate the motion trajectory in real time, and the original motion data can be collected in combination with the backtracking tags and spatial parameters of the instance data, and animation curve data can be generated after processing; therefore, this data layering and linkage mechanism not only ensures that the animation curve conforms to the general physical laws of the category to which the target object belongs, but also can adapt to the personalized backtracking needs of specific scenarios, and finally realizes the controllable whole process from data definition to curve generation, providing reliable data support for high-precision animation playback and time backtracking functions.

[0060] Third embodiment

[0061] The third embodiment of the present application relates to an animation playback method. The third embodiment is an improvement on the second embodiment, and the specific improvement is that: in this embodiment, a specific implementation method for determining animation curve data based on the object prototype data and object instance data is provided.

[0062] Specifically, the step S202 of determining the animation curve data based on the object prototype data and the object instance data may include the following steps:

[0063] Step S2021, setting the object rigid body to a non-kinematic state according to the backtracking mark and the physical simulation parameters, and activating the physical engine real-time simulation;

[0064] Step S2022, collecting raw motion data of the object during its motion;

[0065] Step S2023: Determine the animation curve data according to the original motion data.

[0066] For example, based on the physical simulation parameters in the object prototype data (such as mass, friction coefficient, elasticity value, etc.) and the backtracking mark in the object instance data, the object rigid body is set to a non-kinematic state, and then recorded based on the physics engine. In this way, the movement of the object is no longer constrained by predefined animation paths or script logic, but is completely handed over to the physics engine for real-time calculation based on Newton's laws of motion, collision detection and other algorithms. In this process, the physics engine can dynamically adjust the object's motion trajectory according to environmental factors (such as gravity, wind force) and interactions between objects (such as collisions, thrust), thereby simulating a physical motion process that is closer to reality, providing a real and reliable simulation foundation for the subsequent acquisition of accurate motion data.

[0067] Regarding step S2022, illustratively, while the physics engine simulates the motion of an object, the system can continuously track and record changes in the object's motion state. The collected content can include dynamic parameters such as position coordinates (X, Y, Z), attitude quaternions (X, Y, Z, W), velocity, acceleration, etc., forming a raw data sequence reflecting the complete motion process of the object. This data is directly derived from the real-time results of the physical simulation, without filtering or interpolation processing, and retains the true details of the motion.

[0068] Regarding step S2023 , illustratively, based on the collected original motion data, discrete time point data can be converted into continuous animation curve data.

[0069] Optionally, in some embodiments, collecting raw motion data of the object during its motion, i.e., step S2022, may include:

[0070] Step S20221, collecting position data and attitude data of the object according to a fixed time step; the position data includes three-channel coordinates of the position, and the attitude data includes quaternion coordinates of the rotation;

[0071] Step S20222: Generate the original motion data based on the position data and posture data.

[0072] Specifically, when physics simulates the movement of an object, in order to obtain accurate and stable motion data, the state of the object can be periodically collected according to a fixed time step. For example, this can be done by calling the GameObjectRecorder tool in the FixedUpdate stage. The tool can ensure that the collection time interval is uniform and consistent with the calculation frequency of the physics engine, and is not affected by fluctuations in the rendering frame rate. In this process, the system can obtain the object's position data (X, Y, Z three coordinate values, to clarify the specific position of the object in three-dimensional space) and posture data (quaternion X, Y, Z, W, to accurately describe the object's rotation angle and avoid the Euler angle universal joint lock problem), thereby generating seven independent animation curves. In this way, by decomposing the position and posture information of the object's movement into multiple dimensions that can be edited and controlled separately, a data basis can be provided for the subsequent precise adjustment of the object's movement.

[0073] Specifically, after collecting the object's position and posture data, these discrete raw data can be integrated and processed. Through serialization, the position (X, Y, Z) and posture (X, Y, Z, W) data at consecutive time points are sequentially connected in series to construct an animation curve that fully records the entire object's motion process. This animation curve contains all the motion state information of the object from the start to the end moment. It not only ensures the integrity of the motion trajectory record, but also converts the scattered data into a format that can be directly recognized and used by the animation system, thereby achieving accurate reproduction and efficient playback of the object's motion.

[0074] It can be seen that in this embodiment, the position data and posture data of the object are collected based on the independent update mechanism of the physical engine and the fixed time step, so that the system can obtain stable and uniform motion state records without being affected by fluctuations in the rendering frame rate; these precise position and posture data can then be integrated to generate original motion data, so that the final animation curve data can truly reflect the physical motion trajectory of the object, fundamentally eliminating the motion trajectory distortion problem caused by changes in rendering performance, ensuring the stability of the animation effect and the accuracy of the physical simulation, and providing a reliable data foundation for high-precision animation playback and state backtracking.

[0075] See also Figure 2As shown, it is an exemplary flow chart for the production of the target object. After creating the object prototype, laying out the object instance and recording the animation, the effect is verified through runtime testing. After being satisfied, the animation curve data generation link is entered. Based on the physical simulation parameters (such as mass, friction coefficient, etc.) in the object prototype data and the backtracking mark in the object instance data, the object rigid body is set to a non-kinematic state, and the real-time simulation of the physics engine is activated, so that the object movement is completely based on Newton's law and collision detection algorithms, without being restricted by predefined paths, thereby simulating real physical movement and obtaining complete animation curve data. This data not only retains the real details of the movement, but also accurately reproduces the object's movement trajectory in a format that can be recognized by the animation system. Among them, the animation Clip resource in the figure corresponds to the original animation clip in this application.

[0076] It should be noted that in some embodiments, before recording based on the physics engine, relevant personnel can pre-configure the physical environment. For example, relevant personnel can add a Rigidbody component to the object and set it to a static state. This operation can lock the object's position before recording, avoiding accidental movement of the object due to misoperation or other factors, thereby ensuring the accuracy and consistency of the simulation process; the original simplified collision body in the scene can also be replaced with a high-precision collision body, making the interaction between the object and the environment during the simulation more realistic and able to more accurately reflect the physical collision effect. At the same time, a physical parameter adjustment area is set in a specific area of ​​the scene to support dynamic modification of the object's physical properties (such as mass, friction, elastic coefficient, etc.) during the simulation process to meet diverse simulation needs. In addition, by setting the object's initial position and force state parameters, the starting conditions of the object simulation can be controlled; for example, adjusting the simulation frequency of the physics engine can increase the number of samples of the object's motion trajectory per unit time, significantly improving the sampling accuracy of the motion trajectory, and laying the foundation for the subsequent generation of accurate animation curve data.

[0077] In some embodiments, common physics-related configurations can be saved as preset templates to improve work efficiency and configuration consistency. The preset templates can integrate commonly used physical environment parameter settings, such as collision body type, initial physical properties of objects, physical engine simulation frequency, etc. In subsequent project development or simulation tasks, relevant personnel can directly call the preset template to quickly complete the basic configuration of the physical environment without having to repeatedly set the same parameters, saving a lot of time and energy. At the same time, the preset templates are also convenient for unified management and adjustment. When a common configuration needs to be modified, it is only necessary to update it in the template. The subsequent physical environment configuration created based on the template will automatically apply the new parameters to ensure the standardization and consistency of the physical simulation in the project, and reduce the risk of problems caused by configuration differences.

[0078] It should be noted that this embodiment may also be an improvement based on the first embodiment.

[0079] It is not difficult to find that in the embodiment of the present application, the object rigid body can be set to a non-kinematic state and the real-time simulation of the physical engine can be activated according to the backtracking mark and the physical simulation parameters, so as to generate a motion trajectory that conforms to the real physical laws; then the original motion data in the process can be collected to ensure the authenticity and integrity of the data; then the animation curve data can be determined based on these original data, so that the generated animation curve can accurately reflect the physical motion characteristics and be editable, thereby achieving a high degree of unity between animation effects and physical laws, and providing reliable and flexible basic data for subsequent animation playback and state backtracking.

[0080] Fourth embodiment

[0081] The fourth embodiment of the present application relates to an animation playback method. The fourth embodiment is an improvement on the third embodiment, and the specific improvement is that: in this embodiment, a specific implementation method for determining the animation curve data based on the original motion data is provided.

[0082] Specifically, determining the animation curve data based on the original motion data, that is, step S2023, may further include:

[0083] Step S20231: determining a basic animation curve based on the original motion data; wherein the basic animation curve is obtained by downscaling the original data;

[0084] Step S20232: Determine the animation curve data according to the basic animation curve.

[0085] Specifically, the original motion data can be down-sampled, and the number of data frames can be reduced at a fixed ratio through equal-interval sampling or interpolation algorithms (such as linear interpolation, spline interpolation), so that the high-density original data (such as 60 frames per second) can be converted into a more streamlined basic animation curve (such as 30 frames per second). This process can greatly reduce the amount of data storage and computing load while retaining the key features of the object's motion (such as displacement turning points and rotation extremes), and at the same time avoid the redundancy of animation curves caused by the excessive density of original motion data. For example, when recording the jumping trajectory of a character, the down-sampling process can eliminate position data with very small differences in adjacent frames, and only retain key frames such as take-off, highest point, and landing, so that the curve can reflect the movement trend and adapt to hardware devices with different performance.

[0086] Specifically, based on the basic animation curve as a benchmark, the fixed update mechanism of the physics engine (such as the 50Hz frequency of FixedUpdate in Unity) can be combined to further optimize the temporal uniformity and physical accuracy of the curve. Since the calculation of the physics engine is independent of the rendering frame rate, the position and posture data it outputs have a constant timestamp (such as updating every 0.02 seconds), so the generated animation curve data is not affected by fluctuations in device performance. For example, when the rendering frame rate drops from 60FPS to 30FPS, the physics engine still outputs data at a fixed frequency to ensure that the motion trajectory recorded by the curve is completely consistent with the real physical simulation. By binding the physical calculation cycle and using quaternions to eliminate the universal joint lock problem, the animation curve data can not only accurately reproduce the details of the object's motion, but also achieve high-precision playback in scenarios such as time retracing, meeting the requirements for animation stability and physical authenticity.

[0087] Optionally, in some embodiments, the method may further include: during the frequency reduction process, retaining unselected original frames as redundant frames for subsequent frame insertion correction.

[0088] Correspondingly, determining the animation curve data according to the basic animation curve, that is, step S20232, may further include:

[0089] Step SS202321: providing a visual preview interface; wherein the visual preview interface is used to display the basic animation curve;

[0090] Step SS202322: In response to the user's instruction information, insert a new key frame into the basic animation curve according to the redundant frame; wherein the key frame is used to correct the trajectory deviation;

[0091] Step SS202323, generating the animation curve data according to the curve after inserting the key frame.

[0092] Specifically, when downsampling the raw motion data to generate the base animation curve, the system doesn't directly discard the original data frames that weren't selected as keyframes. Instead, it retains them as redundant frames. This design balances performance optimization with editing flexibility: on the one hand, downsampling reduces the amount of data, lowering runtime memory usage and improving the playback performance of games or animations; on the other hand, the retained redundant frames reserve a data foundation for subsequent adjustments, allowing the base animation curve to be precisely modified according to actual needs while maintaining motion continuity, effectively balancing the needs of data simplification and adjustability.

[0093] Specifically, the system provides a visual preview interface that intuitively displays the basic animation curve generated after frequency reduction, making it easier for designers or developers to view the object's motion trajectory. This interface can integrate animation preview controls, allowing users to interactively view the object's path throughout the entire motion process through dragging and dropping. This allows for clearer presentation of motion trajectory details (such as speed changes and turning angles), providing a visual basis for subsequent identification and correction of trajectory issues.

[0094] Specifically, during the animation production process, the system can automatically generate transition frames between key frames through mathematical algorithms such as Bezier curves and spline interpolation, perform animation frame interpolation, and achieve smooth playback of the animation. However, due to frequency reduction processing or curve fitting errors, trajectory deviation problems such as object penetration may occur. To this end, this solution introduces a redundant frame retention mechanism and visual editing function: when the designer finds an abnormality in the motion trajectory during the preview process, he can send a command through the visual interface, and the system will immediately call the redundant frame data retained in the early stage to accurately insert new key frames into the basic animation curve. Through the frame filling function, the system recalculates the curve interpolation and corrects the trajectory deviation caused by frequency reduction or algorithm fitting, so that the object movement conforms to the laws of physics and meets the design requirements, effectively solving the animation effect defects and ensuring the smoothness and authenticity of the animation.

[0095] For example, to ensure animation quality, the production pipeline provided by this application can decouple physical simulation data from recording frame rate through time-independent frame sampling technology, completely eliminating the interference of unstable frame rate caused by equipment performance fluctuations on animation smoothness and accuracy, and ensuring the smoothness and consistency of motion trajectory; at the same time, to address the common model penetration problem during animation preview, the pipeline supports real-time keyframe insertion function. Designers can manually adjust the model position and posture of specific frames to correct visual errors caused by automatic interpolation calculations, further enhancing the realism of animation details. Finally, with the help of standardized data export process, the pipeline achieves seamless connection from animation editing, real-time preview to game testing, significantly shortening the iteration cycle and greatly improving the overall development efficiency of physical animation.

[0096] Specifically, after keyframe insertion and trajectory correction, the final animation curve data can be generated based on the adjusted curve. This animation curve data retains the data streamlining benefits of downscaling, significantly reducing data volume, while ensuring the accuracy and smoothness of the animation effects through frame infill optimization. This ensures that the final animation meets performance requirements while achieving high-quality visual presentation, effectively enhancing the user experience.

[0097] Optionally, in some embodiments, after generating the animation curve data according to the curve after inserting the keyframe, the method may further include:

[0098] In response to a confirmation instruction from the user, the animation curve data is exported; wherein the animation curve data is used to be called when the game is running to drive the movement of the object.

[0099] Specifically, after inserting keyframes and generating animation curve data, the final confirmation phase begins. Once the designer or developer has verified through the visual preview interface that the animation curve's trajectory and detailed performance meet expectations, with no issues like clipping or lag, they can send a confirmation command to the system. This command serves as a trigger for data export, marking the end of the animation curve editing and optimization process and the entry into practical application.

[0100] Specifically, after the system responds to the confirmation command, the current animation curve data can be standardized and exported. The exported data is formatted as standard animation curve data, ensuring compatibility with game engines or other animation playback systems. This ensures data versatility and stable operation across different devices and scenarios, laying the foundation for subsequent practical applications.

[0101] Specifically, the exported animation curve data can be called in real time while the game is running, becoming the basis for driving the movement of objects, especially when executing complex functions such as time retracing (such as skill playback and scene rewinding in the game). The animation curve data can accurately control the position and posture changes of objects, and fully present the edited and optimized animation effects to the user.

[0102] It should be noted that this embodiment may also be an improvement based on the first embodiment and / or the second embodiment.

[0103] It is not difficult to find that in the embodiment of the present application, by down-converting the original motion data to determine the basic animation curve, the system is able to significantly reduce the amount of data while retaining the key characteristics of the object's motion, thereby improving storage efficiency and reducing computing load; and then the final animation curve data can be determined based on the basic animation curve, so that the generated data not only maintains the accuracy of the physical simulation, but also has the flexibility to adapt to different application scenarios, and ultimately achieves the dual goals of optimizing resource utilization and operating performance while ensuring animation quality.

[0104] So far, the method for determining the animation curve data has been introduced through the first to fourth embodiments. From starting the physical engine simulation based on the object prototype data and instance data, to collecting the original motion data, down-processing to generate the basic animation curve and finally determining the animation curve data, a complete data generation link is formed. After completing the physical recording, the system can adopt a dual-file mechanism to generate the original animation clip and the animation curve data respectively. This design effectively optimizes the memory usage at runtime and improves data management efficiency by separating the non-displacement attributes (carried by the original animation clip) and the displacement control data (carried by the animation curve data).

[0105] The fifth and seventh embodiments will be used to describe in detail how to use the original animation clips and animation curve data in the animation curve resource to play the animation.

[0106] Fifth embodiment

[0107] The fifth embodiment of the present application relates to an animation playback method. The fifth embodiment is an improvement on the first embodiment, and the specific improvement is that: in this embodiment, a method for determining the driving mode of a target object is provided.

[0108] Specifically, the step of determining the driving mode of the target object, i.e., step S101, may include the following steps:

[0109] Step S1011, checking the path of the backtracking mark and the animation curve data according to the object prototype data and the object instance data;

[0110] Step S1012: If the path of the animation curve data exists, the animation is played based on the driving mode of the animation curve resource.

[0111] With respect to step S1021, specifically, before executing the playback, the system can identify the type of driving mode through the object data system. For example, the state backtracking rules in the object prototype data can be read first, which contain the basic configuration information of whether the target object supports time backtracking (such as whether the animation state machine is defined); at the same time, the backtracking mark and animation curve resource path in the object instance data are extracted. The backtracking mark clearly indicates whether the current instance has the backtracking function enabled, and the resource path points to the pre-generated animation curve data file. By combining and checking these data fields, the system can accurately determine whether the target object meets the conditions for adopting the animation curve data driving mode, avoid performing redundant curve loading operations on target objects that do not need to be backtracked, and thus optimize the efficiency of system resource utilization.

[0112] Regarding step S1022, specifically, when the system detects that the animation curve resource path exists and is valid, it immediately triggers the loading and application process of the animation curve data. In this mode, the system will read and parse the pre-generated animation curve data, and combine it with the non-displacement properties in the original animation clip (such as skeletal animation, material changes) to achieve fine control of the target object animation. In this way, the system can use the curve data generated by physical simulation to enhance the realism and traceability of the animation while ensuring the visual effect of the animation.

[0113] See also Figure 3 The figure shows an exemplary flow chart for determining the driving mode of a target object: when starting to play the animation, it is detected whether the animation curve data exists. If so, the animation is played based on the driving mode of the animation curve resource; otherwise, the animation is played using the traditional driving mode.

[0114] Optionally, in some embodiments, the animation playback according to the driving mode includes, that is, step S201 may include: if the animation playback is based on the driving mode of the animation curve resource, a double-layer overlay operation is performed: the original animation clip replaces the original resource in the animation state machine, and the animation curve data is filled into the corresponding state of the state backtracking prototype data.

[0115] For example, after determining to adopt the driving mode based on animation curve resources, the original animation clips can be used to replace the original resources in the animation state machine to ensure that the basic expression of the animation is determined, including the presentation of non-displacement attributes such as the character's actions and expressions. Then, the animation curve data can be filled into the corresponding state of the state backtracking prototype data. In this way, precise control of the object's movement position and posture can be achieved. Through these two levels of operation, the design elements of the original animation are retained, and the animation curve data generated by physical simulation is used to improve the authenticity and accuracy of the object movement in the animation, thereby achieving high-quality animation playback effects.

[0116] Optionally, in some embodiments, during the process of performing the double-layer covering operation, the method may include the following steps: Figure 4 As shown:

[0117] Step S2011, generating a target segment of the same length as the original animation segment after removing the displacement attribute; the target segment is used for placeholder playback to maintain the non-displacement attribute of the original animation segment;

[0118] Step S2012: Fill the animation curve data into the state backtracking prototype data; the state backtracking prototype data is preset with an empty displacement curve placeholder that matches the animation state machine;

[0119] Step S2013, converting the animation curve data into a displacement control instruction set that can be directly called by a program; the instruction set includes real-time update data for controlling the position and orientation of the target object;

[0120] Step S2014 binds the displacement control instruction set to the state backtracking prototype data, while maintaining the non-displacement properties of the original animation clip played through the target clip, thereby implementing animation playback driven by the animation curve data. This allows the target object's position and orientation to be precisely controlled by the animation curve data during its motion, while non-displacement properties (such as skeletal animation and material changes) are maintained by the original animation clip.

[0121] Regarding step S2011, for example, in this step, the displacement attributes (such as position and orientation changes) in the original animation clip are removed, and only the non-displacement attributes (such as skeletal animation and expression changes) are retained, forming a placeholder clip with the same duration as the original clip. At this time, the animation curves of the remaining skeletons are still retained in the animation clip, and it is not the target clip.

[0122] For step S2012, the state backtracking prototype data is, for example, a pre-configured animation state machine template, which contains a reserved empty displacement curve placeholder that matches the animation state machine. In this step, the system can fill the animation curve data generated by the physics engine into the state backtracking prototype data, so that the state backtracking prototype data obtains complete displacement control information. This filled displacement curve data can be directly read by the program in subsequent processes to set the displacement of the target object in real time, thereby providing a relatively accurate motion trajectory record for the time backtracking function.

[0123] Regarding step S2013, the animation curve data can be converted into a set of displacement control instructions that can be directly called by the program. In this step, by converting the format of the animation curve data, the continuous curve data can be discretized into a set of instructions that can be directly parsed during program execution. Each instruction can contain the position coordinates and orientation information at a specific point in time. This conversion enables the animation system to efficiently update the displacement state of the object in real time, ensuring the accuracy and smoothness of the physical simulation.

[0124] For step S2014, exemplarily, the displacement control instruction set can be bound to the displacement channel of the state backtracking prototype data through a program interface, while maintaining the non-displacement attributes of the original animation clip played through the target clip. This step enables the animation state machine to dynamically update the position and orientation of the object according to the instruction set during runtime by establishing a binding relationship between the displacement control instruction set and the state backtracking prototype data. At the same time, the non-displacement attributes of the original animation clip are played synchronously through the target clip, realizing the separate control of displacement and non-displacement attributes, and finally achieving a hybrid drive mode based on animation curve data, which can not only ensure the authenticity of the physical simulation, but also maintain the integrity of the animation performance.

[0125] It should be noted that this embodiment may also be an improvement based on any one or more of the second to fourth embodiments.

[0126] It is not difficult to find that in the embodiment of the present application, by checking the backtracking mark and the path of the animation curve data according to the object prototype data and the object instance data, it is possible to clarify whether the target object has the conditions for adopting the animation curve resource driving mode; and then when the path of the animation curve data is detected, the animation is played based on the driving mode of the animation curve resource, so that the animation playback can not only use the animation curve data generated by physical simulation to achieve a more realistic object motion performance, but also meet the specific gameplay or animation effect requirements through the backtracking function, thereby improving the quality and interactivity of the animation.

[0127] Sixth embodiment

[0128] The sixth embodiment of the present application relates to a method for animation playback. The sixth embodiment is an improvement on the fifth embodiment, specifically comprising: providing a method for binding the displacement control instruction set to the state backtracking prototype data, while maintaining the non-displacement properties of the original animation segment through the target segment, thereby achieving a specific implementation method for animation playback based on the animation curve data drive mode.

[0129] Specifically, in some embodiments, the step of binding the displacement control instruction set to the state backtracking prototype data while maintaining the non-displacement attribute of the original animation clip played through the target clip to implement animation playback in a driving mode based on animation curve data, that is, step S2014 may further include:

[0130] Step S20141: establishing a data mapping relationship between the state backtracking prototype data filled with the displacement control instruction set and the displacement channel of the animation state machine, so that the animation state machine can update the displacement properties of the target object in real time according to the instruction set;

[0131] Step S20142, based on the data mapping relationship, execute forward or reverse playback; wherein, when executing forward or reverse playback, the state backtracking prototype data converts the displacement control instruction set into the position and orientation update of the target object through the event triggering mechanism of the animation state machine, while maintaining the non-displacement attributes of the original animation segment through the synchronous playback of the target segment, thereby realizing the separate driving of displacement and non-displacement attributes.

[0132] For step S20141, for example, the displacement control instruction set pre-filled in the state backtracking prototype data can be bound to the displacement attribute update interface of the animation state machine through a program interface to form a data link capable of real-time communication. This mapping relationship enables the animation state machine to directly read the position and orientation data in the instruction set during operation, and convert the position and orientation data into actual displacement updates of the target object, thereby achieving precise control of the animation playback process by physical simulation data. Through this mechanism, the system can dynamically adjust the motion trajectory of the target object through external data without modifying the original animation clip.

[0133] For step S20142, exemplarily, forward or reverse playback can be performed based on the data mapping relationship. During the animation playback process, whether it is forward playback or reverse playback, the state backtracking prototype data can be used through the event triggering mechanism of the animation state machine to parse the displacement control instruction set into continuous position and orientation update instructions according to the time series. At the same time, the non-displacement attributes of the original animation clip (such as skeletal animation, expression changes) are played synchronously through the target clip, which can ensure that these attributes are displayed according to the settings of the original animation. This separate driving mechanism makes the displacement performance of the target object based on physical simulation data, while the non-displacement attributes maintain the visual consistency of the animation design, realizing the organic combination of physical reality and animation artistry. When playing in reverse, the system can automatically reverse the time sequence of the displacement control instruction set, restore the motion trajectory of the target object, and synchronously play the non-displacement attributes in reverse, fully realizing the time backtracking function.

[0134] Optionally, in some embodiments, the forward or reverse playback is performed based on the data mapping relationship, that is, step S20142 may further include the following steps:

[0135] Among them, when forward playback is triggered, the original animation clip maintains the control logic of the non-displacement attributes through the target segment, ensuring that the non-displacement attributes of the target object are displayed according to the settings of the original animation clip. At the same time, the displacement control instruction set in the state backtracking prototype data updates the position and orientation of the target object in real time through the animation state machine, so that the movement of the target object conforms to the laws of physics.

[0136] Specifically, when the animation is played forward, a dual data source collaborative driving mechanism can be used to achieve accurate and smooth animation effects. Specifically, the target segment generated after the displacement attribute of the original animation clip is removed, serves as the control carrier of non-displacement attributes, and completely retains the original design logic of visual elements such as character skeletal animation, material changes, and particle special effects, ensuring that the artistic expression of the animation is not affected. At the same time, the displacement control instruction set pre-filled in the state backtracking prototype data independently controls the displacement attributes of the target object through the data mapping relationship with the animation state machine. These instruction sets are based on the precise motion trajectory pre-calculated by the physics engine, and update the position (X, Y, Z coordinates) and orientation (quaternion XYZW) of the target object in three-dimensional space in real time, so that the displacement of the target object strictly follows the laws of physics, and can avoid random deviations that may be caused by real-time physical simulation.

[0137] Among them, when reverse playback is triggered, the displacement control instruction set in the state backtracking prototype data is reversely parsed to restore the motion trajectory of the target object during forward playback. At the same time, the non-displacement attributes of the original animation clip are played through the target clip in reverse order along the time axis, realizing the backtracking of the displacement and non-displacement attributes of the target object in the time dimension.

[0138] Specifically, when reverse playback (time rewind) is triggered, the system can rely on the dual data source collaboration mechanism to achieve state rewind. The core driver is the animation curve data. The system can give priority to reading the reverse trajectory parameters in the state rewind prototype data, and by reversely calculating the time series of the animation curve, accurately reverse the position and orientation of each frame of the target object, so that it moves in strict accordance with the forward trajectory, avoiding the common motion distortion and trajectory deviation problems during reverse playback of traditional keyframe animations, and achieving smooth and realistic path rollback. At the same time, to ensure visual consistency during the rewind process, the target segment responsible for maintaining the non-displacement properties of the original animation can be played in reverse order synchronously with the displacement property rewind. During reverse playback, the animation state machine synchronizes the control of the target segment and the time axis of the displacement control instruction set, so that the non-displacement properties of the original animation run in reverse order according to the time axis. At the same time, the displacement properties are rolled back according to the trajectory reversely parsed by the animation curve data, ensuring that the displacement and non-displacement properties of the object are strictly aligned in the time dimension, avoiding the deviation between the visual and motion trajectories, and thus achieving a complete and coherent time rewind effect.

[0139] It can be seen that this application significantly improves development efficiency through an innovative animation iteration mechanism. In the initial stage, the designer specifies the animation state name in the editor and associates the clip to complete the data configuration. When the game is running, the system synchronously loads the animation clip and curve data, performs a double overlay operation, and realizes the separate control of displacement and non-displacement properties. When playing forward, the movement is ensured to be realistic and the animation is smooth, and the trajectory is accurately traced during reverse playback. Compared with the traditional method, this mechanism uses physical simulation data to dominate the displacement control, improving the authenticity and controllability of the animation performance.

[0140] From the perspective of optimizing the development process, after a designer modifies an animation, they only need to re-record and export the resource file. The system will then automatically update the file using a dynamic overwrite mechanism, allowing for rapid verification of the new effect without the need to adjust instance data again. This feature eliminates tedious reconfiguration work, integrating and optimizing the entire process from design, modification, to verification, significantly shortening the development cycle and enabling agile, iterative development of physical animation, providing strong support for the efficient advancement of game or animation projects.

[0141] It should be noted that this embodiment may also be an improvement based on any one or more of the first to fourth embodiments.

[0142] It is not difficult to find that compared with related technologies, by establishing a data mapping relationship between the state backtracking prototype data filled with the displacement control instruction set and the displacement channel of the animation state machine, the animation state machine can directly read and apply the displacement data generated by the physical simulation in real time, so that the position and orientation update of the target object can be accurately controlled, eliminating the delay and deviation between the physical calculation and the animation performance in the traditional animation system; when performing forward or reverse playback based on this mapping relationship, the state backtracking prototype data can synchronously drive the displacement update through the event trigger mechanism of the animation state machine, while maintaining the non-displacement properties of the original animation clip through the target clip playback, thereby realizing the separate driving of displacement and non-displacement properties, which not only ensures the physical reality of the object's motion trajectory, but also retains the visual continuity of the animation design. Ultimately, it can achieve the beneficial effect of flexibly realizing the integration of high-precision physical simulation and rich animation performance without modifying the original animation resources.

[0143] Seventh embodiment

[0144] The seventh embodiment of the present application relates to a method for playing an animation. The seventh embodiment is an improvement on the first embodiment, specifically comprising: in this embodiment, playing the animation according to the driving mode includes: in response to a player's triggering action for time manipulation, in the driving mode, performing forward or reverse animation playback on the target object to achieve time manipulation.

[0145] First of all, it should be noted that the method provided in this embodiment is specifically applied to animation scenes in the field of games.

[0146] Specifically, in response to the player's triggering action for time manipulation, the system can first determine whether the driving mode of the target object is a driving mode based on the animation curve resource, and whether the object prototype data of the target object contains a time retracing mark; if the driving mode matches and the time retracing mark exists, it can further check whether the state retracing prototype data is complete (that is, the animation curve data and the displacement control instruction set have been filled in); when the above conditions are met, under the driving mode, the target object is executed with forward or reverse animation playback based on the displacement control instruction set in the state retracing prototype data to realize time manipulation; if any condition is not met, the default animation playback logic can be adopted.

[0147] For example, if the driving mode is an animation curve resource-based mode, and the prototype data or instance data of the target object is marked as supporting time retracing, the system can give priority to using the pre-generated state retracing prototype data and animation curve data to perform forward or reverse control on the animation playback process of the object.

[0148] During forward playback, the non-displacement properties of the target object (such as skeletal movements and material changes) can be driven by the original animation clip, while the displacement properties (position and orientation) are controlled by the animation curve data to ensure that the movement conforms to the laws of physics.

[0149] During reverse playback, the system can reversely analyze the time series of the animation curve data to infer the displacement state of each frame of the target object; at the same time, the animation state machine synchronously controls the reverse playback of the non-displacement attributes in the original animation clip, and strictly aligns its time axis with the reverse trajectory of the displacement attribute, so as to achieve smooth and non-stuttering motion trajectory rollback, presenting a "time reversal" visual effect.

[0150] The above mechanism deeply binds the time manipulation logic with the driving mode, allowing the animation playback process to respond to the player's interactive commands and dynamically switch the playback direction, thereby realizing time manipulation gameplay such as plot replay, action reproduction, and trajectory correction in the game, enhancing the player's interactive experience and scene immersion.

[0151] It should be noted that this embodiment may also be an improvement based on any one or more of the second to sixth embodiments.

[0152] It is not difficult to find that compared with related technologies, by deeply integrating the time manipulation logic with the driving mode, the system can respond to the player's triggering actions for time manipulation (such as buttons, touch screen commands, etc.), and directly call the state backtracking prototype data and animation curve data in the driving mode based on animation curve resources to perform forward or reverse animation playback on the target object. During forward playback, the animation curve data ensures that the displacement complies with the laws of physics and the original animation clip maintains visual continuity; during reverse playback, the trajectory is accurately rolled back by reversing the curve time series, and the animation state machine synchronously controls the reverse playback of the non-displacement attributes in the original animation clip, strictly aligning its time axis with the reverse trajectory of the displacement attribute. This mechanism enables players to intervene in the movement process of the target object in real time, dynamically switch the playback direction, and realize immersive time manipulation interactions such as plot backtracking and action reproduction, which significantly enhances the flexibility of gameplay and the player's sense of scene participation.

[0153] Based on the above embodiments, this application, under the Unity engine framework, addresses the pain point that traditional animation solutions have difficulty balancing physical stability and production efficiency. It constructs an object state backtracking solution based on physical baking, which has at least the following beneficial effects:

[0154] (1) Using the "real-time physics simulation recording-animation resource conversion" technology, the object motion data calculated in real time by the physics engine is directly converted into editable animation curve resources, replacing the traditional manual production method, eliminating the random deviation of real-time calculation, solidifying the dynamic path, and ensuring physical stability. At the same time, with the help of standardized data export processes, simulation results can quickly generate game-usable resources, avoiding secondary processing; through the pre-made template reuse function, the saved physical parameter configuration can be quickly applied to similar objects, significantly shortening the physical animation development cycle.

[0155] (2) The system is equipped with visual editing tools that allow designers to adjust the physical parameters and motion trajectories of objects through an intuitive interface. The animation track cutter can realize the cutting and splicing of animation clips and flexibly adjust the path. During the animation preview, the keyframe correction function allows real-time insertion of keyframes to quickly fix the problem of interpolation causing the model penetration, significantly simplifying the debugging process. These functions can be operated without writing code, greatly improving the convenience and efficiency of animation editing.

[0156] (3) Animation resources are managed through a dual-file mechanism. The system optimizes runtime memory usage and only loads the resources required for the instance, facilitating rapid integration into the game scene. The state retracing prototype data predefines the animation state machine parameters to ensure the consistency and predictability of the time retracing function. In addition, the solution achieves a seamless "edit-test" connection. After the designer modifies the animation, there is no need to reconfigure the instance data. The update can be directly exported to the game to verify the real-time performance, achieve rapid iteration of animation effects, and accelerate the entire game development process.

[0157] The step division of the above various methods is only for the purpose of clear description. During implementation, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this application; adding insignificant modifications or introducing insignificant designs to the algorithm or process without changing the core design of the algorithm and process are all within the scope of protection of this application.

[0158] It is worth mentioning that all modules involved in this embodiment are logical modules. In actual applications, a logical unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. In addition, to highlight the innovation of this application, this embodiment does not include units that are not closely related to solving the technical problem proposed by this application. However, this does not mean that other units do not exist in this embodiment.

[0159] In addition, some embodiments of the present application further provide an electronic device. The electronic device may be various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, etc. The electronic device may also be various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices.

[0160] The electronic device includes: one or more processors; and a memory storing computer program instructions, wherein when the computer program instructions are executed, the processor performs the steps of the method provided in any one or more of the above embodiments. Figure 5 An exemplary structural diagram of the electronic device is disclosed. The electronic device includes: one or more processors 1101, a memory 1102, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are connected to each other using different buses and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the electronic device, including instructions stored in or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some other embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple electronic devices can be connected, and each device provides some necessary operations. Among them, the components shown in this article, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.

[0161] The electronic device may further include an input device 1103 and an output device 1104. The processor 1101, the memory 1102, the input device 1103 and the output device 1104 may be connected via a bus or other means, with the bus connection being used as an example in the figure.

[0162] The input device 1103 can receive input digital or character information and generate key signal input related to user settings and function control of the electronic device, such as input devices such as a touch screen, a keypad, a mouse, a trackpad, a touch pad, an indicator stick, one or more mouse buttons, a trackball, and a joystick. The output device 1104 may include a display device, an auxiliary lighting device (e.g., an LED), and a tactile feedback device (e.g., a vibration motor). The display device may include, but is not limited to, a liquid crystal display, a light emitting diode display, and a plasma display. In some embodiments, the display device may be a touch screen.

[0163] To provide interaction with a user, the electronic device may be a computer. The computer may include a display device (e.g., a cathode ray tube or LCD monitor) for displaying information to the user, and a keyboard and pointing device (e.g., a mouse) through which the user can provide input to the computer. Other types of devices may also be used to provide interaction with the user. For example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback), and input from the user may be received in any form (e.g., voice input or tactile input).

[0164] In the embodiments of the present application, a computer program / instruction is stored on a computer-readable medium. When executed by a processor, the computer program / instruction implements the steps of the method provided in any one or more of the above embodiments. The computer-readable medium may be included in the electronic device described in the above embodiments, or it may exist independently and not be incorporated into the device. The computer-readable medium carries one or more computer-readable instructions.

[0165] The memory 1102 can be used as a non-transitory computer-readable storage medium to store non-transitory software programs, non-transitory computer executable programs, and modules. The processor 1101 executes the non-transitory software programs, instructions, and modules stored in the memory 1102 to execute various functional applications and data processing of the server, thereby implementing the program instructions / modules corresponding to the method provided in any one or more of the above embodiments of the present application.

[0166] The memory 1102 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and applications required for at least one function; the data storage area may store data created based on the use of the electronic device, etc. In addition, the memory 1102 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory 1102 may optionally include a memory remotely located relative to the processor 1101, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0167] It should be noted that the computer-readable medium described in this application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above. Computer-readable media may be, for example, but not limited to: electrical, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or components, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory, an optical fiber, a portable compact disk read-only memory, an optical storage device, a magnetic storage device, or any suitable combination of the above. In this application, a computer-readable medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device or device.

[0168] Computer-readable media includes both permanent and non-permanent, removable and non-removable media, and can be implemented using any method or technology for information storage. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory, static random access memory, dynamic random access memory, other types of random access memory, read-only memory, electrically erasable programmable read-only memory, flash memory or other memory technology, compact discs, digital versatile discs or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device.

[0169] Computer program code for performing the operations of the present application can be written in one or more programming languages, or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as C or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network or a wide area network, or can be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0170] In the above-described embodiment, can realize wholly or in part by software, hardware, firmware or its arbitrary combination.For example, can adopt application-specific integrated circuit, general-purpose computer or any other similar hardware device to realize.In certain embodiments, the software program of the present application can be carried out to realize above steps or function by processor.Similarly, the software program of the present application (comprising relevant data structure) can be stored in computer-readable recording medium, for example, RAM memory, magnetic or optical drive or floppy disk and similar device.In addition, some steps or functions of the present application can adopt hardware to realize, for example, as the circuit that cooperates with processor to perform each step or function.

[0171] The computer program product provided by the embodiment of the present application includes one or more computer programs / instructions, and when the computer program / instructions are executed by the processor, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instruction can be stored in a computer-readable storage medium, or transmitted from a computer-readable storage medium to another computer-readable storage medium. For example, the computer instruction can be transmitted from a website, a computer, a server or a data center by wired (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.) mode to another website, a computer, a server or a data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, a data center that includes one or more available media integrations. The available medium can be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid-state hard disk) etc.

[0172] The flowcharts or block diagrams in the accompanying drawings illustrate the possible architectures, functions and operations of the devices, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, program segment or part of code, and the module, program segment or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, as well as the combination of boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-specific system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0173] The scope of this application is defined by the appended claims rather than the foregoing description and is therefore intended to encompass within this application all changes that come within the meaning and range of equivalents of the claims. Any reference signs in the claims should not be construed as limiting the claims to which they relate. In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in a device claim may also be implemented by one unit or device through software or hardware. Words such as "first" and "second" are only used to distinguish the description and do not indicate any particular order, nor should they be understood as indicating or implying relative importance.

[0174] The above descriptions are merely specific embodiments of the present application, but the scope of protection of the present application is not limited thereto. Any person skilled in the art may easily propose variations or substitutions within the technical scope disclosed in the present application, and such variations or substitutions shall be encompassed within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be subject to the scope of protection of the claims, and the above descriptions shall be regarded as exemplary and non-limiting.

Claims

1. An animation playing method, characterized in that: The method comprises: Determining a driving mode of the target object; the driving mode at least includes a driving mode based on an animation curve resource, the animation curve resource including original animation clips and animation curve data, the animation curve data pre-converted and generated through a real-time simulation process of a physics engine; Animation playback is performed according to the driving mode.

2. The method according to claim 1, characterized in that The method for determining the animation curve data includes: Determine object prototype data and object instance data; wherein the object prototype data is used to define the general properties, physical simulation parameters, and state backtracking rules of the target object; the object instance data is used to record the spatial position, personalized configuration, and backtracking mark of the target object in the game scene; Animation curve data is determined according to the object prototype data and the object instance data.

3. The method according to claim 2, characterized in that The method further comprises: If the mark information of the target object indicates that time can be traced back, then state traceability prototype data is derived; the state traceability prototype data is based on information of the animation state machine.

4. The method according to claim 2, characterized in that Determining the animation curve data according to the object prototype data and the object instance data includes: According to the backtracking mark and the physical simulation parameters, the object rigid body is set to a non-kinematic state, and the physical engine real-time simulation is activated; Collect the original motion data of the object during its motion; The animation curve data is determined according to the original motion data.

5. The method according to claim 4, characterized in that The raw motion data collected during the object's motion process includes: According to a fixed time step, the position data and attitude data of the object are collected; the position data includes three-channel coordinates of the position, and the attitude data includes quaternion coordinates of the rotation; The raw motion data is generated according to the position data and the posture data.

6. The method according to claim 4, characterized in that Determining the animation curve data according to the original motion data includes: Determining a basic animation curve based on the original motion data; wherein the basic animation curve is obtained by downscaling the original data; The animation curve data is determined according to the basic animation curve.

7. The method according to claim 6, characterized in that The method further includes: during the frequency reduction process, retaining unselected original frames as redundant frames for subsequent frame insertion correction; Correspondingly, determining the animation curve data according to the basic animation curve includes: Providing a visual preview interface to display the motion trajectory of the basic animation curve; In response to user instruction information, inserting a new key frame into the basic animation curve according to the redundant frame; wherein the key frame is used to correct the trajectory deviation; The animation curve data is generated according to the curve after the key frame is inserted.

8. The method according to claim 7, characterized in that After generating the animation curve data according to the curve after inserting the key frame, the method further includes: In response to a confirmation instruction from the user, the animation curve data is exported; wherein the animation curve data is used to be called when the game is running to drive the object to move.

9. The method according to claim 2, characterized in that The determining of the driving mode of the target object includes: Checking the path of the backtracking mark and the animation curve data according to the object prototype data and the object instance data; If the path of the animation curve data exists, the animation is played based on the driving mode of the animation curve resource.

10. The method according to claim 1, characterized in that Playing the animation according to the driving mode includes: If the animation is played based on the driving mode of the animation curve resource, a double-layer overlay operation is performed: the original animation clip replaces the original resource in the animation state machine, and the animation curve data is filled into the corresponding state of the state backtracking prototype data.

11. The method according to claim 10, characterized in that In the process of performing the double-layer covering operation, the method includes: Generating a target segment of the same length as the original animation segment after removing the displacement attribute; the target segment is used for placeholder playback to maintain the non-displacement attribute of the original animation segment; Filling the animation curve data into the state backtracking prototype data; the state backtracking prototype data is preset with an empty displacement curve placeholder that matches the animation state machine; Converting the animation curve data into a displacement control instruction set that can be directly called by a program; the instruction set includes real-time update data for controlling the position and orientation of the target object; The displacement control instruction set is bound to the state backtracking prototype data, while maintaining the non-displacement attribute of the original animation segment played through the target segment, thereby realizing animation playback based on the driving mode of the animation curve data.

12. The method according to claim 11, characterized in that Binding the displacement control instruction set to the state backtracking prototype data while maintaining the non-displacement attribute of the original animation clip played through the target clip to implement animation playback in a driving mode based on animation curve data includes: Establishing a data mapping relationship between state backtracking prototype data filled with a displacement control instruction set and a displacement channel of an animation state machine, so that the animation state machine can update the displacement properties of the target object in real time according to the instruction set; Based on the data mapping relationship, forward or reverse playback is performed; wherein, when executing forward or reverse playback, the state backtracking prototype data converts the displacement control instruction set into the position and orientation update of the target object through the event triggering mechanism of the animation state machine, while maintaining the non-displacement attributes of the original animation clip through the synchronous playback of the target clip, thereby realizing the separate driving of displacement and non-displacement attributes.

13. The method according to claim 12, characterized in that The performing forward or reverse playback based on the data mapping relationship includes: When forward playback is triggered, the original animation clip maintains the control logic of the non-displacement properties of the target segment, ensuring that the non-displacement properties of the target object are displayed according to the settings of the original animation clip. At the same time, the displacement control instruction set in the state backtracking prototype data updates the position and orientation of the target object in real time through the animation state machine, so that the movement of the target object conforms to the laws of physics. When reverse playback is triggered, the displacement control instruction set in the state backtracking prototype data is reversely parsed to restore the motion trajectory of the target object during forward playback. At the same time, the non-displacement attributes of the original animation clip are played through the target clip in reverse order along the time axis, realizing the backtracking of the displacement and non-displacement attributes of the target object in the time dimension.

14. The method according to any one of claims 1 to 13, characterized in that Playing the animation according to the driving mode includes: In response to a player's triggering action for time manipulation, in the driving mode, forward or reverse animation playback is performed on the target object to achieve time manipulation.

15. An electronic device, characterized in that: The electronic device comprises: one or more processors; and A memory storing computer program instructions, which, when executed, cause the processor to perform the steps of the method according to any one of claims 1 to 14.

16. A computer readable medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 14 are implemented.

17. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 14 are implemented.