Navigation
API > API/Runtime > API/Runtime/Engine
Dead Blending Node
Dead blending is an alternative method of inertialization that extrapolates the animation being transitioned from forward in time and then performs a normal cross-fade blend between this extrapolated animation and the new animation being transitioned to.
For more background see: https://theorangeduck.com/page/dead-blending
This node works by extrapolating forward the animation being transition from using the animation's velocities at the point of transition, with an exponential decay which reduces those velocities over time to avoid the pose becoming invalid.
The rate of this decay is set automatically based on how much the velocities of the animation being transitioned from are moving toward the pose of the animation being transitioned to. If they are moving in the wrong direction or too quickly they will have a larger decay rate, while if they are in the correct direction and moving slowly relative to the difference they will have a smaller decay rate.
These decay rates can be controlled by the ExtrapolationHalfLife_, ExtrapolationHalfLifeMin_ and `ExtrapolationHalfLifeMax_ parameters, which specify the approximate average, min, and max decay periods. More specifically they specify the "half-life" - or how it takes for the velocities to be decayed by half.
| Name | FAnimNode_DeadBlending |
| Type | struct |
| Header File | /Engine/Source/Runtime/Engine/Classes/Animation/AnimNode_DeadBlending.h |
| Include Path | #include "Animation/AnimNode_DeadBlending.h" |
Syntax
USTRUCT (BlueprintInternalUseOnly)
struct FAnimNode_DeadBlending :
public FAnimNode_Base ,
public IBoneReferenceSkeletonProvider
Inheritance Hierarchy
- FAnimNode_Base → FAnimNode_DeadBlending
Implements Interfaces
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FAnimNode_DeadBlending() |
Animation/AnimNode_DeadBlending.h |
Structs
| Name | Remarks |
|---|---|
| FDeadBlendingCurveElement |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Source | FPoseLink | Input Pose. | Animation/AnimNode_DeadBlending.h |
|
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bAlwaysUseDefaultBlendSettings | bool | When enabled, the default blend settings will always be used rather than those coming from the inertialization request. | Animation/AnimNode_DeadBlending.h |
|
| bForwardRequestsThroughSkippedCachedPoseNodes | bool | When enabled this option will forward inertialization requests through any downstream UseCachedPose nodes which have had their update skipped (e.g. because they have already been updated in another location). | Animation/AnimNode_DeadBlending.h |
|
| BlendTimeMultiplier | float | Multiplier that can be used to scale the overall blend durations coming from inertialization requests. | Animation/AnimNode_DeadBlending.h |
|
| bLinearlyInterpolateScales | bool | When enabled, bone scales will be linearly interpolated and extrapolated. | Animation/AnimNode_DeadBlending.h |
|
| BoneFilter | TArray< FCompactPoseBoneIndex, TInlineAllocator< 8 > > | Cache compact pose bone index for FilteredBones. | Animation/AnimNode_DeadBlending.h | |
| BoneIndices | TArray< int32 > | Animation/AnimNode_DeadBlending.h | ||
| BoneRotationDecayHalfLives | TArray< FVector3f > | Animation/AnimNode_DeadBlending.h | ||
| BoneRotationDirections | TArray< FQuat4f > | Animation/AnimNode_DeadBlending.h | ||
| BoneRotations | TArray< FQuat > | Animation/AnimNode_DeadBlending.h | ||
| BoneRotationVelocities | TArray< FVector3f > | Animation/AnimNode_DeadBlending.h | ||
| BoneScaleDecayHalfLives | TArray< FVector3f > | Animation/AnimNode_DeadBlending.h | ||
| BoneScales | TArray< FVector > | Animation/AnimNode_DeadBlending.h | ||
| BoneScaleVelocities | TArray< FVector3f > | Animation/AnimNode_DeadBlending.h | ||
| BoneTranslationDecayHalfLives | TArray< FVector3f > | Animation/AnimNode_DeadBlending.h | ||
| BoneTranslations | TArray< FVector > | Animation/AnimNode_DeadBlending.h | ||
| BoneTranslationVelocities | TArray< FVector3f > | Animation/AnimNode_DeadBlending.h | ||
| bResetOnBecomingRelevant | bool | Clear any active blends if we just became relevant, to avoid carrying over undesired blends. | Animation/AnimNode_DeadBlending.h |
|
| bShowExtrapolations | bool | This setting can be used to show what the extrapolation of the animation looks like. | Animation/AnimNode_DeadBlending.h |
|
| CurrPoseSnapshot | FInertializationSparsePose | Animation/AnimNode_DeadBlending.h | ||
| CurveData | TBaseBlendedCurve< TInlineAllocator< 8 >, FDeadBlendingCurveElement > | Recorded curve state at the point of transition. | Animation/AnimNode_DeadBlending.h | |
| CurveFilter | UE::Anim::FCurveFilter | Cached curve filter built from FilteredCurves. | Animation/AnimNode_DeadBlending.h | |
| DefaultBlendDuration | float | The default blend duration to use when "Always Use Default Blend Settings" is set to true. | Animation/AnimNode_DeadBlending.h |
|
| DefaultBlendMode | EAlphaBlendOption | Default blend mode to use when no blend mode is supplied with the inertialization request. | Animation/AnimNode_DeadBlending.h |
|
| DefaultBlendProfile | TObjectPtr< UBlendProfile > | Default blend profile to use when no blend profile is supplied with the inertialization request. | Animation/AnimNode_DeadBlending.h |
|
| DefaultCustomBlendCurve | TObjectPtr< UCurveFloat > | Default custom blend curve to use along with the default blend mode. | Animation/AnimNode_DeadBlending.h |
|
| DeltaTime | float | Variable used to store the elapsed delta time between calls to evaluate. | Animation/AnimNode_DeadBlending.h | |
| ExtrapolatedCurveFilter | UE::Anim::FCurveFilter | Cached curve filter built from ExtrapolationFilteredCurves. | Animation/AnimNode_DeadBlending.h | |
| ExtrapolationFilteredCurves | TArray< FName > | List of curves that will not be included in the extrapolation. | Animation/AnimNode_DeadBlending.h |
|
| ExtrapolationHalfLife | float | The average half-life of decay in seconds to use when extrapolating the animation. | Animation/AnimNode_DeadBlending.h |
|
| ExtrapolationHalfLifeMax | float | The maximum half-life of decay in seconds to use when extrapolating the animation. | Animation/AnimNode_DeadBlending.h |
|
| ExtrapolationHalfLifeMin | float | The minimum half-life of decay in seconds to use when extrapolating the animation. | Animation/AnimNode_DeadBlending.h |
|
| FilteredBones | TArray< FBoneReference > | List of bones that should not use inertial blending. These bones will change instantly when the animation switches. | Animation/AnimNode_DeadBlending.h |
|
| FilteredCurves | TArray< FName > | List of curves that should not use inertial blending. These curves will change instantly when the animation switches. | Animation/AnimNode_DeadBlending.h |
|
| InertializationBlendMode | EAlphaBlendOption | Current blend mode being used for Inertialization. | Animation/AnimNode_DeadBlending.h | |
| InertializationCustomBlendCurve | TObjectPtr< UCurveFloat > | Custom blend curve being used by the current blend mode. | Animation/AnimNode_DeadBlending.h |
|
| InertializationDuration | float | Current inertialization duration (used for curves). | Animation/AnimNode_DeadBlending.h | |
| InertializationDurationPerBone | TCustomBoneIndexArray< float, FSkeletonPoseBoneIndex > | Current inertialization durations for each bone, indexed by skeleton bone index (used for per-bone blending). | Animation/AnimNode_DeadBlending.h | |
| InertializationMaxDuration | float | Maximum of InertializationDuration and all entries in InertializationDurationPerBone (used for knowing when to shutdown the inertialization). | Animation/AnimNode_DeadBlending.h | |
| InertializationRequestAnimInstance | TObjectPtr< UObject > | Anim Instance for the current inertialization request. | Animation/AnimNode_DeadBlending.h |
|
| InertializationRequestDescription | FString | Description for the current inertialization request. | Animation/AnimNode_DeadBlending.h | |
| InertializationRequestNodeId | int32 | Node Id for the current inertialization request. | Animation/AnimNode_DeadBlending.h | |
| InertializationState | EInertializationState | Current Inertialization state. | Animation/AnimNode_DeadBlending.h | |
| InertializationTime | float | Time since the last request for inertialization. | Animation/AnimNode_DeadBlending.h | |
| MaximumCurveVelocity | float | The maximum velocity to allow for extrapolation of curves. | Animation/AnimNode_DeadBlending.h |
|
| MaximumRotationVelocity | float | The maximum velocity to allow for extrapolation of bone rotations in degrees per second. | Animation/AnimNode_DeadBlending.h |
|
| MaximumScaleVelocity | float | The maximum velocity to allow for extrapolation of bone scales. | Animation/AnimNode_DeadBlending.h |
|
| MaximumTranslationVelocity | float | The maximum velocity to allow for extrapolation of bone translations in centimeters per second. | Animation/AnimNode_DeadBlending.h |
|
| PoseCurveData | TBaseBlendedCurve< TInlineAllocator< 8 >, UE::Anim::FCurveElement > | Temporary storage for curve data of the Destination Pose. | Animation/AnimNode_DeadBlending.h | |
| PrevPoseSnapshot | FInertializationSparsePose | Snapshots of the actor pose generated as output. | Animation/AnimNode_DeadBlending.h | |
| RequestQueue | TArray< FInertializationRequest > | Pending inertialization requests. | Animation/AnimNode_DeadBlending.h |
|
| RootRotationVelocity | FVector3f | Animation/AnimNode_DeadBlending.h | ||
| RootScaleVelocity | FVector3f | Animation/AnimNode_DeadBlending.h | ||
| RootTranslationVelocity | FVector3f | Animation/AnimNode_DeadBlending.h | ||
| Tag | FName | UAnimGraphNode_Deadblending tag to match at runtime for filtering inertialization requests | Animation/AnimNode_DeadBlending.h | |
| UpdateCounter | FGraphTraversalCounter | Update Counter for detecting being relevant. | Animation/AnimNode_DeadBlending.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
USkeleton * GetSkeleton
(
bool& bInvalidSkeletonIsError, |
Animation/AnimNode_DeadBlending.h | ||
FName GetTag() |
Animation/AnimNode_DeadBlending.h | ||
virtual void RequestInertialization
(
const FInertializationRequest& Request |
Request to activate inertialization. | Animation/AnimNode_DeadBlending.h | |
void SetTag
(
FName InTag |
Animation/AnimNode_DeadBlending.h |
Overridden from FAnimNode_Base
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void CacheBones_AnyThread
(
const FAnimationCacheBonesContext& Context |
Called to cache any bones that this node needs to track (e.g. in a FBoneReference). | Animation/AnimNode_DeadBlending.h | |
virtual void Evaluate_AnyThread
(
FPoseContext& Output |
Called to evaluate local-space bones transforms according to the weights set up in Update(). | Animation/AnimNode_DeadBlending.h | |
virtual void GatherDebugData
(
FNodeDebugData& DebugData |
Called to gather on-screen debug data. This is called on the game thread. | Animation/AnimNode_DeadBlending.h | |
virtual void Initialize_AnyThread
(
const FAnimationInitializeContext& Context |
Called when the node first runs. | Animation/AnimNode_DeadBlending.h | |
virtual bool NeedsDynamicReset () |
For nodes that implement some kind of simulation, return true here so ResetDynamics() gets called when things like teleports, time skips etc. | Animation/AnimNode_DeadBlending.h | |
virtual void Update_AnyThread
(
const FAnimationUpdateContext& Context |
Called to update the state of the graph relative to this node. | Animation/AnimNode_DeadBlending.h |