Animation action storage method

Through methods such as acquisition, parameterization processing, segmented annotation and compression storage, the problem of low efficiency in the pre-art animation action saving and reuse in the existing technology is solved, and efficient storage and flexible reuse of animation actions is achieved.

CN119963700AInactive Publication Date: 2025-05-09JIAN COLLEGE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510042875.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-10
Publication Date
2025-05-09
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art has problems such as low storage efficiency, difficult reuse, and complex animation conversion in terms of preservation and reuse of animation actions.

Method used

Through animation generation software or real-time capture devices, collect motion data of animated characters or objects, perform parameterization processing, action segmentation and labeling, compression and storage, and finally export it into a standard animation file format.

Benefits of technology

It realizes efficient storage and flexible reuse of animation actions, improving storage efficiency and simplicity of animation conversion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119963700A_ABST
    Figure CN119963700A_ABST
Patent Text Reader

Abstract

The invention provides an animation action storage method. The animation action storage method comprises the following steps: step 1, action data acquisition; the collected motion data is subjected to parameterization processing, motion parameters of each key frame are associated with time, standardization processing is carried out, a standardized motion data unit is formed, and the motion parameters refer to positions, rotation and scaling parameters of all joints or nodes; step 3, action segmentation and labeling; step 4, compressing and storing; compared with the prior art, the method has the following beneficial effects that localized coordinate conversion based on a skeleton center and dynamic calculation of the speed and the acceleration are introduced, the influence of the overall displacement of a role on action data is reduced through localization processing, the adaptability of animation multiplexing is improved, and the animation action is exported. And speed and acceleration calculation is combined, so that a quantitative basis is provided for action segmentation, and the scientificity and accuracy of action analysis are enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the fields of computer graphics and animation technology, and in particular to a method for preserving animation actions. Background Art

[0002] With the development of the animation industry, especially the popularity of 3D animation and video games, developers and animators often need to use similar or identical animation actions multiple times in different projects. Most of the existing methods for saving and reusing animation actions use traditional keyframe storage technology or manual reuse through program scripts, which leads to problems such as low storage efficiency, difficulty in reuse, and complex animation conversion. Therefore, how to save and reuse animation actions more efficiently and flexibly has become an important issue in the industry. Summary of the invention

[0003] In view of the shortcomings of the prior art, the present invention aims to provide a method for preserving animation actions to solve the problems raised in the above-mentioned background technology.

[0004] The present invention is implemented by the following technical solution: a method for saving animation actions, comprising the following steps:

[0005] Step 1, motion data acquisition: obtain motion data of an animated character or object through animation generation software or real-time capture equipment, the motion data including motion trajectory, speed, acceleration motion parameters of each joint or node;

[0006] Step 2, motion parameterization processing: Parameterize the collected motion data, associate the motion parameters of each key frame with time, and normalize them to form standardized motion data units. The motion parameters refer to the position, rotation, and scaling parameters of each joint or node.

[0007] Step 3, action segmentation and annotation: divide the entire animation action into several action sub-segments, and annotate each sub-segment, such as "start", "continue", "end" and other states, to form a structured action data set;

[0008] Step 4, compression and storage: compress the standardized action data, using a time-series-based data compression algorithm to reduce storage space consumption. The compressed data can be stored in the local file system or cloud database;

[0009] Step 5, animation action export: Through a dedicated interface, export the reused animation actions to standard animation file formats, such as FBX, BVH or custom formats, for use in other projects.

[0010] As a preferred implementation, in step 1, after acquiring the motion data of the animated character or object through animation generation software or real-time capture equipment, the collected raw data is denoised and filtered to eliminate errors and noise in the capture process to ensure the smoothness and accuracy of the data.

[0011] As a preferred implementation, in step 2, the specific steps of action parameterization processing are:

[0012] Step 2.1, motion data normalization

[0013] Time unification: unify the motion data to the same timeline so that the motion parameters of each joint or node have a clear correspondence with time. This involves interpolating data at different timestamps to ensure smooth transitions between keyframes.

[0014] Spatial normalization: For the motion data of different models, the spatial scale needs to be unified. By setting a unified reference point, which is the origin of the character or the root node of the skeleton, all data are normalized in position and direction;

[0015] Joint or node parameterization: Convert the action parameters of each joint (such as position, rotation, scale) into a standardized numerical format, represented by quaternions (for rotation) and vectors (for position), and convert them into a unified format, such as (x, y, z) coordinates and rotation matrices or quaternions.

[0016] Step 2.2, motion rate and acceleration calculation

[0017] Speed ​​calculation: Calculate the movement speed of each joint or node by the position difference between the previous and next frames. For example, calculate the rate of change of position (velocity vector).

[0018] Acceleration calculation: Calculate the acceleration of each joint or node based on the velocity to help understand the change in velocity during motion.

[0019] Step 2.3, keyframe extraction and parameterization

[0020] Keyframe extraction: Extract keyframes from the entire action sequence. Keyframes are time points in the action that correspond to key postures or states of people or objects. Keyframes are determined by smooth curve analysis of motion trajectories or motion pattern recognition.

[0021] Keyframe standardization: The motion state (position, rotation, scale, etc.) of each keyframe will be extracted and standardized into a unified format for subsequent interpolation and reuse. For example, a combination of displacement vector and rotation quaternion can be used to represent the motion state of each keyframe.

[0022] Step 2.4, motion pattern recognition and classification

[0023] Movement pattern classification: Through cluster analysis algorithms or pattern recognition algorithms, actions are classified into different movement patterns. For example, running, jumping, walking and other patterns can be identified and classified based on speed, acceleration and coordinated movement patterns of joints.

