UGenerateStaticMeshLODProcess

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

UObjectBase

UObjectBaseUtility

UObject

UGenerateStaticMeshLODProcess

References

Module

MeshLODToolset

Header

/Engine/Plugins/Experimental/MeshLODToolset/Source/MeshLODToolset/Public/Graphs/GenerateStaticMeshLODProcess.h

Include

#include "Graphs/GenerateStaticMeshLODProcess.h"

Syntax

UCLASS(Transient)
class UGenerateStaticMeshLODProcess : public UObject

Variables

Name Description

Protected variable UProperty

TSet< TObjectPt...

 

AllDerivedTextures

This list is for accumulating derived UTexture2D's created during WriteDerivedTextures().

Protected variable

bool

 

bUsingHiResSource

If true, we are building new LOD0 from the StaticMesh HiRes SourceModel, instead of from the mesh in LOD0

Protected variable

FGenerateStatic...

 

CurrentSettings

Protected variable

FGenerateStatic...

 

CurrentSettings_Collision

Protected variable

FGenerateStatic...

 

CurrentSettings_Normals

Protected variable

FGenerateStatic...

 

CurrentSettings_Preprocess

Protected variable

FGenerateStatic...

 

CurrentSettings_Simplify

Protected variable

FGenerateStatic...

 

CurrentSettings_Texture

Protected variable

FGenerateStatic...

 

CurrentSettings_UV

Protected variable

FString

 

DerivedAssetFolder

Protected variable

FString

 

DerivedAssetGUIDKey

This value will be stored in Asset Metadata for each generated Asset Texture, Material/MIC, and StaticMesh, under the key StaticMeshLOD.GenerationGUID.

Protected variable

FString

 

DerivedAssetName

Protected variable

FString

 

DerivedAssetNameNoSuffix

Protected variable

FString

 

DerivedAssetPath

Protected variable

UE::Geometry::F...

 

DerivedCollision

Protected variable

FDynamicMesh3

 

DerivedLODMesh

Protected variable

UE::Geometry::F...

 

DerivedLODMeshTangents

Protected variable

TArray< FDerive...

 

DerivedMaterials

List of generated/Derived Materials. Length is the same as SourceMaterials and indices correspond, however some Derived Materials may not be initialized (if Source is reusable or generated)

Protected variable

UE::GeometryFlo...

 

DerivedMultiTextureBakeImage

Protected variable UProperty

TObjectPtr< UTe...

 

DerivedMultiTextureBakeResult

Protected variable

UE::GeometryFlo...

 

DerivedNormalMapImage

Texture set potentially required by output Material set.

Protected variable UProperty

TObjectPtr< UTe...

 

DerivedNormalMapTex

Derived Normal Map.

Protected variable

FString

 

DerivedSuffix

Protected variable

TArray< TUnique...

 

DerivedTextureImages

Protected variable

TUniquePtr< FGe...

 

Generator

Public variable

FCriticalSectio...

 

GraphEvalCriticalSection

This FCriticalSection is used to co-ordinate evaluation of the internal compute graph by external classes.

Protected variable

TMap< int32, FN...

 

MultiTextureParameterName

For each material participating in multi-texture baking, the parameter name of the texture.

Protected variable

FString

 

SourceAssetFolder

Protected variable

FString

 

SourceAssetName

Protected variable

FString

 

SourceAssetPath

Protected variable

TArray< FSource...

 

SourceMaterials

List of initial Source Materials, length equivalent to StaticMesh.StaticMaterials

Protected variable

FDynamicMesh3

 

SourceMesh

SourceMeshDescription converted to FDynamicMesh3.

Protected variable

TSharedPtr< FMe...

 

SourceMeshDescription

Copy of input MeshDescription with autogenerated attributes computed

Protected variable UProperty

TObjectPtr< USt...

 

SourceStaticMesh

Protected variable

TMap< UTexture2...

 

SourceTextureToDerivedTexIndex

Functions

Name Description

Public function

bool

 

ComputeDerivedSourceData

(
    FProgressCancel* Progress
)

Given the above configuration, run the Generator to compute the derived Meshes and Textures

Public function Const

const FGener...

 

GetCurrentCollisionSettings()

Public function Const

const FGener...

 

GetCurrentNormalsSettings()

Public function Const

const FGener...

 

GetCurrentPreprocessSettings()

Settings Objects for various stages of the Generator Process

Public function Const

const FGener...

 

GetCurrentSettings()

Public function Const

const FGener...

 

GetCurrentSimplifySettings()

Public function Const

const FGener...

 

GetCurrentTextureSettings()

Public function Const

const FGener...

 

GetCurrentUVSettings()

Public function Static

FString

 

GetDefaultDerivedAssetSuffix()

Public function Const

const FStrin...

 

GetDerivedAssetName()

Public function Const

