engine
 
载入中...
搜索中...
未找到
Public 成员函数 | Public 属性 | 所有成员列表
FAnimUpdateRateParameters结构体 参考

Container for Animation Update Rate parameters. 更多...

#include <EngineTypes.h>

Public 成员函数

bool DoEvaluationRateOptimizations () const
 Return true if evaluation rate should be optimized at all
 
 FAnimUpdateRateParameters ()
 Default constructor.
 
float GetInterpolationAlpha () const
 Amount to interpolate bone transforms
 
float GetRootMotionInterp () const
 Amount to interpoilate root motion
 
float GetTimeAdjustment ()
 Called when we are ticking a pose to make sure we accumulate all needed time
 
FColor GetUpdateRateDebugColor () const
 Returns color to use for debug UI
 
void SetLookAheadMode (float DeltaTime, uint8 UpdateRateShift, float LookAheadAmount)
 Set parameters and verify inputs for Lookahead mode, which handles Root Motion 更多...
 
void SetTrailMode (float DeltaTime, uint8 UpdateRateShift, int32 NewUpdateRate, int32 NewEvaluationRate, bool bNewInterpSkippedFrames)
 Set parameters and verify inputs for Trail Mode (original behaviour - skip frames, track skipped time and then catch up afterwards). 更多...
 
bool ShouldInterpolateSkippedFrames () const
 Getter for bInterpolateSkippedFrames
 
bool ShouldSkipEvaluation () const
 Getter for bSkipEvaluation
 
bool ShouldSkipUpdate () const
 Getter for bSkipUpdate
 

Public 属性

float AdditionalTime
 Total time of the last series of skipped updates
 
int32 BaseNonRenderedUpdateRate
 Rate of animation evaluation when non rendered (off screen and dedicated servers). 更多...
 
TArray< float > BaseVisibleDistanceFactorThesholds
 Array of MaxDistanceFactor to use for AnimUpdateRate when mesh is visible (rendered). 更多...
 
uint8 bInterpolateSkippedFrames: 1
 When skipping a frame, should it be interpolated or frozen?
 
uint8 bShouldUseLodMap: 1
 Whether or not to use the defined LOD/Frameskip map instead of separate distance factor thresholds
 
uint8 bShouldUseMinLod: 1
 If set, LOD/Frameskip map will be queried with mesh's MinLodModel instead of current LOD (PredictedLODLevel)
 
uint8 bSkipEvaluation: 1
 (This frame) animation evaluation should be skipped.
 
uint8 bSkipUpdate: 1
 (This frame) animation update should be skipped.
 
int32 EvaluationRate
 How often animation will be evaluated. 更多...
 
TMap< int32, int32 > LODToFrameSkipMap
 Map of LOD levels to frame skip amounts. 更多...
 
int32 MaxEvalRateForInterpolation
 Max Evaluation Rate allowed for interpolation to be enabled. 更多...
 
EOptimizeMode OptimizeMode
 Cache which Update Rate Optimization mode we are using
 
EUpdateRateShiftBucket ShiftBucket
 The bucket to use when deciding which counter to use to calculate shift values
 
int32 SkippedEvalFrames
 Number of evaluate frames that have been skipped in a row
 
int32 SkippedUpdateFrames
 Number of update frames that have been skipped in a row
 
float ThisTickDelta
 The delta time of the last tick
 
float TickedPoseOffestTime
 Track time we have lost via skipping
 
int32 UpdateRate
 How often animation will be updated/ticked. 更多...
 

详细描述

Container for Animation Update Rate parameters.

They are shared for all components of an Actor, so they can be updated in sync.

成员函数说明

◆ SetLookAheadMode()

void FAnimUpdateRateParameters::SetLookAheadMode ( float  DeltaTime,
uint8  UpdateRateShift,
float  LookAheadAmount 
)

Set parameters and verify inputs for Lookahead mode, which handles Root Motion

参数
UpdateRateShift. Shift our update frames so that updates across all skinned components are staggered
LookAheadAmount. Amount of time to look ahead and predict movement

◆ SetTrailMode()

void FAnimUpdateRateParameters::SetTrailMode ( float  DeltaTime,
uint8  UpdateRateShift,
int32  NewUpdateRate,
int32  NewEvaluationRate,
bool  bNewInterpSkippedFrames 
)

Set parameters and verify inputs for Trail Mode (original behaviour - skip frames, track skipped time and then catch up afterwards).

参数
UpdateRateShift. Shift our update frames so that updates across all skinned components are staggered
NewUpdateRate. How often animation will be updated/ticked. 1 = every frame, 2 = every 2 frames, etc.
NewEvaluationRate. How often animation will be evaluated. 1 = every frame, 2 = every 2 frames, etc.
bNewInterpSkippedFrames. When skipping a frame, should it be interpolated or frozen?

类成员变量说明

◆ BaseNonRenderedUpdateRate

int32 FAnimUpdateRateParameters::BaseNonRenderedUpdateRate

Rate of animation evaluation when non rendered (off screen and dedicated servers).

a value of 4 means evaluated 1 frame, then 3 frames skipped

◆ BaseVisibleDistanceFactorThesholds

TArray<float> FAnimUpdateRateParameters::BaseVisibleDistanceFactorThesholds

Array of MaxDistanceFactor to use for AnimUpdateRate when mesh is visible (rendered).

MaxDistanceFactor is size on screen, as used by LODs Example: BaseVisibleDistanceFactorThesholds.Add(0.4f) BaseVisibleDistanceFactorThesholds.Add(0.2f) means: 0 frame skip, MaxDistanceFactor > 0.4f 1 frame skip, MaxDistanceFactor > 0.2f 2 frame skip, MaxDistanceFactor > 0.0f

◆ EvaluationRate

int32 FAnimUpdateRateParameters::EvaluationRate

How often animation will be evaluated.

1 = every frame, 2 = every 2 frames, etc. has to be a multiple of UpdateRate.

◆ LODToFrameSkipMap

TMap<int32, int32> FAnimUpdateRateParameters::LODToFrameSkipMap

Map of LOD levels to frame skip amounts.

if bShouldUseLodMap is set these values will be used for the frameskip amounts and the distance factor thresholds will be ignored. The flag and these values should be configured using the customization callback when parameters are created for a component.

Note that this is # of frames to skip, so if you have 20, that means every 21th frame, it will update, and evaluate.

◆ MaxEvalRateForInterpolation

int32 FAnimUpdateRateParameters::MaxEvalRateForInterpolation

Max Evaluation Rate allowed for interpolation to be enabled.

Beyond, interpolation will be turned off.

◆ UpdateRate

int32 FAnimUpdateRateParameters::UpdateRate

How often animation will be updated/ticked.

1 = every frame, 2 = every 2 frames, etc.


该结构体的文档由以下文件生成: