A multi-track controllable animation control system and method independent of a three-dimensional engine
By using a multi-track controllable animation control system that does not rely on a 3D engine, the problems of high system coupling and low control accuracy in existing technologies are solved. It achieves high decoupling and portability, supports complex animation control and event synchronization, and improves the flexibility and accuracy of animation control.
Patent Information
- Application Number
- CN202511120415.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-12
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2045-08-12
AI Technical Summary
Existing animation control systems rely on 3D engines, resulting in high system coupling, difficulty in cross-platform deployment, non-customizable and non-expandable animation tracks, limited control precision, inability to achieve fine-grained rewinding, skipping, and multi-event synchronization, and data cannot be saved and configured independently of the 3D engine.
This invention provides a multi-track controllable animation control system that does not rely on a 3D engine. It includes an animation control module, an animation track module, a keyframe data module, an interpolation processing module, and an animation track event addition module. These modules enable animation time management, track control, interpolation processing, and event triggering. The system supports forward playback, reverse playback, time jump, pause, and other behaviors of the animation. It also supports any type of attribute control and interpolation method and can be expanded as needed.
It achieves high decoupling and portability, significantly improves the accuracy and controllability of animation control, adapts to complex performance and dynamic feedback scenarios, supports event triggering and process control at any time point, and reduces the coupling between the animation presentation layer and other logic control layers.
Abstract
Description
Technical Field
[0001] This invention relates to the field of animation control technology, specifically to a multi-track controllable animation control system and method that does not rely on a 3D engine. Background Technology
[0002] Most existing animation control systems rely on 3D engines. The time-driven, track management, and event control of these systems are deeply coupled to the internal structure of the engine, causing the following problems: high system coupling, making it difficult to deploy across platforms; animation tracks cannot be customized and extended, resulting in high modification costs; limited control precision, making it impossible to achieve fine-grained rewinding, skipping, and multi-event synchronization; and data cannot be saved and configured independently of the 3D engine. Summary of the Invention
[0003] This invention addresses the shortcomings of existing technologies by providing a multi-track controllable animation control system and method that does not rely on a 3D engine, thus preventing the precise animation management and customizable execution in a pure code environment.
[0004] The technical solution of the present invention to solve the above-mentioned technical problems is as follows:
[0005] On the one hand, it provides a multi-track controllable animation control system that does not rely on a 3D engine, including an animation control module, an animation track module, a keyframe data module, an interpolation processing module, and an animation track event addition module;
[0006] The animation control module is used to maintain the current animation time, total animation duration, playback speed, and control the time progression, time jump settings, and animation playback pause of the animation track;
[0007] The animation track module is used to encapsulate the track properties to be executed into an animation track, and call the corresponding module to execute the animation track based on the time parameters and the track properties to be executed;
[0008] The keyframe data module is used to store the values of attributes at any point in time and the interpolation type used in the current keyframe segment;
[0009] The interpolation module provides a time-value mapping function. Based on the keyframe interval to which the current time belongs, it calculates the interpolation between two keyframes using the mapping function. Through interpolation, it achieves smooth transitions between frames and generates continuous animation effects.
[0010] Add an animation track event module to control the triggering of animation events via event callbacks.
[0011] The animation control module is built upon the core component for creating animation control classes.
[0012] The core components of the animation control class include animation control properties and animation control methods;
[0013] Animation control attributes include the current animation playback time, total animation duration, playback speed, playback status flags, and a collection of stored animation tracks;
[0014] Animation control methods include adding animation tracks, starting or pausing playback, jumping to a specified time point and updating the status of all tracks, time progression, and registering and calling multiple tracks.
[0015] The animation control module controls the time progression of the animation track, specifically in the following way:
[0016] Detect whether the animation is playing; if it is playing, calculate the time increment of the current animation playback time based on the playback speed and the frame time difference. Time increment = Speed × frame time difference. When Speed is positive, play forward; when Speed is negative, play backward.
[0017] Determine if the current time is within the range of 0 to the total animation duration; if so, iterate through all animation tracks and call the current animation playback time for each track.
[0018] The animation control module controls the time jump settings of the animation track, specifically in the following way:
[0019] Receive the target time parameter for time jump, determine whether the target time parameter is limited to the range of 0 to the total animation duration, if so, set the target time parameter for the current time, traverse all animation tracks, and pass the call status of each animation track to the current animation playback time.
[0020] The animation track module is built based on the animation track class properties, which include interpolation processing methods, callback events, and animation track execution.
[0021] The interpolation processing module is constructed by defining interpolation processing attributes and methods, including keyframe sets and interpolation processing algorithms.
[0022] The interpolation processing module calculates the interpolation between two keyframes based on a mapping function, according to the keyframe interval to which the current time belongs. Specifically, the method is as follows:
[0023] Receive the current time parameter, locate the current time parameter in the keyframe set, and find the previous keyframe that is less than or equal to the current time parameter and the next keyframe that is greater than the current time parameter;
[0024] The time ratio is calculated based on the keyframe interval obtained from the positioning. The time ratio is the difference between the current time and the previous keyframe time divided by the difference between the subsequent keyframe time and the previous keyframe time.
[0025] The interpolation value is calculated by substituting the previous keyframe value, the next keyframe value, the time ratio, and the interpolation type of the current frame segment into the interpolation processing algorithm.
[0026] The module for adding animation track events controls the triggering of animation events, and the specific method is as follows:
[0027] Add event trigger points based on the total animation duration;
[0028] Receive the current time parameter and iterate through all event trigger times. If the current time is greater than or equal to the event trigger time and there is an untriggered event, immediately invoke that event and mark it as triggered.
[0029] On the other hand, a multi-track controllable animation control method independent of a 3D engine is provided, applied to the aforementioned multi-track controllable animation control system independent of a 3D engine, including:
[0030] Step 1: Initialize the properties of the animation control class and set the total animation duration;
[0031] Step 2: Create animation tracks for the interpolation processing class and the event triggering class;
[0032] Step 3: Add keyframe data and event callback properties to the animation track and store them in the animation control class;
[0033] Step 4: Set the animation control class to running state and start the animation playback;
[0034] Step 5: The animation control module controls the event progression of the animation track and updates the current time; the interpolation processing module performs interpolation calculations based on the current time and controls the inter-frame transition of the animation track; the animation track time addition module performs event callbacks based on the current time and controls the event triggering callbacks of the animation track.
[0035] Step 6: The animation control module controls the playback / pause of the animation based on the playback status indicator and playback speed;
[0036] Step 7: End playback.
[0037] Beneficial effects: This invention is a multi-track controllable animation control system and method that does not rely on a 3D engine. The multi-track controllable animation control system does not rely on a graphics engine at all, has pure implementation logic, is applicable to any system with a code execution environment, and has high decoupling and portability.
[0038] It supports forward playback, reverse playback, time jump, pause and other behaviors of animation, which significantly improves the accuracy and controllability of animation control, adapts to complex performance and dynamic feedback scenarios, and has a flexible animation control mechanism.
[0039] The track structure supports any type of attribute control and interpolation method, and can be extended as needed to achieve highly configurable multi-dimensional animation behavior.
[0040] It supports embedding event-driven animation logic. Through the event track mechanism, the system can realize function triggering, flow control, state change, etc. at any point in time, and supports complete decoupling between demonstration and logic. Detailed Implementation
[0041] Exemplary embodiments of this disclosure will now be described in more detail. The examples given are for illustrative purposes only and are not intended to limit the scope of the invention.
[0042] This embodiment provides a multi-track controllable animation control system that does not rely on a 3D engine, including an animation control module, an animation track module, a keyframe data module, an interpolation processing module, and an animation track event addition module.
[0043] Among them, the animation control module serves as the core of global animation scheduling. It is used to maintain the current animation time, total animation duration, and playback speed, and to control the time progression, time jump settings, and animation playback pause of the animation track.
[0044] The animation control module is built upon the core components for creating animation control classes, which include animation control properties and animation control methods.
[0045] The animation control attributes include the current animation playback time, total animation duration, playback speed, playback status indicator, and a set of stored animation tracks, which are represented as follows:
[0046] float CurrentTime; / / Current animation playback time
[0047] float Duration; / / Total animation duration
[0048] float Speed; / / Playback speed
[0049] bool IsPlaying; / / Playback status indicator
[0050] List <itrack>tracks = new List <itrack>(); / / Stores a collection of animation tracks.
[0051] The animation control method includes adding animation tracks, starting or pausing playback, jumping to a specified time point and updating the status of all tracks, time progression, and multi-track registration and invocation, which are respectively represented as follows:
[0052] AddTrack(ITrack track); / / Add an animation track.
[0053] void Play(); / / Start playing.
[0054] void Pause(); / / Pause playback
[0055] void Seek(float time); / / Jump to the specified time point and update the status of all orbits.
[0056] void Tick(float deltaTime); / / Advance time.
[0057] Evaluate(time); / / Multitrack call.
[0058] The animation control module controls the time progression of all animation tracks via Tick (float deltaTime), specifically as follows:
[0059] Detect whether the animation is playing; if it is playing, calculate the time increment of the current animation playback time based on the playback speed and frame time difference. Time increment = Speed × frame time difference. When Speed is positive, play forward; when Speed is negative, play backward. Determine whether the current time is limited to the range of 0 to the total animation duration; if so, iterate through all animation tracks and call the current animation playback time of each animation track.
[0060] The animation control module controls the time jump settings of the animation track through Seek (float time), specifically as follows:
[0061] Receive the target time parameter for time jump, determine whether the target time parameter is limited to the range of 0 to the total animation duration, if so, set the target time parameter for the current time, traverse all animation tracks, and pass the call status of each animation track to the current animation playback time.
[0062] The animation control module uses Play() and Pause() to control the playback and pause of animations. Specifically: to start playback, the playback status flag is set to true, and the playback mode is determined based on the positive or negative value of the playback speed; to pause playback, the playback status flag is set to false.
[0063] The animation track module is used to encapsulate the track properties to be executed into an animation track, and to call the corresponding module to execute the animation track based on the time parameters and the track properties to be executed.
[0064] The animation track module is built based on animation track class attributes, which include interpolation processing method, callback events, and animation track execution, respectively represented as follows:
[0065] CustomCurve <float>curve; / / Current animation track interpolation method
[0066] Action <float>onUpdate; / / callback event when the animation is played every frame
[0067] void Evaluate(float time); / / animation track execution
[0068] The number of created animation tracks is added according to the demand of the system for the number of animations, and the interpolation processing method is set when the animation track is created. The same animation track is responsible for only one kind of animation behavior as much as possible, so as to facilitate the overall management. If the callback event is not needed, it can not be set. The system will detect whether the event state is empty. If it is not empty, the callback event will be executed.
[0069] Further, the number of created animation tracks is optimized by the following operations:
[0070] First, according to the animation behavior, the track attributes are classified, and the track attributes belonging to the same animation behavior are divided into the same group.
[0071] Then, the time parameters of the track attributes in the same group are obtained, and arranged in the order of starting time from early to late.
[0072] After comparison, if the starting time of the next track attribute is after the ending time of the previous track attribute, all track attributes meeting the condition are encapsulated into the same animation track, and arranged according to the order of starting time.
[0073] On the basis of the above operation, the number of created animation tracks can also be optimized by the following operation:
[0074] For track attributes that do not belong to the same animation behavior, the similarity of all animation behaviors is obtained. The track attributes corresponding to the animation behaviors with a similarity less than a similarity threshold can be encapsulated into the same animation track, and arranged according to the order of starting time. The similarity of animation behaviors can be represented by DTW (Dynamic Time Warping) distance. The smaller the distance, the more similar.
[0075] The key frame data module is used to store the value of the attribute at any time point and the interpolation type adopted by the current key frame segment (i.e. the key frame to the next key frame).
[0076] The key frame data module is constructed based on key frame data class attributes, which include key frame timestamp, key frame numerical value and key frame interpolation type, and are respectively represented as:
[0077] float Time; / / key frame timestamp,
[0078] T Value; / / key frame numerical value,
[0079] InterpolationType Interpolation; / / Interpolation type for the current frame segment.
[0080] Keyframe data is the fundamental data unit in an animation system, used to record the value state and interpolation type of an attribute at a specific point in time. Each animation track consists of multiple keyframes, forming a discrete time-value mapping sequence. The interpolation processing module automatically selects the corresponding algorithm based on the keyframe interpolation type, resulting in different animation effects for each track. This avoids explicitly defining the attribute values for each frame, saving data storage and improving animation generation efficiency.
[0081] The keyframe interpolation types include linear interpolation, constant interpolation, easing interpolation, and custom interpolation.
[0082] Specifically, there are: Linear interpolation: values transition linearly; Step interpolation: no change, maintaining the current value; EaseInOut interpolation: non-linear interpolation; and Custom interpolation: can be passed to an external function for custom interpolation.
[0083] The interpolation module provides a time-value mapping function. Based on the keyframe interval to which the current time belongs, it calculates the interpolation between two keyframes using the mapping function. Through interpolation, it achieves smooth transitions between frames and generates continuous animation effects.
[0084] The interpolation processing module is constructed by defining interpolation processing attributes and methods. The interpolation processing attributes include a keyframe set and an interpolation processing algorithm, expressed as follows:
[0085] List <Keyframe <t>keyframes; / / keyframe set
[0086] Func<T, T, float, T> lerpFunc; / / interpolation processing algorithm.
[0087] The interpolation processing module calculates the interpolation between two keyframes based on the mapping function according to the keyframe interval to which the current time belongs, in a specific manner as follows:
[0088] Receive the current time parameter and locate the current time parameter in the keyframe set to find the previous keyframe less than or equal to the current time parameter and the next keyframe greater than the current time parameter.
[0089] Calculate the time ratio based on the keyframe interval obtained by positioning, which is the difference between the current time and the previous keyframe time divided by the difference between the next keyframe time and the previous keyframe time, i.e. time ratio = (current time - previous keyframe time) ÷ (next keyframe time - previous keyframe time).
[0090] Substitute the previous keyframe value, next keyframe value, time ratio, and interpolation type of the current frame segment of the keyframe interval into the interpolation processing algorithm to obtain the interpolation.
[0091] The interpolation processing module records different keyframe segments in a single track. Each keyframe structure contains keyframe time, keyframe value, and interpolation type. When the system performs the Evaluate operation, it automatically selects the corresponding algorithm based on the interpolation type of the segment to which the current time belongs, such as linear interpolation, constant interpolation, and easing interpolation, thereby achieving more rich and expressive animation transition effects.
[0092] Add an animation track event module to control animation event triggering through event callback.
[0093] The animation track event module is constructed based on event callback properties and methods, including storing event time points and callback functions, and a set of triggered events, which are represented as:
[0094] Dictionary<float, Action> events; / / store event time points and callback functions,
[0095] HashSet <float>TriggeredEventSet triggered; / / Triggered event set.
[0096] The adding animation track event module controls the triggering of animation events through an event callback method, and the specific manner is as follows:
[0097] Adding an event trigger time point based on the total length of the animation;
[0098] Receiving a current time parameter, and traversing all event trigger time points, if the current time is greater than or equal to the event trigger time, and there is an untriggered event, the event is immediately called and marked as triggered.
[0099] The adding animation track event module allows users to define a set of event nodes (time points → callback functions) on the animation timeline. When the animation plays to the time point, the system will automatically trigger the corresponding logical event, realizing the synchronization of animation playback control and function logic. This module is mainly used to improve the extensibility of the animation system, reduce the coupling degree between the animation presentation layer and other logical control layers, and enhance the modular structure of the system. It can be used in complex dynamic content display, interactive feedback, process control and other scenarios. If other modules do not interact with the animation control system, this module can be set not to be used, which does not affect the overall operation of the animation system.
[0100] In addition, based on the above multi-track controllable animation control system, a multi-track controllable animation control method independent of a three-dimensional engine is implemented, and the specific implementation steps are as follows:
[0101] Step 1, initialize the properties of the animation control class, and set the total length of the animation;
[0102] Step 2, create an interpolation processing class and an event trigger class animation track;
[0103] Step 3, add key frame data and event callback attributes to the animation track, and store them in the animation control class;
[0104] Step 4, set the animation control class to the running state, and start the animation playback;
[0105] Step 5, the animation control module controls the event advance of the animation track, and updates the current time; the interpolation processing module performs interpolation calculation according to the current time to control the interframe transition of the animation track; the adding animation track time module performs event callback according to the current time to control the event trigger callback of the animation track;
[0106] Step 6, the animation control module controls the animation playback / pause according to the playback state identifier and the playback speed;
[0107] Step 7, end the playback.< / float> < / t> < / float> < / float> < / itrack> < / itrack>
Claims
1. A multi-track controllable animation control system that does not rely on a 3D engine, characterized in that, It includes an animation control module, an animation track module, a keyframe data module, an interpolation processing module, and an animation track event addition module; The animation control module is used to maintain the current animation time, total animation duration, and playback speed, and to control the time progression, time jump settings, and animation playback pause of the animation track. The animation control module controls the time progression of the animation track in the following specific way: Detect whether the animation is playing; if it is playing, calculate the time increment of the current animation playback time based on the playback speed and the frame time difference. Time increment = Speed × frame time difference. When Speed is positive, play forward; when Speed is negative, play backward. Determine if the current time is within the range of 0 to the total animation duration; if so, iterate through all animation tracks and call the current animation playback time for each track. The animation track module is used to encapsulate the track properties to be executed into an animation track, and call the corresponding module to execute the animation track based on the time parameters and the track properties to be executed; The keyframe data module is used to store the values of attributes at any point in time and the interpolation type used in the current keyframe segment; The interpolation module provides a time-value mapping function. Based on the keyframe interval to which the current time belongs, it calculates the interpolation between two keyframes using the mapping function. This interpolation enables smooth transitions between frames, generating continuous animation effects. Specifically, the interpolation module calculates the interpolation between two keyframes based on the mapping function, within the keyframe interval to which the current time belongs. Receive the current time parameter, locate the current time parameter in the keyframe set, and find the previous keyframe that is less than or equal to the current time parameter and the next keyframe that is greater than the current time parameter; The time ratio is calculated based on the keyframe interval obtained from the location, and the time ratio is (current time - previous keyframe time) / (later keyframe time - previous keyframe time). The interpolation value is calculated by substituting the previous keyframe value, the next keyframe value, the time ratio, and the interpolation type of the current frame segment into the interpolation processing algorithm. Add an animation track event module to control the triggering of animation events via event callbacks.
2. The multi-track controllable animation control system according to claim 1, characterized in that, The animation control module is built upon the core component for creating animation control classes.
3. The multi-track controllable animation control system according to claim 2, characterized in that, The core components of the animation control class include animation control properties and animation control methods; Animation control attributes include the current animation playback time, total animation duration, playback speed, playback status flags, and a collection of stored animation tracks; Animation control methods include adding animation tracks, starting or pausing playback, jumping to a specified time point and updating the status of all tracks, time progression, and registering and calling multiple tracks.
4. The multi-track controllable animation control system according to claim 1, characterized in that, The animation control module controls the time jump settings of the animation track, specifically in the following way: Receive the target time parameter for time jump, determine whether the target time parameter is limited to the range of 0 to the total animation duration, if so, set the target time parameter for the current time, traverse all animation tracks, and pass the call status of each animation track to the current animation playback time.
5. The multi-track controllable animation control system according to claim 1, characterized in that, The animation track module is built based on the animation track class attributes, which include interpolation processing method, callback events, and animation track execution.
6. The multi-track controllable animation control system according to claim 1, characterized in that, The interpolation processing module is constructed by defining interpolation processing attributes and methods, including keyframe sets and interpolation processing algorithms.
7. The multi-track controllable animation control system according to claim 1, characterized in that, The module for adding animation track events controls the triggering of animation events, and the specific method is as follows: Add event trigger points based on the total animation duration; Receive the current time parameter and iterate through all event trigger times. If the current time is greater than or equal to the event trigger time and there is an untriggered event, immediately invoke that event and mark it as triggered.
8. A multi-track controllable animation control method independent of a 3D engine, applied to the multi-track controllable animation control system independent of a 3D engine as described in claim 1, characterized in that, include: Step 1: Initialize the properties of the animation control class and set the total animation duration; Step 2: Create animation tracks for the interpolation processing class and the event triggering class; Step 3: Add keyframe data and event callback properties to the animation track and store them in the animation control class; Step 4: Set the animation control class to running state and start the animation playback; Step 5: The animation control module controls the event progression of the animation track and updates the current time; the interpolation processing module performs interpolation calculations based on the current time and controls the inter-frame transition of the animation track; the animation track time addition module performs event callbacks based on the current time and controls the event triggering callbacks of the animation track. Step 6: The animation control module controls the playback / pause of the animation based on the playback status indicator and playback speed; Step 7: End playback.
Citation Information
Patent Citations
Animation managing system and method based on template
CN103617041A
Method and device for controlling animated cartoon playing speed
CN107562417A