const UE::Ge...

 

GetDerivedCollision()

Collision geometry for the Generated Mesh

Public function Const

const FDynam...

 

GetDerivedLOD0Mesh()

The Generated Mesh

Public function Const

const UE::Ge...

 

GetDerivedLOD0MeshTangents()

Tangents for the Generated Mesh

Public function

void

 

GetDerivedMaterialsPreview

(
    FPreviewMaterials& MaterialSetOut
)

Set of Materials and Textures to be applied to the Generated Mesh

Public function Const

const FStrin...

 

GetSourceAssetFolder()

Public function Const

const FStrin...

 

GetSourceAssetName()

Public function Const

const FStrin...

 

GetSourceAssetPath()

Public function Const

TArray< UMat...

 

GetSourceBakeMaterials()

Material Queries and Constraints

Public function Const

TArray< UTex...

 

GetSourceBakeTextures()

Texture Queries and Constraints

Public function Const

const FDynam...

 

GetSourceMesh()

Public function Const

UStaticMesh ...

 

GetSourceStaticMesh()

Public function

bool

 

Initialize

(
    UStaticMesh* SourceMesh,
    FProgressCancel* Progress
)

Initialize the Process, this will:

Protected function

bool

 

InitializeGenerator()

Protected function Const

bool

 

IsSourceAsset

(
    const FString& AssetPath
)

Return true if the given path corresponds to a material or texture in SourceMaterials.

Protected function Const

int

 

SelectTextureToBake

(
    const TArray< FTextureInfo >& Text...
)

Public function

void

 

UpdateCollisionSettings

(
    const FGenerateStaticMeshLODProcess...
)

Public function

void

 

UpdateDerivedPathName

(
    const FString& NewAssetBaseName,
    const FString& NewAssetSuffix
)

Output Path / Naming / etc Configuration Configure the output Name and Suffix for the Mesh Asset.

Protected function

void

 

UpdateMaterialTextureParameters

(
    UMaterialInstanceDynamic* Mate...,
    const FSourceMaterialInfo& SourceM...,
    const TMap< UTexture2D*, UText...,
    UTexture2D* PreviewNormalMap
)

Protected function

void

 

UpdateMaterialTextureParameters

(
    UMaterialInstanceConstant* Mat...,
    FDerivedMaterialInfo& DerivedMater...
)

Public function

void

 

UpdateNormalsSettings

(
    const FGenerateStaticMeshLODProcess...
)

Public function

void

 

UpdatePreprocessSettings

(
    const FGenerateStaticMeshLODProcess...
)

Public function

void

 

UpdateSettings

(
    const FGenerateStaticMeshLODProcess...
)

Public function

void

 

UpdateSimplifySettings

(
    const FGenerateStaticMeshLODProcess...
)

Public function Virtual

void

 

UpdateSourceAsset

(
    bool bSetNewHDSourceAsset
)

Update the input UStaticMesh Asset (ie the asset passed to Initialize)

Public function

void

 

UpdateSourceBakeMaterialConstraint

(
    UMaterialInterface* Material,
    EMaterialBakingConstraint Constrain...
)

Configure the constraint on the specified Source Material

Public function

void

 

UpdateSourceBakeTextureConstraint

(
    UTexture2D* Texture,
    ETextureBakingConstraint Constraint
)

Configure the constraint on the specified Source Texture

Protected function

void

 

UpdateSourceStaticMeshAsset

(
    bool bSetNewHDSourceAsset
)

Public function

void

 

UpdateTextureSettings

(
    const FGenerateStaticMeshLODProcess...
)

Public function

void

 

UpdateUVSettings

(
    const FGenerateStaticMeshLODProcess...
)

Public function Virtual

bool

 

WriteDerivedAssetData()

Final Output Options Creates new UStaticMesh Asset, Material Instances, and Textures

Protected function

void

 

WriteDerivedMaterials

(
    bool bCreatingNewStaticMeshAsset
)

Protected function

void

 

WriteDerivedStaticMeshAsset()

Protected function

bool

 

WriteDerivedTexture

(
    UTexture2D* SourceTexture,
    UTexture2D* DerivedTexture,
    bool bCreatingNewStaticMeshAsset
)

Protected function

bool

 

WriteDerivedTexture

(
    UTexture2D* DerivedTexture,
    FString BaseTexName,
    bool bCreatingNewStaticMeshAsset
)

Protected function

void

 

WriteDerivedTextures

(
    bool bCreatingNewStaticMeshAsset
)

Classes

Name

Description

Protected struct

FDerivedMaterialInfo

Information about an output Material.

Public struct

FPreviewMaterials

Protected struct

FSourceMaterialInfo

Information about one of the input StaticMesh Materials. Computed in Initialize() and not modified afterwards.

Protected struct

FTextureInfo

Enums