[0024] Action sub-segment division: The entire action is divided into multiple sub-segments, each of which represents an independent movement phase (e.g., starting phase, continuing phase, ending phase). These sub-segments facilitate the flexible combination and reuse of actions.

[0025] Step 2.5, interpolation and transition processing

[0026] Interpolation algorithm: For the action data between adjacent keyframes, linear interpolation algorithm, spline interpolation algorithm, and Bezier curve interpolation algorithm are used to generate smooth transition data. This helps to eliminate abrupt changes between keyframes and ensure the smoothness of the animation.

[0027] Transition adjustment: Fine-tune the interpolation data according to different scenes and character needs to make the movements more natural and consistent with actual physical behaviors.

[0028] As a preferred implementation, in step 3, the specific steps of action segmentation and labeling are:

[0029] Step 3.1, motion data analysis and segmentation

[0030] Action feature analysis: Analyze the data of the entire animation action to identify different stages of movement. Common action features include acceleration, speed change, posture change, etc. Parameters such as speed, acceleration and angle change in animation data can help identify different stages of the action.

[0031] Motion pattern recognition: Through clustering algorithms, the entire animation is divided into multiple sub-segments, which correspond to different stages of the animation action, such as "starting stage", "execution stage", and "ending stage". For example, the running action can be divided into the starting stage, acceleration stage, stabilization stage, deceleration stage, and stop stage.

[0032] Step 3.2, joint or node motion analysis

[0033] Motion trajectory analysis: Analyze the motion trajectory of each joint or node of the animation character to identify different motion patterns or joint coordination. For example, in actions such as walking and running, the movement of the legs is usually relatively symmetrical, and the motion trajectory of the left and right legs can be analyzed to determine whether they belong to the same stage.

[0034] Turning point identification: Different sub-segments are identified by observing turning points in the motion trajectory, such as a sharp change in speed or a change in acceleration. For example, when running, when the foot leaves the ground and begins to propel forward, it can be identified as the end of the "starting phase" and the beginning of the "acceleration phase".

[0035] Step 3.3: Mark the start and end of the sub-segment

[0036] Sub-segment labeling: Based on the results of motion analysis, the animation action is divided into multiple sub-segments, each of which represents an independent stage in the action, and a label is added to each sub-segment. The specific labels are:

[0037] Start: Indicates the beginning stage of an action, such as a character starting to move from a stationary state.

[0038] Sustain: Indicates the continuous part of an action, such as the acceleration and stabilization stages of a character while running.

[0039] End: Indicates the end stage of an action, such as a character slowing down and stopping running.

[0040] Label the properties of sub-segments: In addition to the basic "start", "duration", and "end", you can also add more detailed labels to each sub-segment according to specific needs, such as "acceleration phase", "deceleration phase", "turning phase", etc., to help express the details of the action more accurately.

[0041] Step 3.4, Segmentation based on velocity and acceleration

[0042] Speed ​​change analysis: Based on speed data (such as linear speed, angular velocity, etc.), identify the acceleration phase, deceleration phase or uniform speed phase of the action, calculate the speed change of each joint or node, and divide the action into different segments.

[0043] Acceleration change analysis: In sports movements (such as jumping and running), the change in acceleration is used as the basis for segmenting the movement. For example, the start, rise, apex and descent phases of a jump can be distinguished by the change in acceleration.

[0044] Step 3.5, Dynamic Adjustment and Optimization

[0045] Adjusting sub-segment division: Sometimes, relying solely on speed and acceleration changes is not enough to accurately divide the sub-segments. In this case, it is necessary to further adjust the segmentation in combination with data from visual analysis or motion capture equipment. For example, by observing the movement of different joints in the animation, you can determine which stages should be classified into the same segment.

[0046] Optimize sub-segment transitions: In some cases, the beginning and end of a segment may not be smooth. In this case, the interpolation algorithm or smoothing of the motion trajectory can be used to optimize the segment transitions to make the motion smooth and natural.

[0047] Step 3.6, cross-role or cross-scenario adaptation

[0048] Universal annotation system: When the same animation action needs to be reused across multiple characters or different scenes, create a universal annotation system for it to facilitate adaptation. For example, divide all characters' "running" actions into unified stage annotations such as "start", "acceleration", "stabilization" and "stop", so that the reuse and adjustment of actions in different characters or scenes will be more flexible.

[0049] Step 3.7, storage and management of action segments

[0050] Data structure design: Create a data structure for each action segment so that the annotation information of each segment can be effectively stored and queried. Each sub-segment contains the following:

[0051] Time Range: Indicates the timestamps of the start and end of the subsegment.

[0052] Motion state: includes the state of each joint (position, rotation, scale, etc.) and its parameters.

[0053] Labels: such as "start", "acceleration", "deceleration".

[0054] Storage method: Store the information of each action segment in a standard format such as JSON, XML or other custom formats as needed to facilitate subsequent query and reuse.

[0055] As a preferred implementation, in step 4, the specific steps of compression and storage are:

[0056] Step 4.1, data preprocessing

[0057] Denoising and smoothing: Before compression, the animation data is denoised to ensure data quality. A filtering algorithm is used to remove noise caused by capture device errors or environmental factors to ensure the smoothness of the animation data.

[0058] Time alignment and normalization: Ensure that all data is aligned to a unified time axis. The motion data of different joints and nodes are synchronized according to a unified timestamp, and each data item (such as position, rotation, scale, etc.) is normalized for subsequent compression.

[0059] Step 4.2, Compression of Action Data

