![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <SkeletalRenderPublic.h>
Inheritance diagram for FSkeletalMeshObject:Classes | |
| struct | FSkelMeshObjectLODInfo |
Static Public Member Functions | |
| static FSkinWeightVertexBuffer * | GetSkinWeightVertexBuffer (FSkeletalMeshLODRenderData &LODData, const FSkelMeshComponentLODInfo *CompLODInfo) |
| static FColorVertexBuffer * | GetColorVertexBuffer (FSkeletalMeshLODRenderData &LODData, const FSkelMeshComponentLODInfo *CompLODInfo) |
Friends | |
| class | FDynamicSkelMeshObjectDataCPUSkin |
| class | FDynamicSkelMeshObjectDataGPUSkin |
| class | FSkeletalMeshSceneProxy |
| class | FSkeletalMeshSectionIter |
| FSkeletalMeshObject::FSkeletalMeshObject | ( | const USkinnedMeshComponent * | InMeshComponent, |
| FSkeletalMeshRenderData * | InSkelMeshRenderData, | ||
| ERHIFeatureLevel::Type | FeatureLevel | ||
| ) |
| FSkeletalMeshObject::FSkeletalMeshObject | ( | const FSkinnedMeshSceneProxyDesc & | InMeshDesc, |
| FSkeletalMeshRenderData * | InSkelMeshRenderData, | ||
| ERHIFeatureLevel::Type | FeatureLevel | ||
| ) |
|
virtual |
|
virtual |
Reimplemented in FSkeletalMeshObjectCPUSkin, FInstancedSkeletalMeshObjectGPUSkin, and FInstancedSkeletalMeshObjectNanite.
|
inlinevirtual |
Draw Normals/Tangents based on skinned vertex data
| PDI | - Draw Interface |
| ToWorldSpace | - Transform from component space to world space |
| bDrawNormals | - Should draw vertex normals |
| bDrawTangents | - Should draw vertex tangents |
| bDrawBinormals | - Should draw vertex binormals |
Reimplemented in FSkeletalMeshObjectCPUSkin, and FSkeletalMeshObjectStatic.
|
inlinevirtual |
Enable blend weight rendering in the editor
| bEnabled | - turn on or off the rendering mode optional parameters will decide which one to draw |
| (optional) | BonesOfInterest - array of bone indices to capture weights for |
| (optional) | MorphTargetsOfInterest - array of morphtargets to render for |
Reimplemented in FSkeletalMeshObjectCPUSkin, and FSkeletalMeshObjectStatic.
Helper function to return the asset path name, optionally joined with the LOD index if LODIndex > -1.
|
inline |
|
inlinevirtual |
If we are caching geometry deformation through skin-cache/mesh-deformers or other, then this returns the currently cached geoemtry.
Reimplemented in FSkeletalMeshObjectGPUSkin.
|
static |
Get the color buffer either from the component LOD info or the skeletal mesh LOD render data
|
inline |
Return the ID of the component to which the skeletal mesh object belongs to.
|
pure virtual |
Get the array of component-space bone transforms. May include transforms that are inherited by follower components. Not safe to hold this point between frames, because it exists in dynamic data passed from main thread.
Implemented in FSkeletalMeshObjectCPUSkin, FSkeletalMeshObjectGPUSkin, FInstancedSkeletalMeshObjectGPUSkin, FSkeletalMeshObjectNanite, FInstancedSkeletalMeshObjectNanite, and FSkeletalMeshObjectStatic.
|
inlinevirtual |
|
inline |
|
inlinevirtual |
Get the offset in the dynamic mesh bounds buffer for the current LOD. Only needed for GPU skin cache.
Reimplemented in FSkeletalMeshObjectGPUSkin.
|
inline |
returns the feature level this FSkeletalMeshObject was created with
Get the LOD to render this mesh at.
Implemented in FSkeletalMeshObjectCPUSkin, FSkeletalMeshObjectGPUSkin, FInstancedSkeletalMeshObjectGPUSkin, FSkeletalMeshObjectNanite, FInstancedSkeletalMeshObjectNanite, and FSkeletalMeshObjectStatic.
|
inlinevirtual |
Returns a valid object if IsNaniteMesh() == true
Reimplemented in FSkeletalMeshObjectNanite, and FInstancedSkeletalMeshObjectNanite.
|
inlinevirtual |
|
inlinevirtual |
Get the array of previous refpose->local matrices Not safe to hold this reference between frames, because it exists in dynamic data passed from main thread.
Reimplemented in FSkeletalMeshObjectGPUSkin, FInstancedSkeletalMeshObjectGPUSkin, FSkeletalMeshObjectNanite, and FInstancedSkeletalMeshObjectNanite.
|
pure virtual |
Get the array of refpose->local matrices Not safe to hold this reference between frames, because it exists in dynamic data passed from main thread.
Implemented in FSkeletalMeshObjectCPUSkin, FSkeletalMeshObjectGPUSkin, FInstancedSkeletalMeshObjectGPUSkin, FSkeletalMeshObjectNanite, FInstancedSkeletalMeshObjectNanite, and FSkeletalMeshObjectStatic.
| const TArray< FSkelMeshRenderSection > & FSkeletalMeshObject::GetRenderSections | ( | int32 | InLODIndex | ) | const |
List of sections to be rendered based on instance weight usage. Full swap of weights will render with its own sections.
List of chunks to be rendered based on instance weight usage. Full swap of weights will render with its own chunks.
|
pure virtual |
Returns the size of memory allocated by render data
Implemented in FSkeletalMeshObjectCPUSkin, FSkeletalMeshObjectGPUSkin, FInstancedSkeletalMeshObjectGPUSkin, FSkeletalMeshObjectNanite, FInstancedSkeletalMeshObjectNanite, and FSkeletalMeshObjectStatic.
Returns the display factor for the given LOD level
@Param LODIndex - The LOD to get the display factor for
|
inline |
Get the skeletal mesh resource for which this mesh object was created.
| FColor FSkeletalMeshObject::GetSkinCacheVisualizationDebugColor | ( | const FName & | GPUSkinCacheVisualizationMode, |
| uint32 | SectionIndex | ||
| ) | const |
|
pure virtual |
| View | - View, must not be 0, allows to cull depending on showflags (normally not needed/used in SHIPPING) |
| LODIndex | - each LOD has its own vertex data |
| ChunkIdx | - not used |
Implemented in FInstancedSkeletalMeshObjectGPUSkin, FInstancedSkeletalMeshObjectNanite, FSkeletalMeshObjectCPUSkin, FSkeletalMeshObjectGPUSkin, FSkeletalMeshObjectNanite, and FSkeletalMeshObjectStatic.
|
static |
Get the weight buffer either from the component LOD info or the skeletal mesh LOD render data
|
inlinevirtual |
Get the weight buffer for specific LOD index. Only needed for GPU skin cache
Reimplemented in FSkeletalMeshObjectGPUSkin, and FSkeletalMeshObjectNanite.
|
pure virtual |
Called by DrawStaticElements to cache mesh draw commands for skeletal meshes.
Implemented in FSkeletalMeshObjectCPUSkin, FSkeletalMeshObjectGPUSkin, FInstancedSkeletalMeshObjectGPUSkin, FInstancedSkeletalMeshObjectNanite, FSkeletalMeshObjectStatic, and FSkeletalMeshObjectNanite.
|
inline |
|
inlinevirtual |
Return true if this does have valid dynamic data to render
Implemented in FSkeletalMeshObjectCPUSkin, FSkeletalMeshObjectGPUSkin, FInstancedSkeletalMeshObjectGPUSkin, FSkeletalMeshObjectNanite, FInstancedSkeletalMeshObjectNanite, and FSkeletalMeshObjectStatic.
| void FSkeletalMeshObject::InitLODInfos | ( | const TArrayView< const FSkelMeshComponentLODInfo > | InComponentLODInfo, |
| const USkinnedAsset * | InSkinnedAsset | ||
| ) |
Initialize the array of LODInfo based on the settings of the current skel mesh component
|
pure virtual |
Initialize rendering resources for each LOD
Implemented in FSkeletalMeshObjectCPUSkin, FSkeletalMeshObjectGPUSkin, FInstancedSkeletalMeshObjectGPUSkin, FSkeletalMeshObjectNanite, FInstancedSkeletalMeshObjectNanite, and FSkeletalMeshObjectStatic.
Returns true if this mesh performs skinning on the CPU.
Reimplemented in FSkeletalMeshObjectCPUSkin, and FSkeletalMeshObjectStatic.
Returns true if this mesh is an FSkeletalMeshObjectGPUSkin
Reimplemented in FSkeletalMeshObjectGPUSkin, and FInstancedSkeletalMeshObjectGPUSkin.
Determine if the material section entry for an LOD is hidden or not
| InLODIndex | - LOD entry to get hidden material flags for |
| MaterialIdx | - index of the material section to check |
Returns true if this mesh is an FSkeletalMeshObjectNanite
Reimplemented in FSkeletalMeshObjectNanite, and FInstancedSkeletalMeshObjectNanite.
|
inlinevirtual |
Called by FSkeletalMeshObject prior to GDME. This allows the GPU skin version to update bones etc now that we know we are going to render
| FrameNumber | from GFrameNumber |
|
inlinevirtual |
Called to notify clothing data that component transform has changed
Reimplemented in FSkeletalMeshObjectGPUSkin.
Release rendering resources for each LOD
Implemented in FSkeletalMeshObjectCPUSkin, FSkeletalMeshObjectGPUSkin, FInstancedSkeletalMeshObjectGPUSkin, FSkeletalMeshObjectNanite, FInstancedSkeletalMeshObjectNanite, and FSkeletalMeshObjectStatic.
| void FSkeletalMeshObject::SetHiddenMaterials | ( | int32 | InLODIndex, |
| const TArray< bool > & | HiddenMaterials | ||
| ) |
Update the hidden material section flags for an LOD entry
| InLODIndex | - LOD entry to update hidden material flags for |
| HiddenMaterials | - array of hidden material sections |
|
inlinevirtual |
Called when that component transform has changed
Reimplemented in FSkeletalMeshObjectGPUSkin.
|
inline |
|
inline |
|
pure virtual |
| void FSkeletalMeshObject::Update | ( | int32 | LODIndex, |
| const USkinnedMeshComponent * | InMeshComponent, | ||
| const FMorphTargetWeightMap & | InActiveMorphTargets, | ||
| const TArray< float > & | MorphTargetWeights, | ||
| EPreviousBoneTransformUpdateMode | PreviousBoneTransformUpdateMode, | ||
| const FExternalMorphWeightData & | InExternalMorphWeightData | ||
| ) |
Called by the game thread for any dynamic data updates for this skel mesh object
| LODIndex | - lod level to update |
| InSkeletalMeshComponen | - parent prim component doing the updating |
| ActiveMorphs | - morph targets to blend with during skinning |
| void FSkeletalMeshObject::UpdateMinDesiredLODLevel | ( | const FSceneView * | View, |
| const FBoxSphereBounds & | Bounds | ||
| ) |
Given a set of views, update the MinDesiredLODLevel member to indicate the minimum (ie best) LOD we would like to use to render this mesh. This is called from the rendering thread (PreRender) so be very careful what you read/write to.
| FrameNumber | from ViewFamily.FrameNumber |
|
pure virtual |
| void FSkeletalMeshObject::UpdateSkinWeightBuffer | ( | const USkinnedMeshComponent * | InMeshComponent | ) |
Will force re-evaluating which Skin Weight buffer should be used for skinning, determined by checking for any override weights or a skin weight profile being set. This prevents re-creating the vertex factories, but rather updates the bindings in place.
|
friend |
|
friend |
|
friend |
|
friend |
| bool FSkeletalMeshObject::bHasBeenUpdatedAtLeastOnce |
This is set to true when we have sent our Mesh data to the rendering thread at least once as it needs to have have a datastructure created there for each MeshObject
If true, the skeletal mesh will take the static relevance path using cached mesh draw commands.
|
protected |
If true, per-bone motion blur is enabled for this object. This includes is the system overwrites the skeletal mesh setting.
|
protected |
Component ID to which belong this mesh object
| FName FSkeletalMeshObject::DebugName |
|
protected |
Guards the call to UpdateMinDesiredLODLevel
|
protected |
Feature level to render for.
|
protected |
Used to keep track of the first call to UpdateMinDesiredLODLevel each frame. from ViewFamily.FrameNumber
| TArray<FSkelMeshObjectLODInfo> FSkeletalMeshObject::LODInfo |
| float FSkeletalMeshObject::MaxDistanceFactor |
High (best) DistanceFactor that was desired for rendering this SkeletalMesh last frame. Represents how big this mesh was in screen space
This should only ever be WRITTEN by the RENDER thread (in FSkeletalMeshProxy::PreRenderView) and READ by the GAME thread (in USkeletalMeshComponent::UpdateSkelPose).
| int32 FSkeletalMeshObject::MinDesiredLODLevel |
Lowest (best) LOD that was desired for rendering this SkeletalMesh last frame.
Note that if LOD streaming is enabled, the desired LOD is not guaranteed to be currently loaded.
This should only ever be WRITTEN by the RENDER thread (in FSkeletalMeshProxy::PreRenderView) and READ by the GAME thread (in USkeletalMeshComponent::UpdateSkelPose).
| TArray<FCapsuleShape3f> FSkeletalMeshObject::ShadowCapsuleShapes |
|
protected |
The skeletal mesh resource with which to render.
|
protected |
|
protected |
|
protected |
Used for dynamic stats
| float FSkeletalMeshObject::WorkingMaxDistanceFactor |
This frames max distance factor. This is copied (flipped) to MaxDistanceFactor at the beginning of the next frame.
| int32 FSkeletalMeshObject::WorkingMinDesiredLODLevel |
This frames min desired LOD level. This is copied (flipped) to MinDesiredLODLevel at the beginning of the next frame.
|
protected |