UE3 Animation Compression Algorithms

Animation Compression Algorithms


  • Animation Compression Algorithms
    • Overview
    • Compression Algorithms
      • Automatic
      • Bitwise Compress Only
      • Remove Every Second Key
      • Remove Linear Keys
      • Compress Each Track Independently
      • Remove Trivial Keys
      • Revert To Raw

Overview


This document contains detailed descriptions of the animation compression algorithms provided within Unreal Engine 3 and available to be applied to animations within the  Animation Compression Dialog  in the  AnimSet Editor .

For information on the editor controls for previewing and modifying animation compression, please see the Animation Compression Dialog page.

For a technical guide for programmers to working with animation compression in Unreal Engine 3, please see the Animation Compression Technical Guide.

Compression Algorithms


Unreal Engine 3 has several existing animation compression algorithms that are provided in the base engine implementation. These are detailed below.

Automatic


The Automatic animation compression algorithm is essentially a shell for trying the range of other compression schemes and picking the one which results in the smallest memory footprint within a configurable error threshold.

Properties

  • Max End Effector Error - As keys are tested for removal, we monitor the effects all the way down to the end effectors. This is the maximum amount of error that a compression technique can introduce to an end effector. The error threshold (0.0 means don't try anything other than the current / default scheme).
  • Try Fixed Bitwise Compression - If true, the uniform bitwise techniques will be tried.
  • Try Per Track Bitwise Compression - If true, the per-track compressor techniques will be tried.
  • Try Linear Key Removal Compression - If true, the linear key removal techniques will be tried.
  • Try Interval Key Removal - If true, the resampling techniques will be tried.
  • Run Current Default Compressor - If true, then the animation will be first recompressed with it's current compressor if non null, or with the global default compressor (specified in the BaseEngine.ini).
  • Auto Replace If Extisting Error Is Too Great - If true and the existing compression error is greater than Max End Effector Error, then any compression technique (even one that increases the size) with a lower error will be used until it falls below the threshold.
  • Raise Max Error To Existing - If true and the existing compression error is greater than Max End Effector Error, then Max End Effector Error will be effectively raised to the existing error level.

Bitwise Compress Only


The Bitwise Compress Only animation compression algorithm only performs bitwise animation compression on the rotation and translation tracks of the animation sequence. No key reduction is performed with this algorithm.

Properties

  • Rotation Compression Format - The format for bitwise compression of rotation data. Defaults to ACF_Float96NoW.

Remove Every Second Key


The Remove Every Second Key animation compression algorithm performs a key reduction by simply removing every second key from the rotation and translation tracks of the animation sequence in addition to performing a bitwise animation compression on the rotation and translation tracks of the animation sequence.

Properties

  • Min Keys - The minimum number of keys that must be present in order to perform the key reduction. Animations with fewer than Min Keys will not lose any keys.
  • Start At Second Key - If true, the second key is removed and then every other key. If false, the first key is removed and then every other key.
  • Rotation Compression Format - The format for bitwise compression of rotation data. Defaults to ACF_Float96NoW.

Remove Linear Keys


The Remove Linear Keys animation compression algorithm performs a key reduction by removing keys which are linear interpolations of surrounding keys in addition to performing a bitwise animation compression on the rotation and translation tracks of the animation sequence. This means that keys which fall on a linear path between the key before and the key after will be removed as they are unnecessary.

Properties

  • Max Pos Diff - Maximum position difference to use when testing if an animation key may be removed. Lower values retain more keys, but yield less compression.
  • Max Angle Diff - Maximum angle difference to use when testing if an animation key may be removed. Lower values retain more keys, but yield less compression.
  • Max Effector Diff - As keys are tested for removal, we monitor the effects all the way down to the end effectors. If their position changes by more than this amount as a result of removing a key, the key will be retained. This value is used for all bones except the end-effectors parent.
  • Min Effector Diff - As keys are tested for removal, we monitor the effects all the way down to the end effectors. If their position changes by more than this amount as a result of removing a key, the key will be retained. This value is used for the end-effectors parent, allowing tighter restrictions near the end of a skeletal chain.
  • Parent Key Scale - A scale value which increases the likelihood that a bone will retain a key if its parent also had a key at the same time position. Higher values can remove shaking artifacts from the animation, at the cost of compression.
  • Retarget - If true, as the animation is compressed, animated nodes will be adjusted to compensate for compression error.
  • Actually Filter Linear Keys - If true, the final filtering step will occur. If false, only the retargetting after bitwise compression will occur. If both this and Retarget are false, then the linear compressor will do no better than the underlying bitwise compressor, extremely slowly.
  • Rotation Compression Format - The format for bitwise compression of rotation data. Defaults to ACF_Float96NoW.

Compress Each Track Independently


The Compress Each Track Independently animation compression algorithm performs a key reduction by removing keys which are linear interpolations of surrounding keys in addition to choosing the best bitwise compression for each track, rotation and translation, independently.

Properties

  • Max Zeroing Threshold - Maximum threshold to use when replacing a component with zero. Lower values retain more keys, but yield less compression.
  • Max Pos Diff Bitwise - Maximum position difference to use when testing if an animation key may be removed. Lower values retain more keys, but yield less compression.
  • Max Angle Diff Bitwise - Maximum angle difference to use when testing if an animation key may be removed. Lower values retain more keys, but yield less compression.
  • Allowed Rotation Formats - Which encoding formats is the per-track compressor allowed to try on rotation keys.
  • Allowed Translation Formats - Which encoding formats is the per-track compressor allowed to try on translation keys.
  • Resample Animation - If true, resample the animation to Resample Framerate frames per second.
  • Use Adaptive Error - If true, adjust the error thresholds based on the 'height' within the skeleton.
  • Use Override For End Effectors - If true, uses MinEffectorDiff as the threhsold for end effectors.
  • Use Adaptive Error 2 - If true, the adaptive error system will determine how much error to allow for each track, based on the error introduced in end effectors due to errors in the track.
  • Resampled Framerate - When Resample Animation is true, this defines the desired framerate. This is only enabled when Resample Animation is true.
  • Min Keys For Resampling - The minimum number of keys an animation can have in order to remove keys. Animations with fewer keys than this will not be resampled.
  • Track Height Bias - A bias added to the track height before using it to calculate the adaptive error.
  • Parenting Divisor / Parenting Divisor Exponent - Reduces the error tolerance the further up the tree that a key occurs. Only has an effect if Use Adaptive Error is true. The calculation for the error tolerance is:

   EffectiveErrorTolerance = Max(BaseErrorTolerance / Power(ParentingDivisor, Max(Height + Bias,0) * ParentingDivisorExponent), ZeroingThreshold)
   

  • Rotation Error Source Ratio - This ratio determines how much error in end effector rotation can come from a given track's rotation error or translation error. If 1, all of it must come from rotation error, if 0.5, half can come from each, and if 0.0, all must come from translation error.
  • Translation Error Source Ratio - This ratio determines how much error in end effector translation can come from a given track's rotation error or translation error. If 1, all of it must come from rotation error, if 0.5, half can come from each, and if 0.0, all must come from translation error.
  • Max Error Per Track Ratio - A fraction that determines how much of the total error budget can be introduced by any particular track.
  • Max Pos Diff - Maximum position difference to use when testing if an animation key may be removed. Lower values retain more keys, but yield less compression.
  • Max Angle Diff - Maximum angle difference to use when testing if an animation key may be removed. Lower values retain more keys, but yield less compression.
  • Max Effector Diff - As keys are tested for removal, we monitor the effects all the way down to the end effectors. If their position changes by more than this amount as a result of removing a key, the key will be retained. This value is used for all bones except the end-effectors parent.
  • Min Effector Diff - As keys are tested for removal, we monitor the effects all the way down to the end effectors. If their position changes by more than this amount as a result of removing a key, the key will be retained. This value is used for the end-effectors parent, allowing tighter restrictions near the end of a skeletal chain.
  • Parent Key Scale - A scale value which increases the likelihood that a bone will retain a key if it's parent also had a key at the same time position. Higher values can remove shaking artifacts from the animation, at the cost of compression.
  • Retarget - If true, as the animation is compressed, animated nodes will be adjusted to compensate for compression error.
  • Actually Filter Linear Keys - If true, the final filtering step will occur. If false, only the retargetting after bitwise compression will occur. If both this and Retarget are false, then the linear compressor will do no better than the underlying bitwise compressor, extremely slowly.

Remove Trivial Keys


The Remove Trivial Keys animation compression algorithm removes trivial frames - frames of tracks when position or orientation is constant over the entire animation - from the raw animation data. If both position and rotation go down to a single frame, the time is stripped out as well.

Properties

  • Max Pos Diff - Maximum position difference to use when testing if an animation key may be removed. Lower values retain more keys, but yield less compression.
  • Max Angle Diff - Maximum angle difference to use when testing if an animation key may be removed. Lower values retain more keys, but yield less compression.
  • Rotation Compression Format - The format for bitwise compression of rotation data. Defaults to ACF_Float96NoW.

Revert To Raw


The Revert To Raw animation compression algorithm reverts any animation compression, restoring the animation to the raw data.

Properties

  • Rotation Compression Format - The format for bitwise compression of rotation data. Defaults to ACF_None.

你可能感兴趣的:(Unreal,引擎工具,图形引擎,图形图像,游戏引擎)