Language:
Discover
By Skill Level
By Category

UMaterialExpression

Choose your OS:

Inheritance Hierarchy

UObjectBase

UObjectBaseUtility

UObject

UMaterialExpression

UMaterialExpressionAbs

UMaterialExpressionActorPositionWS

UMaterialExpressionAdd

UMaterialExpressionAppendVector

UMaterialExpressionArccosine

UMaterialExpressionArccosineFast

UMaterialExpressionArcsine

UMaterialExpressionArcsineFast

UMaterialExpressionArctangent

UMaterialExpressionArctangent2

UMaterialExpressionArctangent2Fast

UMaterialExpressionArctangentFast

UMaterialExpressionAtmosphericFogColor

UMaterialExpressionAtmosphericLightColor

UMaterialExpressionAtmosphericLightVector

UMaterialExpressionBlackBody

UMaterialExpressionBlendMaterialAttributes

UMaterialExpressionBreakMaterialAttributes

UMaterialExpressionBumpOffset

UMaterialExpressionCameraPositionWS

UMaterialExpressionCameraVectorWS

UMaterialExpressionCeil

UMaterialExpressionClamp

UMaterialExpressionCollectionParameter

UMaterialExpressionComment

UMaterialExpressionComponentMask

UMaterialExpressionConstant

UMaterialExpressionConstant2Vector

UMaterialExpressionConstant3Vector

UMaterialExpressionConstant4Vector

UMaterialExpressionConstantBiasScale

UMaterialExpressionCosine

UMaterialExpressionCrossProduct

UMaterialExpressionCustom

UMaterialExpressionCustomOutput

UMaterialExpressionBentNormalCustomOutput

UMaterialExpressionClearCoatNormalCustomOutput

UMaterialExpressionLandscapeGrassOutput

UMaterialExpressionTangentOutput

UMaterialExpressionVertexInterpolator

UMaterialExpressionDDX

UMaterialExpressionDDY

UMaterialExpressionDecalDerivative

UMaterialExpressionDecalLifetimeOpacity

UMaterialExpressionDecalMipmapLevel

UMaterialExpressionDepthFade

UMaterialExpressionDepthOfFieldFunction

UMaterialExpressionDeriveNormalZ

UMaterialExpressionDesaturation

UMaterialExpressionDistance

UMaterialExpressionDistanceCullFade

UMaterialExpressionDistanceFieldGradient

UMaterialExpressionDistanceToNearestSurface

UMaterialExpressionDivide

UMaterialExpressionDotProduct

UMaterialExpressionDynamicParameter

UMaterialExpressionEyeAdaptation

UMaterialExpressionFeatureLevelSwitch

UMaterialExpressionFloor

UMaterialExpressionFmod

UMaterialExpressionFontSample

UMaterialExpressionFontSampleParameter

UMaterialExpressionFrac

UMaterialExpressionFresnel

UMaterialExpressionFunctionInput

UMaterialExpressionFunctionOutput

UMaterialExpressionGetMaterialAttributes

UMaterialExpressionGIReplace

UMaterialExpressionIf

UMaterialExpressionLandscapeLayerBlend

UMaterialExpressionLandscapeLayerCoords

UMaterialExpressionLandscapeLayerSample

UMaterialExpressionLandscapeLayerSwitch

UMaterialExpressionLandscapeLayerWeight

UMaterialExpressionLandscapeVisibilityMask

UMaterialExpressionLightmapUVs

UMaterialExpressionLightmassReplace

UMaterialExpressionLightVector

UMaterialExpressionLinearInterpolate

UMaterialExpressionLogarithm10

UMaterialExpressionLogarithm2

UMaterialExpressionMakeMaterialAttributes

UMaterialExpressionMaterialFunctionCall

UMaterialExpressionMaterialProxyReplace

UMaterialExpressionMax

UMaterialExpressionMin

UMaterialExpressionMultiply

UMaterialExpressionNoise

UMaterialExpressionNormalize

UMaterialExpressionObjectBounds

UMaterialExpressionObjectOrientation

UMaterialExpressionObjectPositionWS

UMaterialExpressionObjectRadius

UMaterialExpressionOneMinus

UMaterialExpressionPanner

UMaterialExpressionParameter

