UPhysicalMaterialMask

Physical material masks are used to map multiple physical materials to a single rendering material

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

UObjectBase

UObjectBaseUtility

UObject

UPhysicalMaterialMask

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/PhysicalMaterials/PhysicalMaterialMask.h

Include

#include "PhysicalMaterials/PhysicalMaterialMask.h"

Syntax

class UPhysicalMaterialMask : public UObject

Remarks

Physical material masks are used to map multiple physical materials to a single rendering material

Variables

Name Description

Public variable

TEnumAsByte< en...

 

AddressX

The addressing mode to use for the X axis.

Public variable

TEnumAsByte< en...

 

AddressY

The addressing mode to use for the Y axis.

Public variable

TObjectPtr< cla...

 

AssetImportData

Object properties.

Public variable

TObjectPtr< UTe...

 

MaskTexture

Mask input texture, square aspect ratio recommended.

Public variable

int32

 

UVChannelIndex

StaticMesh UV channel index to use when performing lookups with this mask.

Constructors

Name Description

Public function

UPhysicalMaterialMask

(
    const FObjectInitializer& ObjectIn...
)

Public function

UPhysicalMaterialMask

(
    FVTableHelper& Helper
)

Destructors

Name Description

Public function Virtual

~UPhysicalMaterialMask()

Functions

Name Description

Public function

void

 

DumpMaskData()

Dump mask data to log display.

Public function Const

void

 

GenerateMaskData

(
    TArray< uint32 >& OutMaskData,
    int32& OutSizeX,
    int32& OutSizeY
)

Helper method to generate mask data used at runtime based on mask texture.

Public function Static

uint32

 

GetPhysMatIndex

(
    const TArray< uint32 >& MaskData,
    int32 SizeX,
    int32 SizeY,
    int32 AddressX,
    int32 AddressY,
    float U,
    float V
)

Helper method to query phys mat index at a given UV position in mask data.

Public function

void

 

SetMaskTexture

(
    UTexture* InMaskTexture,
    const FString& InTextureFilename
)

Helper method to set mask texture.

Overridden from UObject

Name Description

Public function Virtual

void

 

FinishDestroy()

Called to finish destroying the object.

Public function Virtual

void

 

PostEditChangeProperty

(
    FPropertyChangedEvent& PropertyCha...
)

Called when a property on this object has been modified externally

Public function Virtual

void

 

PostInitProperties()

Called after the C++ constructor and after the properties have been initialized, including those loaded from config.

Public function Virtual

void

 

PostLoad()

Do any object-specific cleanup required immediately after loading an object.

Constants

Name

Description

INVALID_MASK_INDEX