[0060] Time series data compression: Most animation data is stored in the form of time series, including joint positions, rotation angles, speeds, accelerations, etc. In order to reduce storage space, a time series compression algorithm can be used, for example: encoding the joint positions or rotation differences between adjacent time points instead of storing absolute positions. This can significantly reduce the amount of data that needs to be stored. If certain motion parameters remain unchanged for a long time (for example, a joint remains stationary), the RLE algorithm is used to compress the continuous and identical data into a number and the number of repetitions, thereby reducing storage requirements. Wavelet transform is performed on the motion data to compress the high-frequency part of the motion trajectory and retain only the meaningful low-frequency part, thereby reducing the amount of data.

[0061] Parameter precision control: According to the needs of the application scenario, the precision of some data can be appropriately reduced. For example, the rotation angle of the joint can use fewer decimal places instead of being very precise. This compression method of reducing precision can significantly reduce storage space without affecting the animation quality.

[0062] Keyframe compression: For keyframe data, the relative changes between keyframes are compressed instead of storing detailed data for each keyframe. For example, an interpolation algorithm is used to generate transition data between keyframes, thereby reducing the storage of specific values ​​for each keyframe and reducing storage overhead.

[0063] Step 4.3, Data Optimization and Standardization

[0064] Data standardization: Standardize animation data to make different action data formats uniform. For example, convert all data into a unified coordinate system and time unit to facilitate compression algorithm processing.

[0065] Structured storage: Action data is stored by joints, nodes, timelines, etc., and these data are structured to make compression and access more efficient. Commonly used storage structures include tree structures (such as skeleton structure trees), timeline arrays, etc.

[0066] Dimension optimization: If some dimensions in the animation data (such as joint rotation, scaling, etc.) are redundant, dimension compression can be performed. For example, dimensionality reduction algorithms such as principal component analysis (PCA) can be used to compress redundant data into a low-dimensional space to reduce storage overhead.

[0067] Step 4.4, compression algorithm selection

[0068] Select lossless compression algorithm, ZIP compression algorithm, LZ77, LZ78 compression algorithm, Huffman coding compression algorithm, lossy compression algorithm, JPEG compression algorithm, video compression algorithm according to the situation.

[0069] Lossless compression algorithm: ensures that data is completely restored without any loss of information. Commonly used lossless compression algorithms are:

[0070] ZIP: A common lossless compression format suitable for general data storage.

[0071] LZ77, LZ78: Dictionary-based compression algorithms that can effectively compress duplicate data.

[0072] Huffman coding: used to compress frequently occurring data and improve storage efficiency.

[0073] Lossy compression algorithm: For the part of animation data that does not require high precision, a lossy compression algorithm can be used, sacrificing some data precision in exchange for a higher compression ratio. Common lossy compression algorithms are:

[0074] JPEG compression: Suitable for image data, but works better when used for texture data compression in animation.

[0075] Video compression (such as H.264, HEVC): For animation data involving video frames, video compression standards can be used to compress the image frames.

[0076] Step 4.5, Data Storage

[0077] After the animation action data is compressed, select the file format for local storage, cloud storage, or database storage:

[0078] Local storage: Store the compressed animation data in a local hard disk or SSD. File formats (such as JSON, XML, FBX, BVH, glTF, etc.) are usually used to store data, and the compressed data can be stored as files in these standard formats. Depending on the file size, you can choose to store a single file or multiple files (segmented storage).

[0079] Cloud storage: For animation data that needs to be accessed across platforms or managed efficiently, you can choose to upload the data to cloud storage services (such as AWS, Google Cloud, Azure, etc.). Cloud storage can provide high availability, scalability, and flexibility, and is suitable for the storage needs of large-scale animation projects.

[0080] Database storage: For large-scale animation data (especially those that need to be frequently retrieved and updated), you can choose to store the compressed data in a database, such as a relational database (MySQL, PostgreSQL) or a NoSQL database (MongoDB, Cassandra). Database storage is suitable for handling complex queries and data access scenarios.

[0081] File format selection: The compressed data needs to be stored in a suitable file format. Common storage formats include:

[0082] FBX: Widely used in 3D animation, supports the storage of information such as joints, bones, and key frames.

[0083] BVH: Mainly used to store motion capture data, suitable for the compression and storage of motion data.

[0084] glTF: An open JSON format widely used in web and game applications, supporting 3D models, animations, materials, etc.

[0085] Custom format: According to project requirements, you can also design a custom file format for storage, which is usually combined with a specific compression algorithm and storage structure.

[0086] After adopting the above technical solution, the beneficial effects of the present invention are:

[0087] 1. Multi-dimensional analysis of action parameterization processing

[0088] Traditional motion capture technology usually only saves joint coordinate data, while this method introduces localized coordinate transformation based on the skeleton center and dynamic calculation of velocity and acceleration. Through localized processing, the influence of the overall displacement of the character on the motion data is reduced, and the adaptability of animation reuse is improved. Combined with velocity and acceleration calculation, it provides a quantitative basis for motion segmentation and enhances the scientificity and accuracy of motion analysis.

[0089] 2. Action segmentation and annotation based on dynamic features

[0090] In the prior art, segmentation is usually done manually or at fixed time intervals, while this method uses the dynamic changes in speed and acceleration to automatically segment and annotate actions based on segmentation features. The dynamic feature-driven automatic segmentation algorithm makes action segmentation more consistent with actual physical laws and reduces manual intervention. The annotation results not only include the time range, but also can be associated with feature descriptions, providing higher accuracy for subsequent action management and retrieval.

[0091] 3. Differential coding and key frame extraction for compression and storage