UMaterialExpressionScalarParameter

UMaterialExpressionStaticBoolParameter

UMaterialExpressionStaticSwitchParameter

UMaterialExpressionStaticComponentMaskParameter

UMaterialExpressionVectorParameter

UMaterialExpressionParticleColor

UMaterialExpressionParticleDirection

UMaterialExpressionParticleMacroUV

UMaterialExpressionParticleMotionBlurFade

UMaterialExpressionParticlePositionWS

UMaterialExpressionParticleRadius

UMaterialExpressionParticleRandom

UMaterialExpressionParticleRelativeTime

UMaterialExpressionParticleSize

UMaterialExpressionParticleSpeed

UMaterialExpressionPerInstanceFadeAmount

UMaterialExpressionPerInstanceRandom

UMaterialExpressionPixelDepth

UMaterialExpressionPixelNormalWS

UMaterialExpressionPower

UMaterialExpressionPrecomputedAOMask

UMaterialExpressionPreSkinnedNormal

UMaterialExpressionPreSkinnedPosition

UMaterialExpressionPreviousFrameSwitch

UMaterialExpressionQualitySwitch

UMaterialExpressionReflectionVectorWS

UMaterialExpressionReroute

UMaterialExpressionRotateAboutAxis

UMaterialExpressionRotator

UMaterialExpressionRound

UMaterialExpressionSaturate

UMaterialExpressionSceneColor

UMaterialExpressionSceneDepth

UMaterialExpressionSceneTexelSize

UMaterialExpressionSceneTexture

UMaterialExpressionScreenPosition

UMaterialExpressionSetMaterialAttributes

UMaterialExpressionSign

UMaterialExpressionSine

UMaterialExpressionSobol

UMaterialExpressionSpeedTree

UMaterialExpressionSphereMask

UMaterialExpressionSphericalParticleOpacity

UMaterialExpressionSquareRoot

UMaterialExpressionStaticBool

UMaterialExpressionStaticSwitch

UMaterialExpressionSubtract

UMaterialExpressionTangent

UMaterialExpressionTemporalSobol

UMaterialExpressionTextureBase

UMaterialExpressionTextureObject

UMaterialExpressionTextureSample

UMaterialExpressionParticleSubUV

UMaterialExpressionTextureSampleParameter

UMaterialExpressionTextureObjectParameter

UMaterialExpressionTextureSampleParameter2D

UMaterialExpressionAntialiasedTextureMask

UMaterialExpressionSpriteTextureSampler

UMaterialExpressionTextureSampleParameterSubUV

UMaterialExpressionTextureSampleParameterCube

UMaterialExpressionTextureCoordinate

UMaterialExpressionTextureProperty

UMaterialExpressionTime

UMaterialExpressionTransform

UMaterialExpressionTransformPosition

UMaterialExpressionTruncate

UMaterialExpressionTwoSidedSign

UMaterialExpressionVectorNoise

UMaterialExpressionVertexColor

UMaterialExpressionVertexNormalWS

UMaterialExpressionViewProperty

UMaterialExpressionViewSize

UMaterialExpressionWorldPosition

Syntax

class UMaterialExpression : public UObject

Remarks

: FExpressionInput is mirrored in MaterialShared.h and manually "subclassed" in Material.h (FMaterialInput ) noexport struct

Variables

Name Description

Public variable

uint32 : 1

 

bCollapsed

If true, show a collapsed version of the node

Public variable

uint32 : 1

 

bCommentBubbleVisible

If true, the comment bubble will be visible in the graph editor

Public variable

uint32 : 1

 

bHidePreviewWindow

If true, do not render the preview window for the expression

Public variable

uint32 : 1

 

bIsParameterExpression

Indicates that this is a 'parameter' type of expression and should always be loaded (ie not cooked away) because we might want the default parameter.

Public variable

uint32 : 1

 

bNeedToUpdatePreview

If true, we should update the preview next render. This is set when changing bRealtimePreview.

Public variable

FColor

 

BorderColor

Color of the expression's border outline.

Public variable

uint32 : 1

 

bRealtimePreview

Set to true by RecursiveUpdateRealtimePreview() if the expression's preview needs to be updated in realtime in the material editor.

Public variable

uint32 : 1

 

bShaderInputData

