UAnimCompress_PerTrackCompression

Keyframe reduction algorithm that removes keys which are linear interpolations of surrounding keys, as well as choosing the best bitwise compression for each track independently.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Animation/AnimCompress_PerTrackCompression.h

Include

#include "Animation/AnimCompress_PerTrackCompression.h"

Syntax

class UAnimCompress_PerTrackCompression : public UAnimCompress_RemoveLinearKeys

Remarks

Keyframe reduction algorithm that removes keys which are linear interpolations of surrounding keys, as well as choosing the best bitwise compression for each track independently.

Variables

Name Description

Public variable

TArray< TEnumAs...

 

AllowedRotationFormats

Which encoding formats is the per-track compressor allowed to try on rotation keys

Public variable

TArray< TEnumAs...

 

AllowedScaleFormats

Which encoding formats is the per-track compressor allowed to try on scale keys

Public variable

TArray< TEnumAs...

 

AllowedTranslationFormats

Which encoding formats is the per-track compressor allowed to try on translation keys

Public variable

uint32: 1

 

bResampleAnimation

If true, resample the animation to ResampleFramerate frames per second

Public variable

uint32: 1

 

bUseAdaptiveError

If true, adjust the error thresholds based on the 'height' within the skeleton

Public variable

uint32: 1

 

bUseAdaptiveError2

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.

Public variable

uint32: 1

 

bUseOverrideForEndEffectors

If true, uses MinEffectorDiff as the threhsold for end effectors

Public variable

float

 

MaxAngleDiffBitwise

Maximum angle difference to use when testing if an animation key may be removed.

Public variable

float

 

MaxErrorPerTrackRatio

A fraction that determines how much of the total error budget can be introduced by any particular track

Public variable

float

 

MaxPosDiffBitwise

Maximum position difference to use when testing if an animation key may be removed.

Public variable

float

 

MaxScaleDiffBitwise

Maximum position difference to use when testing if an animation key may be removed.

Public variable

float

 

MaxZeroingThreshold

Maximum threshold to use when replacing a component with zero.

Public variable

int32

 

MinKeysForResampling

Animations with fewer keys than MinKeysForResampling will not be resampled.

Public variable

float

 

ParentingDivisor

Reduces the error tolerance the further up the tree that a key occurs EffectiveErrorTolerance = Max(BaseErrorTolerance / Power(ParentingDivisor, Max(Height+Bias,0) * ParentingDivisorExponent), ZeroingThreshold) Only has an effect bUseAdaptiveError is true

Public variable

float

 

ParentingDivisorExponent

Reduces the error tolerance the further up the tree that a key occurs EffectiveErrorTolerance = Max(BaseErrorTolerance / Power(ParentingDivisor, Max(Height+Bias,0) * ParentingDivisorExponent), ZeroingThreshold) Only has an effect bUseAdaptiveError is true

Public variable

float

 

PerturbationProbeSize

How big of a perturbation should be made when probing error propagation

Public variable

float

 

ResampledFramerate

When bResampleAnimation is true, this defines the desired framerate

Public variable

float

 

RotationErrorSourceRatio

This ratio determines how much error in end effector rotation can come from a given track's rotation error or translation error.

Public variable

float

 

ScaleErrorSourceRatio

This ratio determines how much error in end effector scale can come from a given track's rotation error or scale error.

Public variable

int32

 

TrackHeightBias

A bias added to the track height before using it to calculate the adaptive error

Public variable

float

 

TranslationErrorSourceRatio

This ratio determines how much error in end effector translation can come from a given track's rotation error or translation error.

Constructors

Name Description

Public function

UAnimCompress_PerTrackCompression

(
    const FObjectInitializer& ObjectIn...
)

Overridden from UAnimCompress_RemoveLinearKeys

Name Description

Protected function Virtual

void

 

CompressUsingUnderlyingCompressor

(
    const FCompressibleAnimData& Compr...,
    FCompressibleAnimDataResult& OutCo...,
    const TArray< FTranslationTrack >&...,
    const TArray< FRotationTrack >& Ro...,
    const TArray< FScaleTrack >& Scale...,
    const bool bFinalPass
)

Compresses the tracks passed in using the underlying compressor for this key removal codec

Protected function Virtual

void *

 

FilterBeforeMainKeyRemoval

(
    const FCompressibleAnimData& Compr...,
    TArray< FTranslationTrack >& Trans...,
    TArray< FRotationTrack >& Rotation...,
    TArray< FScaleTrack >& ScaleData
)

Pre-filters the tracks before running the main key removal algorithm

Overridden from UAnimCompress

Name Description

Protected function Virtual

bool

 

DoReduction

(
    const FCompressibleAnimData& Compr...,
    FCompressibleAnimDataResult& OutRe...
)

Implemented by child classes, this function reduces the number of keyframes in the specified sequence, given the specified skeleton (if needed).

Overridden from UAnimBoneCompressionCodec

Name Description

Public function Virtual Const

void

 

DecompressBone

(
    FAnimSequenceDecompressionContext&...,
    int32 TrackIndex,
    FTransform& OutAtom
)

Decompress a single bone.

Protected function Virtual

void

 

PopulateDDCKey

(
    FArchive& Ar
)

Called to generate a unique DDC key for this codec instance.

Overridden from UObject

Name Description

Protected function Virtual

void

 

PostEditChangeProperty

(
    FPropertyChangedEvent& PropertyCha...
)

Called when a property on this object has been modified externally