FAnimationUtils

A collection of useful functions for skeletal mesh animation.

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Public/AnimationUtils.h

Include

#include "AnimationUtils.h"

Syntax

class FAnimationUtils

Remarks

A collection of useful functions for skeletal mesh animation.

Functions

Name Description

Public function Static

void

 

BuildComponentSpaceTransform

(
    FTransform& OutTransform,
    int32 BoneIndex,
    const TArray< FTransform >& BoneSp...,
    const TArray< FBoneData >& BoneDat...
)

Builds the local-to-component matrix for the specified bone.

Public function Static

void

 

BuildSkeletonMetaData

(
    USkeleton* Skeleton,
    TArray< FBoneData >& OutBoneData
)

Array to keep track of SkeletalMeshes we have built metadata for, and log out the results just once.

Public function Static

void

 

CalculateTrackHeights

(
    const FCompressibleAnimData& Compr...,
    int NumTracks,
    TArray< int32 >& TrackHeights
)

Computes the 'height' of each track, relative to a given animation linkup.

Public function Static

bool

 

CompressAnimCurves

(
    FCompressibleAnimData& AnimSeq,
    FCompressedAnimSequence& Target
)

Compresses the animation curves within a sequence with the chosen settings.

Public function Static

void

 

CompressAnimSequence

(
    const FCompressibleAnimData& Compr...,
    FCompressibleAnimDataResult& OutCo...,
    FAnimCompressContext& CompressCont...
)

Utility function to compress an animation.

Public function Static

void

 

CompressAnimSequenceExplicit

(
    const FCompressibleAnimData& Compr...,
    FCompressibleAnimDataResult& OutCo...,
    FAnimCompressContext& CompressCont...,
    float MasterTolerance,
    bool bFirstRecompressUsingCurrentOr...,
    bool bForceBelowThreshold,
    bool bRaiseMaxErrorToExisting,
    bool bTryExhaustiveSearch,
    bool bEnableSegmenting,
    int32 IdealNumFramesPerSegment,
    int32 MaxNumFramesPerSegment
)

Utility function to compress an animation.

Public function Static

void

 

ComputeCompressionError

(
    const FCompressibleAnimData& Compr...,
    FCompressibleAnimDataResult& Compr...,
    AnimationErrorStats& ErrorStats
)

Utility function to measure the accuracy of a compressed animation.

Public function Static

void

 

ExtractTransformFromCompressionData

(
    const FCompressibleAnimData& Compr...,
    FCompressibleAnimDataResult& Compr...,
    float Time,
    int32 TrackIndex,
    bool bUseRawData,
    FTransform& OutBoneTransform
)

Public function Static

void

 

ExtractTransformFromTrack

(
    float Time,
    int32 NumFrames,
    float SequenceLength,
    const FRawAnimSequenceTrack& RawTr...,
    EAnimInterpolationType Interpolatio...,
    FTransform& OutAtom
)

Public function Static

float

 

GetAlternativeCompressionThreshold()

Determines the current setting for world-space error tolerance in the animation compressor.

Public function Static

FString

 

GetAnimationCompressionFormatString

(
    enum AnimationCompressionFormat InF...
)

Converts an animation compression type into a human readable string

Public function Static

FString

 

GetAnimationKeyFormatString

(
    enum AnimationKeyFormat InFormat
)

Converts an animation codec format into a human readable string

Public function Static

int32

 

GetAnimTrackIndexForSkeletonBone

(
    const int32 InSkeletonBoneIndex,
    const TArray< FTrackToSkeletonMap >...
)

Public function Static

UAnimCompres...

 

GetDefaultAnimationCompressionAlgorithm()

Public function Static

UAnimCurveCo...

 

GetDefaultAnimationCurveCompressionSettings()

Returns the default animation curve compression settings, can never by null.

Public function Static

UObject *...

 

GetDefaultAnimSequenceOuter

(
    UAnimSet* InAnimSet,
    bool bCreateIfNotFound
)

Get default Outer for AnimSequences contained in this AnimSet.

Public function Static

bool

 

GetForcedRecompressionSetting()

Determines the current setting for recompressing all animations upon load.

Public function Static

bool

 

HasUniformKeySpacing

(
    int32 NumFrames,
    const TArray< float >& Times
)

Checks a set of key times to see if the spacing is uniform or non-uniform.

Public function Static

void

 

TallyErrorsFromPerturbation

(
    const FCompressibleAnimData& Compr...,
    int32 NumTracks,
    const FVector& PositionNudge,
    const FQuat& RotationNudge,
    const FVector& ScaleNudge,
    TArray< FAnimPerturbationError >& ...
)

Perturbs the bone(s) associated with each track in turn, measuring the maximum error introduced in end effectors as a result

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback