UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
SkinnedMeshComponent.cpp File Reference
#include "Components/SkinnedMeshComponent.h"
#include "Engine/SkinnedAsset.h"
#include "HAL/LowLevelMemStats.h"
#include "RenderingThread.h"
#include "GameFramework/PlayerController.h"
#include "ContentStreaming.h"
#include "Materials/MaterialInterface.h"
#include "UnrealEngine.h"
#include "SceneInterface.h"
#include "SkeletalRenderCPUSkin.h"
#include "SkeletalRenderGPUSkin.h"
#include "SkeletalRenderNanite.h"
#include "SkeletalRenderStatic.h"
#include "Animation/AnimStats.h"
#include "SkeletalMeshDeformerHelpers.h"
#include "Engine/MaterialOverlayHelper.h"
#include "Engine/SkeletalMeshSocket.h"
#include "Engine/SkinnedAssetCommon.h"
#include "PhysicsEngine/PhysicsAsset.h"
#include "PhysicsEngine/SkeletalBodySetup.h"
#include "Engine/CollisionProfile.h"
#include "SkeletalMeshSceneProxy.h"
#include "Animation/MeshDeformer.h"
#include "Animation/MeshDeformerInstance.h"
#include "Animation/MeshDeformerProvider.h"
#include "AnimationRuntime.h"
#include "BoneWeights.h"
#include "Animation/SkinWeightProfileManager.h"
#include "GPUSkinCache.h"
#include "PSOPrecache.h"
#include "MaterialDomain.h"
#include "Materials/Material.h"
#include "SkeletalRender.h"
#include "UObject/UE5MainStreamObjectVersion.h"
#include "UObject/UObjectIterator.h"
#include "UObject/UnrealType.h"
#include "HAL/LowLevelMemTracker.h"
#include "UObject/Package.h"
#include "Rendering/RenderCommandPipes.h"
#include "Rendering/NaniteResources.h"
#include "ProfilingDebugging/AssetMetadataTrace.h"
#include "StateStream/SkinnedMeshStateStream.h"
#include "TransformStateStream.h"
#include "ComponentRecreateRenderStateContext.h"
#include "NaniteSceneProxy.h"
#include "NaniteVertexFactory.h"
#include "Animation/MeshDeformerGeometryReadback.h"
#include "Misc/DataValidation.h"
#include "Rendering/SkeletalMeshHalfEdgeBufferAccessor.h"
#include "SkinnedMeshComponentHelper.h"

Classes

struct  FAnimUpdateRateManager::FShiftBucketParameters
 
struct  FAnimUpdateRateManager::FAnimUpdateRateParametersTracker
 

Namespaces

namespace  FAnimUpdateRateManager
 

Macros

#define LOCTEXT_NAMESPACE   "SkinnedMeshComponent"
 

Functions

 DEFINE_LOG_CATEGORY_STATIC (LogSkinnedMeshComp, Log, All)
 
UObjectFAnimUpdateRateManager::GetMapIndexForComponent (USkinnedMeshComponent *SkinnedComponent)
 
FAnimUpdateRateParametersFAnimUpdateRateManager::GetUpdateRateParameters (USkinnedMeshComponent *SkinnedComponent)
 
void FAnimUpdateRateManager::CleanupUpdateRateParametersRef (USkinnedMeshComponent *SkinnedComponent)
 
void FAnimUpdateRateManager::AnimUpdateRateSetParams (FAnimUpdateRateParametersTracker *Tracker, float DeltaTime, bool bRecentlyRendered, float MaxDistanceFactor, int32 MinLod, bool bNeedsValidRootMotion, bool bUsingRootMotionFromEverything)
 
void FAnimUpdateRateManager::AnimUpdateRateTick (FAnimUpdateRateParametersTracker *Tracker, float DeltaTime, bool bNeedsValidRootMotion)
 
const TCHARFAnimUpdateRateManager::B (bool b)
 
void FAnimUpdateRateManager::TickUpdateRateParameters (USkinnedMeshComponent *SkinnedComponent, float DeltaTime, bool bNeedsValidRootMotion)
 
void CreateSectionSkinWeightsArray (const TArray< FSkelMeshSkinWeightInfo > &InSourceWeights, int32 StartIndex, int32 NumVerts, const TMap< int32, int32 > &SkelToSectionBoneMap, TArray< FSkinWeightInfo > &OutGPUWeights, TArray< int32 > &OutInvalidBones)
 
void CreateSkinWeightsArray (const TArray< FSkelMeshSkinWeightInfo > &InSourceWeights, FSkeletalMeshLODRenderData &LODData, TArray< FSkinWeightInfo > &OutGPUWeights, const FReferenceSkeleton &RefSkel)
 
void GetTypedSkinnedTangentBasis (const USkinnedMeshComponent *SkinnedComp, const FSkelMeshRenderSection &Section, const FStaticMeshVertexBuffers &StaticVertexBuffers, const FSkinWeightVertexBuffer &SkinWeightVertexBuffer, const int32 VertIndex, const TArray< FMatrix44f > &RefToLocals, FVector3f &OutTangentX, FVector3f &OutTangentY, FVector3f &OutTangentZ)
 
template<bool bCachedMatrices>
FVector3f GetTypedSkinnedVertexPosition (const USkinnedMeshComponent *SkinnedComp, const FSkelMeshRenderSection &Section, const FPositionVertexBuffer &PositionVertexBuffer, const FSkinWeightVertexBuffer &SkinWeightVertexBuffer, const int32 VertIndex, const TArray< FMatrix44f > &RefToLocals)
 
template FVector3f GetTypedSkinnedVertexPosition< true > (const USkinnedMeshComponent *SkinnedComp, const FSkelMeshRenderSection &Section, const FPositionVertexBuffer &PositionVertexBuffer, const FSkinWeightVertexBuffer &SkinWeightVertexBuffer, const int32 VertIndex, const TArray< FMatrix44f > &RefToLocals)
 
template FVector3f GetTypedSkinnedVertexPosition< false > (const USkinnedMeshComponent *SkinnedComp, const FSkelMeshRenderSection &Section, const FPositionVertexBuffer &PositionVertexBuffer, const FSkinWeightVertexBuffer &SkinWeightVertexBuffer, const int32 VertIndex, const TArray< FMatrix44f > &RefToLocals)
 

Variables

int32 GSkeletalMeshForceLOD = -1
 
FAutoConsoleVariableRef CVarSkeletalMeshForceLOD (TEXT("r.SkeletalMeshForceLOD"), GSkeletalMeshForceLOD, TEXT("Forces LOD"), ECVF_Default)
 
int32 GSkeletalMeshLODBias = 0
 
FAutoConsoleVariableRef CVarSkeletalMeshLODBias (TEXT("r.SkeletalMeshLODBias"), GSkeletalMeshLODBias, TEXT("LOD bias for skeletal meshes (does not affect animation editor viewports)."), ECVF_Scalability)
 
float GUpdateBoundsNotifyStreamingRadiusChangeRatio = 0.1f
 
FAutoConsoleVariableRef CVarUpdateBoundsNotifyStreamingRadiusChangeRatio (TEXT("r.SkinnedMesh.UpdateBoundsNotifyStreamingRadiusChangeRatio"), GUpdateBoundsNotifyStreamingRadiusChangeRatio, TEXT("Update the streaming manager when the radius changes by more than this ratio since the last update. A negative value will disable the update."), ECVF_Default)
 
int32 GSkinnedMeshRenderNanite = 1
 
TMap< UObject *, FAnimUpdateRateParametersTracker * > FAnimUpdateRateManager::ActorToUpdateRateParams
 
TAutoConsoleVariable< int32CVarMeshDeformerMaxLod (TEXT("r.MeshDeformerMaxLOD"), -1, TEXT("Default is -1 (disabled).\n"), ECVF_Default)
 

Macro Definition Documentation

◆ LOCTEXT_NAMESPACE

#define LOCTEXT_NAMESPACE   "SkinnedMeshComponent"

Function Documentation

◆ CreateSectionSkinWeightsArray()

void CreateSectionSkinWeightsArray ( const TArray< FSkelMeshSkinWeightInfo > &  InSourceWeights,
int32  StartIndex,
int32  NumVerts,
const TMap< int32, int32 > &  SkelToSectionBoneMap,
TArray< FSkinWeightInfo > &  OutGPUWeights,
TArray< int32 > &  OutInvalidBones 
)

Util for converting from API skin weight description to GPU format. This includes remapping from skeleton bone index to section bone index.

◆ CreateSkinWeightsArray()

void CreateSkinWeightsArray ( const TArray< FSkelMeshSkinWeightInfo > &  InSourceWeights,
FSkeletalMeshLODRenderData LODData,
TArray< FSkinWeightInfo > &  OutGPUWeights,
const FReferenceSkeleton RefSkel 
)

◆ DEFINE_LOG_CATEGORY_STATIC()

DEFINE_LOG_CATEGORY_STATIC ( LogSkinnedMeshComp  ,
Log  ,
All   
)

◆ GetTypedSkinnedTangentBasis()

