UBakeMeshAttributeMapsToolBase

Base Bake Maps tool

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

MeshModelingToolsExp

Header

/Engine/Plugins/Experimental/MeshModelingToolsetExp/Source/MeshModelingToolsExp/Public/BakeMeshAttributeMapsToolBase.h

Include

#include "BakeMeshAttributeMapsToolBase.h"

Syntax

UCLASS()
class UBakeMeshAttributeMapsToolBase :
    public UBakeMeshAttributeTool,
    public UE::Geometry::IGenericDataOperatorFactory< UE::Geometry::FMeshMapBaker >

Remarks

Base Bake Maps tool

Variables

Name Description

Protected variable

FBakeAnalytics

 

BakeAnalytics

Protected variable UProperty

TObjectPtr< UMa...

 

BentNormalPreviewMaterial

Protected variable

FBakeSettings

 

CachedBakeSettings

Protected variable UProperty

TMap< EBakeMapT...

 

CachedMaps

Internal cache of bake texture results.

Protected variable

TUniquePtr< TGe...

 

Compute

Background compute

Protected variable UProperty

TObjectPtr< UTe...

 

EmptyColorMapBlack

Protected variable UProperty

TObjectPtr< UTe...

 

EmptyColorMapWhite

Protected variable UProperty

TObjectPtr< UTe...

 

EmptyNormalMap

Empty maps are shown when nothing is computed

Protected variable UProperty

TObjectPtr< UMa...

 

PreviewMaterial

Protected variable UProperty

TObjectPtr< UPr...

 

PreviewMesh

Preview mesh and materials

Protected variable

TArray< int32 >

 

TargetMeshUVCharts

Protected variable UProperty

TObjectPtr< UBa...

 

VisualizationProps

Tool property sets

Constructors

Functions

Name Description

Protected function

void

 

CreateTextureAssets

(
    const TMap< EBakeMapType, TObjectPt...,
    UWorld* SourceWorld,
    UObject* SourceAsset
)

Create texture assets from our result map of Texture2D

Protected function Static

void

 

GatherAnalytics

(
    const UE::Geometry::FMeshMapBaker&...,
    const FBakeSettings& Settings,
    FBakeAnalytics& Data
)

Records bake timing and settings data for analytics.

Protected function Virtual

void

 

GatherAnalytics

(
    FBakeAnalytics::FMeshSettings& Dat...
)

Computes the NumTargetMeshTris, NumDetailMesh and NumDetailMeshTris analytics.

Protected function Virtual Const

FString

 

GetAnalyticsEventName()

Public function Static

EBakeMapType

 

GetMapTypes

(
    const int32& MapTypes
)

Process a bitfield into an EBakeMapType.

Protected function Static

void

 

GetTextureName

(
    EBakeMapType MapType,
    const FString& BaseName,
    FString& TexName
)

Protected function Static

UE::Geometry...

 

GetTextureType

(
    EBakeMapType MapType,
    EBakeTextureBitDepth MapFormat
)

Utilities

Protected function

void

 

InitializeEmptyMaps()

Protected function

void

 

InvalidateCompute()

Invalidates the background compute operator.

Protected function

void

 

OnMapsUpdated

(
    const TUniquePtr< UE::Geometry::FMe...
)

Retrieves the result of the FMeshMapBaker and generates UTexture2D into the CachedMaps.

Protected function

void

 

OnMapTypesUpdated

(
    EBakeMapType ResultMapTypes,
    TMap< EBakeMapType, TObjectPtr< UTe...,
    FString& MapPreview,
    TArray< FString >& MapPreviewNames...,
    TMap< FString, FString >& MapPrevi...
)

To be invoked by client when bake map types change.

Protected function

void

 

PostSetup()

Post-client setup function.

Protected function Static

void

 

RecordAnalytics

(
    const FBakeAnalytics& Data,
    const FString& EventName
)

Posts an analytics event using the given analytics struct.

Protected function

void

 

UpdatePreview

(
    EBakeMapType PreviewMapType
)

Update the preview material parameters for a given a Bake type.

Protected function

void

 

UpdatePreview

(
    const FString& PreviewDisplayName,
    const TMap< FString, FString >& Ma...
)

Update the preview material parameters for a given Bake type display name.

Protected function

void

 

UpdatePreviewNames

(
    const EBakeMapType MapTypes,
    FString& MapPreview,
    TArray< FString >& MapPreviewNames...,
    TMap< FString, FString >& MapPrevi...
)

Updates a tool property set's MapPreviewNamesList from the list of active map types.

Protected function Virtual

void

 

UpdateResult()

Process dirty props and update background compute. Invoked during Render.

Protected function Virtual

void

 

UpdateVisualization()

Updates the preview material on the preview mesh with the computed results.

Overridden from UInteractiveTool

Name Description

Public function Virtual

void

 

OnTick

(
    float DeltaTime
)

Action support/system

Public function Virtual

void

 

Render

(
    IToolsContextRenderAPI* Render...
)

Allow the Tool to do any custom drawing (ie via PDI/RHI)

Public function Virtual

void

 

Setup()

Called by ToolManager to initialize the Tool after ToolBuilder::BuildTool() has been called

Public function Virtual

void

 

Shutdown

(
    EToolShutdownType ShutdownType
)

Called by ToolManager to shut down the Tool

Overridden from IGenericDataOperatorFactory

Name Description

Public function Virtual

TUniquePtr< ...

 

MakeNewOperator()

Classes

Name

Description

Protected struct

FBakeAnalytics

Analytics

Protected struct

FBakeSettings

Bake parameters