Whether the node represents an input to the shader or not. Used to color the node's background.

Public variable

uint32 : 1

 

bShowInputs

Whether to draw the expression's inputs.

Public variable

uint32 : 1

 

bShowMaskColorsOnPin

If true, changes the pin color to match the output mask

Public variable

uint32 : 1

 

bShowOutputNameOnPin

If true, use the output name as the label for the pin

Public variable

uint32 : 1

 

bShowOutputs

Whether to draw the expression's outputs.

Public variable

FString

 

Desc

A description that level designers can add (shows in the material editor UI).

Public variable

UMaterialFuncti ...

 

Function

The material function that this expression is being used with, if any.

Public variable

UEdGraphNode &#...

 

GraphNode

Expression's Graph representation

Public variable

FString

 

LastErrorText

Text of last error for this expression

Public variable

UMaterial *

 

Material

WITH_EDITORONLY_DATA.

Public variable

int32

 

MaterialExpressionEditorX

Public variable

int32

 

MaterialExpressionEditorY

Public variable

FGuid

 

MaterialExpressionGuid

GUID to uniquely identify this node, to help the tutorials out

Public variable

TArray < FText >

 

MenuCategories

Localized categories to sort this expression into...

Public variable

TArray < FExpres ...

 

Outputs

WITH_EDITORONLY_DATA.

Constructors

Name Description

Public function

UMaterialExpression

(
    const FObjectInitializer & ObjectIn...
)

Functions

Name Description

Public function Virtual

bool

 

CanRenameNode()

Can this node be renamed?

Public function Virtual

int32

 

Compile

(
    FMaterialCompiler * Compiler,
    int32 OutputIndex
)

Create the new shader code chunk needed for the Abs expression

Public function Virtual

int32

 

CompilePreview

(
    FMaterialCompiler * Compiler,
    int32 OutputIndex
)

Public function Virtual

int32

 

CompilerError

(
    FMaterialCompiler * Compiler,
    const TCHAR * pcMessage
)

Public function

void

 

ConnectExpression

(
    FExpressionInput * Input,
    int32 OutputIndex
)

WITH_EDITOR.

Public function

void

 

ConnectToPreviewMaterial

(
    UMaterial * InMaterial,
    int32 OutputIndex
)

Connects the specified output to the passed material for previewing.

Public function

bool

 

ContainsInputLoop

(
    const bool bStopOnFunctionCall
)

WITH_EDITOR.

Protected function

bool

 

ContainsInputLoopInternal

(
    TArray < FMaterialExpressionKey >& ...,
    TSet < FMaterialExpressionKey >& Vi...,
    const bool bStopOnFunctionCall
)

Checks whether any inputs to this expression create a loop by recursively calling itself and keeping a list of inputs as expression keys.

Public function Static

void

 

CopyMaterialExpressions

(
    const TArray < class UMaterialExpres ...,
    const TArray < class UMaterialExpres ...,
    UMaterial * Material,
    UMaterialFunction * Function,
    TArray < class UMaterialExpression &...,
    TArray < class UMaterialExpression &...
)

Copy the SrcExpressions into the specified material, preserving internal references.

Public function

bool

 

GetAllInputExpressions

(
    TArray < UMaterialExpression * >...
)

Recursively gets a list of all expressions that are connected to this Checks for repeats so that it can't end up in an infinite loop

Public function Virtual

void

 

GetCaption

(
    TArray < FString >& OutCaptions
)

Returns the text to display on the material expression (in the material editor).

Public function Virtual

void

 

GetConnectorToolTip

(
    int32 InputIndex,
    int32 OutputIndex,
    TArray < FString >& OutToolTip
)

Get a tooltip for the specified connector.

Public function Virtual

FText

 

GetCreationDescription()

Public function Virtual

FText

 

GetCreationName()

Public function Virtual

FString

 

GetDescription()

Get a single line description of the material expression (used for lists)

Public function Virtual

FString

 

GetEditableName()

Returns the current 'name' of the node (typically a parameter name).

Public function Virtual

void

 

GetExpressionToolTip

(
    TArray < FString >& OutToolTip
)

Get a tooltip for the expression itself.

Public function Virtual

int32

 

GetHeight()

Public function Virtual