[0092] Traditional methods usually save the absolute coordinate data of all frames, while this method combines key frame extraction and differential coding for efficient compression. Differential coding only saves the displacement changes between frames, greatly reducing redundant data and improving storage efficiency. Key frame extraction is based on the change points of speed and acceleration, ensuring that important information is not lost while significantly reducing the amount of data. BRIEF DESCRIPTION OF THE DRAWINGS

[0093] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0094] Figure 1 The present invention is a schematic diagram of the steps of a method for saving animation actions. DETAILED DESCRIPTION

[0095] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0096] See also Figure 1 The present invention provides a technical solution: a method for saving animation actions, comprising the following steps:

[0097] Step 1, motion data acquisition: obtain motion data of an animated character or object through animation generation software or real-time capture equipment, the motion data including motion trajectory, speed, acceleration motion parameters of each joint or node;

[0098] Step 2, motion parameterization processing: Parameterize the collected motion data, associate the motion parameters of each key frame with time, and normalize them to form standardized motion data units. The motion parameters refer to the position, rotation, and scaling parameters of each joint or node.

[0099] Step 3, action segmentation and annotation: divide the entire animation action into several action sub-segments, and annotate each sub-segment, such as "start", "continue", "end" and other states, to form a structured action data set;

[0100] Step 4, compression and storage: compress the standardized action data, using a time-series-based data compression algorithm to reduce storage space consumption. The compressed data can be stored in the local file system or cloud database;

[0101] Step 5, animation action export: Through a dedicated interface, export the reused animation actions to standard animation file formats, such as FBX, BVH or custom formats, for use in other projects.

[0102] In step 1, after acquiring the motion data of the animated character or object through the animation generation software or the real-time capture device, the collected raw data is denoised and filtered to eliminate the errors and noise in the capture process and ensure the smoothness and accuracy of the data.

[0103] As an embodiment of the present invention, in Embodiment 1: in step 2, the specific steps of action parameterization processing are:

[0104] Step 2.1, motion data normalization

[0105] Time unification: unify the motion data to the same timeline so that the motion parameters of each joint or node have a clear correspondence with time. This involves interpolating data at different timestamps to ensure smooth transitions between keyframes.

[0106] Spatial normalization: For the motion data of different models, the spatial scale needs to be unified. By setting a unified reference point, which is the origin of the character or the root node of the skeleton, all data are normalized in position and direction;

[0107] Joint or node parameterization: Convert the action parameters of each joint (such as position, rotation, scale) into a standardized numerical format, represented by quaternions (for rotation) and vectors (for position), and convert them into a unified format, such as (x, y, z) coordinates and rotation matrices or quaternions.

[0108] Step 2.2, motion rate and acceleration calculation

[0109] Speed ​​calculation: Calculate the movement speed of each joint or node by the position difference between the previous and next frames. For example, calculate the rate of change of position (velocity vector).

[0110] Acceleration calculation: Calculate the acceleration of each joint or node based on the velocity to help understand the change in velocity during motion.

[0111] Step 2.3, keyframe extraction and parameterization

[0112] Keyframe extraction: Extract keyframes from the entire action sequence. Keyframes are time points in the action that correspond to key postures or states of people or objects. Keyframes are determined by smooth curve analysis of motion trajectories or motion pattern recognition.

[0113] Keyframe standardization: The motion state (position, rotation, scale, etc.) of each keyframe will be extracted and standardized into a unified format for subsequent interpolation and reuse. For example, a combination of displacement vector and rotation quaternion can be used to represent the motion state of each keyframe.

[0114] Step 2.4, motion pattern recognition and classification

[0115] Movement pattern classification: Through cluster analysis algorithms or pattern recognition algorithms, actions are classified into different movement patterns. For example, running, jumping, walking and other patterns can be identified and classified based on speed, acceleration and coordinated movement patterns of joints.

[0116] Action sub-segment division: The entire action is divided into multiple sub-segments, each of which represents an independent movement phase (e.g., starting phase, continuing phase, ending phase). These sub-segments facilitate the flexible combination and reuse of actions.

[0117] Step 2.5, interpolation and transition processing

[0118] Interpolation algorithm: For the action data between adjacent keyframes, linear interpolation algorithm, spline interpolation algorithm, and Bezier curve interpolation algorithm are used to generate smooth transition data. This helps to eliminate abrupt changes between keyframes and ensure the smoothness of the animation.

[0119] Transition adjustment: Fine-tune the interpolation data according to different scenes and character needs to make the movements more natural and consistent with actual physical behaviors.

[0120] Suppose there is a character model performing a "running" action. The specific steps are as follows:

[0121] Data collection: Use motion capture equipment to collect motion data of each joint of the person during running, such as displacement and rotation information of shoulders, knees, ankles and other parts.

[0122] Time unification: Ensure that the motion data of all joints can be aligned according to a unified timeline (for example, 30 frames per second).