void GetTypedSkinnedTangentBasis ( const USkinnedMeshComponent SkinnedComp,
const FSkelMeshRenderSection Section,
const FStaticMeshVertexBuffers StaticVertexBuffers,
const FSkinWeightVertexBuffer SkinWeightVertexBuffer,
const int32  VertIndex,
const TArray< FMatrix44f > &  RefToLocals,
FVector3f OutTangentX,
FVector3f OutTangentY,
FVector3f OutTangentZ 
)

Simple, CPU evaluation of a vertex's skinned position helper function

◆ GetTypedSkinnedVertexPosition()

template<bool bCachedMatrices>
FVector3f GetTypedSkinnedVertexPosition ( const USkinnedMeshComponent SkinnedComp,
const FSkelMeshRenderSection Section,
const FPositionVertexBuffer PositionVertexBuffer,
const FSkinWeightVertexBuffer SkinWeightVertexBuffer,
const int32  VertIndex,
const TArray< FMatrix44f > &  RefToLocals 
)

Simple, CPU evaluation of a vertex's skinned position helper function

◆ GetTypedSkinnedVertexPosition< false >()

template FVector3f GetTypedSkinnedVertexPosition< false > ( const USkinnedMeshComponent SkinnedComp,
const FSkelMeshRenderSection Section,
const FPositionVertexBuffer PositionVertexBuffer,
const FSkinWeightVertexBuffer SkinWeightVertexBuffer,
const int32  VertIndex,
const TArray< FMatrix44f > &  RefToLocals 
)

◆ GetTypedSkinnedVertexPosition< true >()

template FVector3f GetTypedSkinnedVertexPosition< true > ( const USkinnedMeshComponent SkinnedComp,
const FSkelMeshRenderSection Section,
const FPositionVertexBuffer PositionVertexBuffer,
const FSkinWeightVertexBuffer SkinWeightVertexBuffer,
const int32  VertIndex,
const TArray< FMatrix44f > &  RefToLocals 
)

Variable Documentation

◆ CVarMeshDeformerMaxLod

TAutoConsoleVariable< int32 > CVarMeshDeformerMaxLod(TEXT("r.MeshDeformerMaxLOD"), -1, TEXT("Default is -1 (disabled).\n"), ECVF_Default) ( TEXT("r.MeshDeformerMaxLOD")  ,
1,
TEXT("Default is -1 (disabled).\n" ,
ECVF_Default   
)

◆ CVarSkeletalMeshForceLOD

FAutoConsoleVariableRef CVarSkeletalMeshForceLOD(TEXT("r.SkeletalMeshForceLOD"), GSkeletalMeshForceLOD, TEXT("Forces LOD"), ECVF_Default) ( TEXT("r.SkeletalMeshForceLOD")  ,
GSkeletalMeshForceLOD  ,
TEXT("Forces LOD" ,
ECVF_Default   
)

◆ CVarSkeletalMeshLODBias

FAutoConsoleVariableRef CVarSkeletalMeshLODBias(TEXT("r.SkeletalMeshLODBias"), GSkeletalMeshLODBias, TEXT("LOD bias for skeletal meshes (does not affect animation editor viewports)."), ECVF_Scalability) ( TEXT("r.SkeletalMeshLODBias")  ,
GSkeletalMeshLODBias  ,
TEXT("LOD bias for skeletal meshes (does not affect animation editor viewports).")  ,
ECVF_Scalability   
)

◆ CVarUpdateBoundsNotifyStreamingRadiusChangeRatio

FAutoConsoleVariableRef CVarUpdateBoundsNotifyStreamingRadiusChangeRatio(TEXT("r.SkinnedMesh.UpdateBoundsNotifyStreamingRadiusChangeRatio"), GUpdateBoundsNotifyStreamingRadiusChangeRatio, TEXT("Update the streaming manager when the radius changes by more than this ratio since the last update. A negative value will disable the update."), ECVF_Default) ( TEXT("r.SkinnedMesh.UpdateBoundsNotifyStreamingRadiusChangeRatio")  ,
GUpdateBoundsNotifyStreamingRadiusChangeRatio  ,
TEXT("Update the streaming manager when the radius changes by more than this ratio since the last update. A negative value will disable the update." ,
ECVF_Default   
)

◆ GSkeletalMeshForceLOD

int32 GSkeletalMeshForceLOD = -1

◆ GSkeletalMeshLODBias

int32 GSkeletalMeshLODBias = 0

◆ GSkinnedMeshRenderNanite

int32 GSkinnedMeshRenderNanite = 1

◆ GUpdateBoundsNotifyStreamingRadiusChangeRatio

float GUpdateBoundsNotifyStreamingRadiusChangeRatio = 0.1f