Menu
Lumberyard
Legacy Reference

Compressing Character Animations

For best results, try to employ character assets that use the least amount of memory but are animated at the highest possible quality. An uncompressed animation contains a key for every frame in the animation and for each joint that has been exported. The goal is to reduce the amount of joints and keys to minimize the size. There are separate channels for rotation keys and position keys per joint.

For maximum compression, remove from the animation any joints that don't contribute much to the animation. To know whether a joint contributes to an animation, use the Resource Compiler, which determines how much the joint moves during the animation and compares it to the provided epsilon values. If the joint moves less than what the epsilon specifies, the keys will be removed for the joint. Use higher epsilon values to remove more joints. Use Position Epsilon for the position channel and Rotation Epsilon for the rotation channel.

Removing Joints Automatically

The two epsilon values are global values for the entire animation. Additive animations have smaller movements, so small values are used for the epsilon values.

Either all the keys are retained for a channel (position and rotation), or they are deleted.

To remove joints automatically

  1. In Geppetto, in the Properties panel, expand Compression, Controller Removal Threshold.

  2. Change the values for Position Epsilon and Rotation Epsilon as needed.

Removing Joints Manually

By default, each joint uses two epsilon values to determine whether the joint is removed.

To remove individual joints manually

  1. In Geppetto, in the Properties panel, expand Compression, Per-Joint Settings and then select the check box next to the joint to delete it. Both the Position and Rotation channels are removed for the selected joint.

  2. Enter a value in the box next to the joint to change the multiplier that is applied to the compression value. By default this value is 1.

Animation Tags

Each animation can have a list of tags associated with it. You can use tags to accomplish the following:

  • Select animations that have to go into a specific DBA table by means of an animation filter.

  • Apply compression to a group of animation files by means of compression presets

Tags are located in the Properties panel when you select an animation in the Assets panel.

To add a new tag, click the number beside Tags and click Add.

Animation Filters

Use an animation filter to choose a set of animation files for specific DBA or compression preset. An animation filter is defined as a tree of condition nodes.

DBA files are bundles of animations that can be streamed in and out as one. They are typically smaller and take up less memory than individual animations. DBAs are created using the same filters as compression presets. You can define a combination of criteria such as location, name, or tags to select animations for a specific DBA.

DBA descriptions are saved to Animations/DBATable.json. The resource compiler uses this .json file at build time to create the actual DBA files. The DBA Table can be found under Compression (Animations/) in the Assets panel.

DBA Table Options

Conditions Description
Empty filter No conditions applied
And Succeeds when all of the child conditions succeed.
Or Succeeds when at least one of the child conditions succeeds.
In folder Checks whether animation is located within a specific directory.
Has tags Checks whether animation has all of the listed tags. Tags are stored in ANIMSETTINGS and can be set in Animation Properties.
Contains in name Checks for a substring within an animation name.
Contains in path Checks whether animation is located within a specific file path.
Skeleton alias Checks whether animation uses a specific skeleton alias. Skeleton aliases are defined in the skeleton table.

Compression Presets

You can use compression presets to apply the same set of compression rules to multiple animations at once. Presets are listed under Compression (Animations/) in the Assets panel.

Each compression preset entry defines a filter that can match animations according to a certain filter. Filter criteria can include a folder, file name, or tags. You can use logical operations to combine these criteria into a complex condition like "in folder and doesn't contain specific tag but has substring in name." When multiple presets match the same animation, only the first one is used. You can preview which compression setting entry was applied to animation in the Properties panel by selecting a specific animation in the Assets panel.