FSkeletalMeshObject

Interface for mesh rendering data

Windows
MacOS
Linux

Inheritance Hierarchy

FDeferredCleanupInterface

FSkeletalMeshObject

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Public/SkeletalRenderPublic.h

Include

#include "SkeletalRenderPublic.h"

Syntax

class FSkeletalMeshObject : public FDeferredCleanupInterface

Remarks

Interface for mesh rendering data

Variables

Name Description

Public variable

bool

 

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

Protected variable

bool

 

bUsePerBoneMotionBlur

If true, per-bone motion blur is enabled for this object.

Protected variable

ERHIFeatureLeve...

 

FeatureLevel

Feature level to render for.

Protected variable

uint32

 

LastFrameNumber

Used to keep track of the first call to UpdateMinDesiredLODLevel each frame.

Public variable

TArray< FSkelMe...

 

LODInfo

Public variable

int32

 

MaterialIndexPreview

Public variable

float

 

MaxDistanceFactor

High (best) DistanceFactor that was desired for rendering this SkeletalMesh last frame.

Public variable

int32

 

MinDesiredLODLevel

Lowest (best) LOD that was desired for rendering this SkeletalMesh last frame.

Public variable

int32

 

SectionIndexPreview

Index of the section to preview... If set to -1, all section will be rendered

Public variable

int32

 

SelectedEditorMaterial

The Material currently selected. need to remember this index for reimporting cloth

Public variable

int32

 

SelectedEditorSection

The section currently selected in the Editor. Used for highlighting

Public variable

TArray< FCapsul...

 

ShadowCapsuleShapes

Protected variable

TArray< FSkelet...

 

SkeletalMeshLODInfo

Per-LOD info.

Protected variable

FSkeletalMeshRe...

 

SkeletalMeshRenderData

The skeletal mesh resource with which to render.

Protected variable

FGPUSkinCacheEn...

 

SkinCacheEntry

Protected variable

TStatId

 

StatId

Used for dynamic stats

Public variable

float

 

WorkingMaxDistanceFactor

This frames max distance factor.

Public variable

int32

 

WorkingMinDesiredLODLevel

This frames min desired LOD level.

Constructors

Name Description

Public function

FSkeletalMeshObject

(
    USkinnedMeshComponent* InMeshC...,
    FSkeletalMeshRenderData* InSke...,
    ERHIFeatureLevel::Type FeatureLevel
)

Destructors

Name Description

Public function Virtual

~FSkeletalMeshObject()

Functions

Name Description

Public function Const

void

 

CacheVertices

(
    int32 LODIndex,
    bool bForce
)

Re-skin cached vertices for an LOD and update the vertex buffer.

Public function Virtual Const

void

 

DrawVertexElements

(
    FPrimitiveDrawInterface* PDI,
    const FMatrix& ToWorldSpace,
    bool bDrawNormals,
    bool bDrawTangents,
    bool bDrawBinormals
)

Draw Normals/Tangents based on skinned vertex data

Public function Virtual

void

 

EnableOverlayRendering

(
    bool bEnabled,
    const TArray< int32 >* InBones...,
    const TArray< UMorphTarget* > ...
)

Enable blend weight rendering in the editor

Public function Const

TArray< FTra...

 

GetComponentSpaceTransforms()

Get the array of component-space bone transforms.

Public function Const

ERHIFeatureL...

 

GetFeatureLevel()

Returns the feature level this FSkeletalMeshObject was created with

Public function Const

int32

 

GetLOD()

Get the LOD to render this mesh at.

Public function Const

const TArray...

 

GetReferenceToLocalMatrices()

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.

Public function Const

const TArray...

 

GetRenderSections

(
    int32 InLODIndex
)

List of sections to be rendered based on instance weight usage.

Public function

void

 

GetResourceSizeEx

(
    FResourceSizeEx& CumulativeResourc...
)

Returns the size of memory allocated by render data

Public function Const

float

 

GetScreenSize

(
    int32 LODIndex
)

Returns the display factor for the given LOD level

Public function Const

FSkeletalMes...

 

GetSkeletalMeshRenderData()

Get the skeletal mesh resource for which this mesh object was created.

Public function Const

const FVerte...

 

GetSkinVertexFactory

(
    const FSceneView* View,
    int32 LODIndex,
    int32 ChunkIdx
)

Public function Const

TStatId

 

GetStatId()

Public function

bool

 

HaveValidDynamicData()

Return true if this does have valid dynamic data to render

Public function

void

 

InitLODInfos

(
    const USkinnedMeshComponent* I...
)

Initialize the array of LODInfo based on the settings of the current skel mesh component

Public function

void

 

InitResources

(
    USkinnedMeshComponent* InMeshC...
)

Initialize rendering resources for each LOD

Public function Const

bool

 

IsCPUSkinned()

Returns true if this mesh performs skinning on the CPU.

Public function Const

bool

 

IsMaterialHidden

(
    int32 InLODIndex,
    int32 MaterialIdx
)

Determine if the material section entry for an LOD is hidden or not

Public function Virtual

void

 

PreGDMECallback

(
    FGPUSkinCache* GPUSkinCache,
    uint32 FrameNumber
)

Called by FSkeletalMeshObject prior to GDME.

Public function Virtual

void

 

RefreshClothingTransforms

(
    const FMatrix& InNewLocalToWorld,
    uint32 FrameNumber
)

Called to notify clothing data that component transform has changed

Public function

void

 

ReleaseResources()

Release rendering resources for each LOD

Public function

void

 

SetHiddenMaterials

(
    int32 InLODIndex,
    const TArray< bool >& HiddenMateri...
)

Update the hidden material section flags for an LOD entry

Public function Const

bool

 

ShouldUsePerBoneMotionBlur()

Public function

void

 

Update

(
    int32 LODIndex,
    USkinnedMeshComponent* InMeshC...,
    const TArray< FActiveMorphTarget > ...,
    const TArray< float >& MorphTarget...,
    EPreviousBoneTransformUpdateMode Pr...
)

Called by the game thread for any dynamic data updates for this skel mesh object

Public function

void

 

UpdateMinDesiredLODLevel

(
    const FSceneView* View,
    const FBoxSphereBounds& Bounds,
    int32 FrameNumber
)

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.

Public function

void

 

UpdateSkinWeightBuffer

(
    USkinnedMeshComponent* InMeshC...
)

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.

Classes

Name

Description

Public struct

FSkelMeshObjectLODInfo

Setup for rendering a specific LOD entry of the component

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