Search public documentation:
Making use of animation compression is a straightforward process in Unreal Engine 3. This document covers the main classes and data structures involved and provides an overview of how to go about using animation compression. For details about the various compression algorithms, please see the Animation Compression Algorithms page. For information on the editor controls for previewing and modifying animation compression, please see the Animation Compression page.
Below are some important terms used throughout this document that need to be understood:
- Key - A set of data points defining the position and rotation of an individual bone at a specific time.
- Track - A set of keys describing the motion an individual bone over time.
- AnimSequence - A set of Tracks defining the motion of all the bones making up an entire skeleton.
- AnimSet - A set of related AnimSequences which all play on the same skeleton.
What follows is a description of each of the compression formats, represented internally as the enum AnimationCompressionFormat. These enums are assigned to UAnimSequence's TranslationCompressionFormat and RotationCompressionFormat members, and, in conjunction with an AnimSequence::CompressionScheme member, denote what type of compression and key reduction has been applied to the animation sequence. At full precision, translations are stored as three-vectors (3x32bit floats), while rotations are stored as quaternions (4x32bit floats). Note that the current set of compression algorithms only compress rotation information and do not compress translation. Except for ACF_None, the following formats apply only to rotation data only. For all formats, the w coordinate of the normalized quaternion is derived from the imaginary coordinates, which are stored as follows:
- ACF_None - Translation/rotation data is stored at full precision (3x32bit for translation, 4x32bit for rotation).
- ACF_Float96NoW - Imaginary coordinates of rotation keys are stored as 3x32bit floats.
- ACF_Fixed48NoW - Imaginary coordinates of rotation keys are stored as 3x16bit quantized floats.
- ACF_IntervalFixed32NoW - Imaginary coordinates of rotation keys are stored quantized to 11 bits for X, 11 bits for y, 10 bits for z, but with the range of quantization remapped to the interval spanned by the coordinate values for that track.
- ACF_Fixed32NoW - Imaginary coordinates of rotation keys are stored quantized to 11 bits for X, 11 bits for y, 10 bits for z.
- ACF_Float32NoW - Imaginary coordinates of rotation keys are stored as reduced-precision floats; 7e3 for x, 7e3 for y, 6e3 z.
- ACF_Float96NoW - Perceptually loss-less, poor compression
- ACF_Fixed48NoW - Mid-high quality, decent compression
- ACF_IntervalFixed32NoW - Mid quality, good compression
Key reduction schemes are the algorithms that are used to eliminate key frames in Unreal Engine 3. The key reduction schemes transform the raw animation data stored in the RawAnimData member into the separated TranslationData and RotationData streams. These new streams can contain completely different keys from what exists in the raw data. Typical schemes might remove unneeded keys, resample existing keys, and so on. These keys are then compressed according to the requested translation and rotation formats desribed in the Compression Formats section. Currently, the following key reduction schemes are supplied with Unreal Engine 3:
- Bitwise Compress Only - No key reduction is performed -- in other words, compression comes only from the specified bitwise compression format.
- Remove Trivial Keys - Reduces tracks where all keys are the same value down to a single key.
- Remove Every Second Key - Every second key is eliminated.
- Revert To Raw - Restores the raw animation data by outputing no translation/rotation keys for bitwise compression.