[0123] Normalization of motion data: Normalize the position of the entire body of the character and set it to the position relative to the origin (for example, set the plane of the sole of the character's feet to the zero point of the world coordinate system). At the same time, the rotation information is saved in the form of quaternions.

[0124] Keyframe extraction: The key moments in the running action (such as starting, accelerating, decelerating, and stopping) are selected as keyframes. The joint position, rotation, speed, acceleration and other information of each keyframe are stored in a standardized manner.

[0125] Interpolation and transition: Generate a smooth transition between two keyframes through interpolation algorithms (such as spline curves). For example, the position and rotation of each joint can be smoothly interpolated during the process of running from starting to accelerating.

[0126] Storage: The final standardized data is stored as an FBX format file, which contains the motion trajectory and time information of all joints, making it easy to reuse or import into other projects.

[0127] As an embodiment of the present invention, Embodiment 2:

[0128] In step 3, the specific steps of action segmentation and labeling are:

[0129] Step 3.1, motion data analysis and segmentation

[0130] Action feature analysis: Analyze the data of the entire animation action to identify different stages of movement. Common action features include acceleration, speed change, posture change, etc. Parameters such as speed, acceleration and angle change in animation data can help identify different stages of the action.

[0131] Motion pattern recognition: Through clustering algorithms, the entire animation is divided into multiple sub-segments, which correspond to different stages of the animation action, such as "starting stage", "execution stage", and "ending stage". For example, the running action can be divided into the starting stage, acceleration stage, stabilization stage, deceleration stage, and stop stage.

[0132] Step 3.2, joint or node motion analysis

[0133] Motion trajectory analysis: Analyze the motion trajectory of each joint or node of the animation character to identify different motion patterns or joint coordination. For example, in actions such as walking and running, the movement of the legs is usually relatively symmetrical, and the motion trajectory of the left and right legs can be analyzed to determine whether they belong to the same stage.

[0134] Turning point identification: Different sub-segments are identified by observing turning points in the motion trajectory, such as a sharp change in speed or a change in acceleration. For example, when running, when the foot leaves the ground and begins to propel forward, it can be identified as the end of the "starting phase" and the beginning of the "acceleration phase".

[0135] Step 3.3: Mark the start and end of the sub-segment

[0136] Sub-segment labeling: Based on the results of motion analysis, the animation action is divided into multiple sub-segments, each of which represents an independent stage in the action, and a label is added to each sub-segment. The specific labels are:

[0137] Start: Indicates the beginning stage of an action, such as a character starting to move from a stationary state.

[0138] Sustain: Indicates the continuous part of an action, such as the acceleration and stabilization stages of a character while running.

[0139] End: Indicates the end stage of an action, such as a character slowing down and stopping running.

[0140] Label the properties of sub-segments: In addition to the basic "start", "duration", and "end", you can also add more detailed labels to each sub-segment according to specific needs, such as "acceleration phase", "deceleration phase", "turning phase", etc., to help express the details of the action more accurately.

[0141] Step 3.4, Segmentation based on velocity and acceleration

[0142] Speed ​​change analysis: Based on speed data (such as linear speed, angular velocity, etc.), identify the acceleration phase, deceleration phase or uniform speed phase of the action, calculate the speed change of each joint or node, and divide the action into different segments.

[0143] Acceleration change analysis: In sports movements (such as jumping and running), the change in acceleration is used as the basis for segmenting the movement. For example, the start, rise, apex and descent phases of a jump can be distinguished by the change in acceleration.

[0144] Step 3.5, Dynamic Adjustment and Optimization

[0145] Adjusting sub-segment division: Sometimes, relying solely on speed and acceleration changes is not enough to accurately divide the sub-segments. In this case, it is necessary to further adjust the segmentation in combination with data from visual analysis or motion capture equipment. For example, by observing the movement of different joints in the animation, you can determine which stages should be classified into the same segment.

[0146] Optimize sub-segment transitions: In some cases, the beginning and end of a segment may not be smooth. In this case, the interpolation algorithm or smoothing of the motion trajectory can be used to optimize the segment transitions to make the motion smooth and natural.

[0147] Step 3.6, cross-role or cross-scenario adaptation

[0148] Universal annotation system: When the same animation action needs to be reused across multiple characters or different scenes, create a universal annotation system for it to facilitate adaptation. For example, divide all characters' "running" actions into unified stage annotations such as "start", "acceleration", "stabilization" and "stop", so that the reuse and adjustment of actions in different characters or scenes will be more flexible.

[0149] Step 3.7, storage and management of action segments

[0150] Data structure design: Create a data structure for each action segment so that the annotation information of each segment can be effectively stored and queried. Each sub-segment contains the following:

[0151] Time Range: Indicates the timestamps of the start and end of the subsegment.

[0152] Motion state: includes the state of each joint (position, rotation, scale, etc.) and its parameters.

[0153] Labels: such as "start", "acceleration", "deceleration".

[0154] Storage method: Store the information of each action segment in a standard format such as JSON, XML or other custom formats as needed to facilitate subsequent query and reuse.

[0155] Assuming there is a running animation, the specific operations of segmentation and annotation are as follows:

[0156] Data collection: A series of data about the position, speed, and acceleration of the character's joints are collected, recording the entire process from starting to stopping.

[0157] Motion analysis: Using velocity and acceleration data, the following motion phases are identified:

[0158] Starting stage: the speed gradually increases from 0.

[0159] Acceleration phase: The speed increases rapidly until it reaches the maximum value.

[0160] Stable phase: The speed remains constant.

[0161] Deceleration phase: the speed gradually decreases.

[0162] Stop phase: speed drops to 0.

[0163] Segmentation and labeling:

[0164] Start: Indicates that the character starts to accelerate from a stationary state.

[0165] Acceleration: The character accelerates rapidly until it reaches its maximum speed.

[0166] Sustain: The character runs at a steady speed.

[0167] Deceleration: The character starts to slow down.

[0168] End: The character stops running and returns to a stationary state.

[0169] Optimization: Based on the acceleration and speed changes, further adjust the timing and transition of sub-segments to make the animation smoother.

[0170] Storage and reuse: The data of each sub-segment (including timestamp, motion parameters, annotation labels, etc.) is stored in the database for subsequent reuse in other scenarios.

[0171] As an embodiment of the present invention, Embodiment 3:

[0172] In step 4, the specific steps of compression and storage are:

[0173] Step 4.1, data preprocessing

[0174] Denoising and smoothing: Before compression, the animation data is denoised to ensure data quality. A filtering algorithm is used to remove noise caused by capture device errors or environmental factors to ensure the smoothness of the animation data.

[0175] Time alignment and normalization: Ensure that all data is aligned to a unified time axis. The motion data of different joints and nodes are synchronized according to a unified timestamp, and each data item (such as position, rotation, scale, etc.) is normalized for subsequent compression.

[0176] Step 4.2, Compression of Action Data

[0177] Time series data compression: Most animation data is stored in the form of time series, including joint positions, rotation angles, speeds, accelerations, etc. In order to reduce storage space, a time series compression algorithm can be used, for example: encoding the joint positions or rotation differences between adjacent time points instead of storing absolute positions. This can significantly reduce the amount of data that needs to be stored. If certain motion parameters remain unchanged for a long time (for example, a joint remains stationary), the RLE algorithm is used to compress the continuous and identical data into a number and the number of repetitions, thereby reducing storage requirements. Wavelet transform is performed on the motion data to compress the high-frequency part of the motion trajectory and retain only the meaningful low-frequency part, thereby reducing the amount of data.

[0178] Parameter precision control: According to the needs of the application scenario, the precision of some data can be appropriately reduced. For example, the rotation angle of the joint can use fewer decimal places instead of being very precise. This compression method of reducing precision can significantly reduce storage space without affecting the animation quality.

[0179] Keyframe compression: For keyframe data, the relative changes between keyframes are compressed instead of storing detailed data for each keyframe. For example, an interpolation algorithm is used to generate transition data between keyframes, thereby reducing the storage of specific values ​​for each keyframe and reducing storage overhead.

[0180] Step 4.3, Data Optimization and Standardization

[0181] Data standardization: Standardize animation data to make different action data formats uniform. For example, convert all data into a unified coordinate system and time unit to facilitate compression algorithm processing.

[0182] Structured storage: Action data is stored by joints, nodes, timelines, etc., and these data are structured to make compression and access more efficient. Commonly used storage structures include tree structures (such as skeleton structure trees), timeline arrays, etc.

[0183] Dimension optimization: If some dimensions in the animation data (such as joint rotation, scaling, etc.) are redundant, dimension compression can be performed. For example, dimensionality reduction algorithms such as principal component analysis (PCA) can be used to compress redundant data into a low-dimensional space to reduce storage overhead.

[0184] Step 4.4, compression algorithm selection

[0185] Select lossless compression algorithm, ZIP compression algorithm, LZ77, LZ78 compression algorithm, Huffman coding compression algorithm, lossy compression algorithm, JPEG compression algorithm, video compression algorithm according to the situation.

[0186] Lossless compression algorithm: ensures that data is completely restored without any loss of information. Commonly used lossless compression algorithms are:

[0187] ZIP: A common lossless compression format suitable for general data storage.

[0188] LZ77, LZ78: Dictionary-based compression algorithms that can effectively compress duplicate data.

[0189] Huffman coding: used to compress frequently occurring data and improve storage efficiency.

[0190] Lossy compression algorithm: For the part of animation data that does not require high precision, a lossy compression algorithm can be used, sacrificing some data precision in exchange for a higher compression ratio. Common lossy compression algorithms are:

[0191] JPEG compression: Suitable for image data, but works better when used for texture data compression in animation.

[0192] Video compression (such as H.264, HEVC): For animation data involving video frames, video compression standards can be used to compress the image frames.

[0193] Step 4.5, Data Storage

[0194] After the animation action data is compressed, select the file format for local storage, cloud storage, or database storage:

[0195] Local storage: Store the compressed animation data in a local hard disk or SSD. File formats (such as JSON, XML, FBX, BVH, glTF, etc.) are usually used to store data, and the compressed data can be stored as files in these standard formats. Depending on the file size, you can choose to store a single file or multiple files (segmented storage).

[0196] Cloud storage: For animation data that needs to be accessed across platforms or managed efficiently, you can choose to upload the data to cloud storage services (such as AWS, Google Cloud, Azure, etc.). Cloud storage can provide high availability, scalability, and flexibility, and is suitable for the storage needs of large-scale animation projects.

[0197] Database storage: For large-scale animation data (especially those that need to be frequently retrieved and updated), you can choose to store the compressed data in a database, such as a relational database (MySQL, PostgreSQL) or a NoSQL database (MongoDB, Cassandra). Database storage is suitable for handling complex queries and data access scenarios.

[0198] File format selection: The compressed data needs to be stored in a suitable file format. Common storage formats include:

[0199] FBX: Widely used in 3D animation, supports the storage of information such as joints, bones, and key frames.

[0200] BVH: Mainly used to store motion capture data, suitable for the compression and storage of motion data.

[0201] glTF: An open JSON format widely used in web and game applications, supporting 3D models, animations, materials, etc.

[0202] Custom format: According to project requirements, you can also design a custom file format for storage, which is usually combined with a specific compression algorithm and storage structure.

[0203] Assuming you have a large animation project with multiple character animations, here are the steps to compress and store:

[0204] Preprocessing:

[0205] All collected motion data are denoised and smoothed.

[0206] Ensure that all data is aligned to a common timeline and normalized.

[0207] compression:

[0208] Differential encoding is applied to the motion data of each animated character to reduce redundant data.

[0209] The RLE compression algorithm is used to process motion data in the stationary phase.

[0210] Apply wavelet compression to data such as velocity, acceleration, and rotation to preserve important low-frequency information.

[0211] The transition between key frames is generated through an interpolation algorithm to reduce the key frame data required for storage.

[0212] storage:

[0213] Stores compressed animation data in FBX format files.

[0214] Use the ZIP algorithm to compress the entire animation package to reduce storage space.

[0215] Upload compressed files to cloud storage for easy collaboration and remote access.

[0216] Read and decompress:

[0217] When you need to use these animations, download the compressed package from the cloud and decompress it.

[0218] Stream the decompressed data and load it into memory for playback or editing.

[0219] Through these steps, animation data can be stored and managed in an efficient manner while maintaining high-quality animation effects.

[0220] As an embodiment of the present invention, Embodiment 4:

[0221] In this embodiment, the working principle of the animation action saving method is mainly described.

[0222] For a running animation of a person, this animation contains motion data of multiple joints (such as knees, ankles, elbows, shoulders, etc.) and body parts. The motion data is collected by a motion capture device, parameterized, segmented, and compressed and stored, and finally exported into a reusable animation format. The following are the specific steps of the embodiment:

[0223] Step 1: Motion data collection

[0224] First, use a motion capture device (such as Vicon, OptiTrack, or Kinect) to collect motion data. Set a running action scene, and the participant needs to perform normal running movements. The device will capture the movement trajectory of the participant's joints and body parts.

[0225] Data example:

[0226] Timestamp (t): From 0 seconds to 5 seconds, data is collected every 0.1 seconds.

[0227] Joint data: X, Y, Z coordinates and rotation angles of each joint (such as left knee, right knee, left ankle, right ankle, left elbow, right elbow, etc.).

[0228]

[0229]

[0230] Each row of data represents the joint position at a point in time (for example, the position of the left knee), and each column of data is the X, Y, and Z coordinates.

[0231] Step 2: Action parameterization

[0232] After the motion data is collected, the next step is to perform motion parameterization, that is, convert these raw data into standardized parameters, such as speed, acceleration, angle change, etc. These processing steps can make the data more concise and convenient for subsequent compression and storage.

[0233] step:

[0234] Position data conversion: Convert the X, Y, and Z coordinates of each joint into relative positions in the local coordinate system.

[0235] Velocity calculation: Calculate the velocity of each joint based on adjacent timestamps. For example, the velocity of the left knee between 0 seconds and 0.1 seconds is:

[0236]

[0237] Acceleration calculation: Calculate acceleration based on velocity changes.

[0238]

[0239] The purpose of this step is to simplify the motion data for subsequent processing and compression.

[0240] Step 3: Action segmentation and labeling

[0241] After parameterization, action segmentation and annotation are required. This process breaks down the entire animation into multiple action stages, such as "starting stage", "acceleration stage", "stabilization stage", etc. Each stage represents an independent sub-action in the animation, which is convenient for subsequent editing and adjustment.

[0242] step:

[0243] Action phase division: Based on speed and acceleration data, different action phases can be divided. For example, based on the change in speed, the running action can be divided into the following phases:

[0244] Starting stage (0-1 second): the speed gradually increases.

[0245] Acceleration phase (1-3 seconds): The speed increases rapidly and approaches the maximum value.

[0246] Stabilization phase (3-4 seconds): The speed remains constant.

[0247] Deceleration phase (4-5 seconds): The speed gradually decreases.

[0248] Data example:

[0249] In the time frame:

[0250] Starting phase (0-1 second): The speed is low at the beginning of the starting phase and gradually accelerates.

[0251] Acceleration phase (1-3 seconds): The speed increases and approaches the maximum value.

[0252] Stable stage (3-4 seconds): The speed remains stable and runs at a basically constant speed.

[0253] Deceleration phase (4-5 seconds): Near the end, the speed gradually decreases until it stops.

[0254] Step 4: Compression and storage

[0255] According to the animation data obtained in the above steps, we compress it to reduce storage space. Common compression methods include differential coding, key frame compression and lossy compression.

[0256] Differential encoding: The difference between each timestamp and the previous timestamp is stored. For example, position data stores relative position changes rather than absolute positions.

[0257] Keyframe compression: Only the time points with significant changes are retained as keyframes, and other frames are restored through interpolation. For example, only keyframes are recorded at moments with large speed changes, and other moments are restored through linear interpolation.

[0258] Data Format: The compressed data is stored in FBX or BVH file format and further compressed using ZIP.

[0259] These compressed keyframe data are stored in a compressed file.

[0260] Step 5: Export animation actions

[0261] After the data is compressed and stored, users can export the animation action data as needed for animation playback or further editing. The export process involves decompression and decoding, and converting the compressed data back into a visual animation format.

[0262] step:

[0263] Decompression: Users download the compressed package (such as motion_data.zip) and decompress it to get the FBX file.

[0264] Decoding: Load the FBX file through an animation engine (such as Unity3D, Unreal Engine) and read the key frame data.

[0265] Interpolation and playback: During playback, the motion data of non-key frames is filled in through the interpolation algorithm to finally present the animation effect.

[0266] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for saving animation actions, characterized in that: The following steps are involved: Step 1, motion data acquisition: obtain motion data of an animated character or object through animation generation software or real-time capture equipment, the motion data including motion trajectory, speed, acceleration motion parameters of each joint or node; Step 2, motion parameterization processing: perform parameterization processing on the collected motion data, associate the motion parameters of each key frame with time, and perform normalization processing to form a standardized motion data unit. The motion parameters refer to the position, rotation, and scaling parameters of each joint or node; Step 3, action segmentation and annotation: divide the entire animation action into several action sub-segments, and annotate each sub-segment to form a structured action dataset; Step 4, compression and storage: compress the standardized action data, using a time-series-based data compression algorithm to reduce storage space consumption. The compressed data can be stored in the local file system or cloud database; Step 5, animation action export: Through a dedicated interface, export the reused animation actions into a standard animation file format for use in other projects.

2. The method for saving an animation action according to claim 1, characterized in that: In step 1, after acquiring the motion data of the animated character or object through the animation generation software or the real-time capture device, the collected raw data is denoised and filtered to eliminate the errors and noise in the capture process and ensure the smoothness and accuracy of the data.

3. The method for saving an animation action according to claim 1, characterized in that: In step 2, the specific steps of action parameterization processing are: Step 2.1, motion data normalization Time unification: unify the motion data to the same timeline, so that the motion parameters of each joint or node have a clear correspondence with time; Spatial normalization: For the motion data of different models, the spatial scale needs to be unified. By setting a unified reference point, which is the origin of the character or the root node of the skeleton, all data are normalized in position and direction. Joint or node parameterization: convert the action parameters of each joint into a standardized numerical format, represented by quaternions and vectors, and convert them into a unified format; Step 2.2, motion rate and acceleration calculation Speed ​​calculation: Calculate the movement speed of each joint or node, and obtain it through the position difference between the previous and next two frames; Acceleration calculation: Calculate the acceleration of each joint or node based on the speed to help understand the change of speed during movement; Step 2.3, keyframe extraction and parameterization Keyframe extraction: Extract keyframes from the entire action sequence. Keyframes are time points in the action that correspond to key postures or states of people or objects. Keyframes are determined by smooth curve analysis of motion trajectories or motion pattern recognition. Keyframe standardization: The motion state of each keyframe will be extracted and standardized into a unified format for subsequent interpolation and reuse; Step 2.4, motion pattern recognition and classification Movement pattern classification: Classify actions into different movement patterns through cluster analysis algorithms or pattern recognition algorithms; Action sub-segment division: the entire action is divided into multiple sub-segments, each sub-segment represents an independent movement stage; Step 2.5, interpolation and transition processing Interpolation algorithm: For the action data between adjacent key frames, linear interpolation algorithm, spline interpolation algorithm, and Bezier curve interpolation algorithm are used to generate smooth transition data; Transition adjustment: Fine-tune the interpolation data according to different scenes and character needs to make the movements more natural and consistent with actual physical behaviors.

4. The method for saving an animation action as claimed in claim 3, characterized in that: In step 3, the specific steps of action segmentation and labeling are: Step 3.1, motion data analysis and segmentation Motion feature analysis: Analyze the data of the entire animation action and identify different movement stages; Motion pattern recognition: Through clustering algorithms, the entire animation is divided into multiple sub-segments, which correspond to different stages of animation actions, such as "start-up stage", "execution stage", and "end stage"; Step 3.2, joint or node motion analysis Motion trajectory analysis: Analyze the motion trajectory of each joint or node of the animation character to identify different motion patterns or joint coordination; Turning point identification: Determine different sub-segments by observing the turning points in the motion trajectory; Step 3.3: Mark the start and end of the sub-segment Sub-segment labeling: Based on the results of motion analysis, the animation action is divided into multiple sub-segments, each of which represents an independent stage in the action, and a label is added to each sub-segment; Mark the properties of the sub-segment: In addition to the basic "start", "duration", and "end", you can also add more detailed annotations for each sub-segment according to specific needs; Step 3.4, Segmentation based on velocity and acceleration Speed ​​change analysis: Based on speed data, identify the acceleration phase, deceleration phase or uniform speed phase of the action, calculate the speed change of each joint or node, and divide the action into different segments; Acceleration change analysis: In sports movements, the change in acceleration is used as the basis for segmenting the movement; Step 3.5, Dynamic Adjustment and Optimization Optimize sub-segment transition: Optimize the segment transition through interpolation algorithm or smoothing the motion trajectory to make the movement natural and smooth; Step 3.6, cross-role or cross-scenario adaptation Universal annotation system: When the same animation action needs to be reused across multiple characters or different scenes, create a universal annotation system for it; Step 3.7, storage and management of action segments Data structure design: Create a data structure for each action segment so that the annotation information of each segment can be effectively stored and queried. Each sub-segment contains the following: Time range: indicates the timestamps of the start and end of the sub-segment; Motion state: including the state of each joint and its parameters; Labels: such as "start", "acceleration", "deceleration"; Storage method: Store the information of each action segment in a standard format as needed to facilitate subsequent query and reuse.

5. The method for saving an animation action according to claim 1, characterized in that: In step 4, the specific steps of compression and storage are: Step 4.1, data preprocessing Denoising and smoothing: Before compression, the animation data is denoised to ensure data quality; Time alignment and normalization: The motion data of different joints and nodes are synchronized according to a unified timestamp, and each data item is normalized for subsequent compression; Step 4.2, Compression of Action Data Time series data compression: Encode the joint position or rotation difference of adjacent time points. When some motion parameters remain unchanged for a long time, use the RLE algorithm to compress the continuous identical data into a number and the number of repetitions. Perform wavelet transform on the motion data to compress the high-frequency part of the motion trajectory and retain only the meaningful low-frequency part, thereby reducing the amount of data. Key frame compression: For key frame data, the relative changes between key frames are compressed; Step 4.3, Data Optimization and Standardization Data standardization: standardize the animation data to make different action data formats uniform; Structured storage: The motion data is stored by category, such as joints, nodes, and timelines, and the data is structured to make compression and access more efficient; Step 4.4, compression algorithm selection Select lossless compression algorithm, ZIP compression algorithm, LZ77, LZ78 compression algorithm, Huffman coding compression algorithm, lossy compression algorithm, JPEG compression algorithm, video compression algorithm according to the situation. Step 4.5, Data Storage After the animation action data is compressed, select the file format for local storage, cloud storage, or database storage.