FExpressionI ...

 

GetInput

(
    int32 InputIndex
)

Public function Virtual

FString

 

GetInputName

(
    int32 InputIndex
)

Public function Virtual

const TArray ...

 

GetInputs()

Public function Virtual

uint32

 

GetInputType

(
    int32 InputIndex
)

Public function Virtual

FText

 

GetKeywords()

Returns the keywords that should be used when searching for this expression

Public function Virtual

int

 

GetLabelPadding()

Returns the amount of padding to use for the label.

int32 The padding (in pixels).

Public function Virtual

FGuid &

 

GetMaterialExpressionId()

Return the material expression guid.

Public function Virtual

TArray < FExp ...

 

GetOutputs()

WITH_EDITOR.

Public function Virtual

uint32

 

GetOutputType

(
    int32 OutputIndex
)

Public function Virtual

FGuid &

 

GetParameterExpressionId()

Callback to access derived classes' parameter expression id.

Public function Virtual

FName

 

GetParameterName()

Public function Virtual

UTexture ...

 

GetReferencedTexture()

Callback to get any texture reference this expression emits.

Public function Virtual

void

 

GetTexturesForceMaterialRecompile

(
    TArray < UTexture * >& Textures
)

Fill the array with all textures dependence that should trig a recompile of the material.

Public function Virtual

int32

 

GetWidth()

Get the width required by this expression (in the material editor).

int32 The width in pixels.

Public function Virtual

bool

 

HasAParameterName()

Parameter Name functions, this is requires as multiple class have ParameterName but are not UMaterialExpressionParameter due to class hierarchy.

Public function Virtual

bool

 

IsInputConnectionRequired

(
    int32 InputIndex
)

Public function Virtual

bool

 

IsResultMaterialAttributes

(
    int32 OutputIndex
)

Marks certain expression types as outputting material attributes.

Public function Virtual

bool

 

MatchesSearchQuery

(
    const TCHAR * SearchQuery
)

MatchesSearchQuery: Check this expression to see if it matches the search query

Public function Virtual

bool

 

NeedsRealtimePreview()

WITH_EDITOR.

Public function Virtual

void

 

SetEditableName

(
    const FString & NewName
)

Sets the current 'name' of the node (typically a parameter name) Only valid to call on a node that previously returned CanRenameNode() = true.

Public function Virtual

void

 

SetParameterName

(
    const FName & Name
)

Public function

void

 

UpdateMaterialExpressionGuid

(
    bool bForceGeneration,
    bool bAllowMarkingPackageDirty
)

WITH_EDITOR.

Public function

void

 

UpdateParameterGuid

(
    bool bForceGeneration,
    bool bAllowMarkingPackageDirty
)

WITH_EDITOR.

Public function Virtual

bool

 

UsesLeftGutter()

Public function Virtual

bool

 

UsesRightGutter()

Public function Virtual

void

 

ValidateParameterName()

Public function

void

 

ValidateState()

WITH_EDITOR.

Overridden from UObject

Name Description

Public function Virtual

bool

 

CanEditChange

(
    const UProperty * InProperty
)

Called by the editor to query whether a property of this object is allowed to be modified.

Public function Virtual

bool

 

Modify

(
    bool bAlwaysMarkDirty
)

WITH_EDITOR.

Public function Virtual

bool

 

NeedsLoadForClient()

Called during saving to determine the load flags to save with the object.

Public function Virtual

bool

 

NeedsLoadForEditorGame()

Called during saving to determine the load flags to save with the object.

Public function Virtual

void

 

PostDuplicate

(
    bool bDuplicateForPIE
)

Called after duplication & serialization and before PostLoad.

Public function Virtual

void

 

PostEditChangeProperty

(
    FPropertyChangedEvent & PropertyCha...
)

Called when a property on this object has been modified externally

Public function Virtual

void

 

PostEditImport()

Called after importing property values for this object (paste, duplicate or .t3d import) Allow the object to perform any cleanup for properties which shouldn't be duplicated or are unsupported by the script serialization

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, and immediately after any undo/redo.

Public function Virtual

void

 

Serialize

(
    FArchive & Ar
)

UObject serializer.

References

Module

Engine

Header

Runtime/Engine/Classes/Materials/MaterialExpression.h