DatasmithMaterialsUtils::CreateWeightedMaterialExpression

Generate material expressions on a given DatasmithUEPbrMaterialElement that output a color or scalar interpolated with a MaterialExpression

Windows
MacOS
Linux

References

Module

DatasmithCore

Header

/Engine/Source/Runtime/Datasmith/DatasmithCore/Public/DatasmithMaterialsUtils.h

Include

#include "DatasmithMaterialsUtils.h"

Source

/Engine/Source/Runtime/Datasmith/DatasmithCore/Private/DatasmithMaterialsUtils.cpp

Syntax

namespace DatasmithMaterialsUtils
{
    IDatasmithMaterialExpression * DatasmithMaterialsUtils::CreateWeightedMaterialExpression
    (
        const TSharedRef< IDatasmithUEPbrMaterialElement > & MaterialElement,
        const TCHAR * ParameterName,
        TOptional< FLinearColor > Color,
        TOptional< float > Scalar,
        IDatasmithMaterialExpression * Expression,
        float Weight,
        EDatasmithTextureMode TextureMode
    )
}

Remarks

Generate material expressions on a given DatasmithUEPbrMaterialElement that output a color or scalar interpolated with a MaterialExpression

Returns

Material expression that outputs a Color or Scalar interpolated with Expression; nullptr if no Color, Scalar or Expression are given

Parameters

Parameter

Description

MaterialElement

The UEPbrMaterialElement on which to create the material expressions

ParameterName

The display name for the Color or Scalar input

Color

The color to interpolate the Expression with. If no color is given, use the scalar

Scalar

The scalar to interpolate the Expression with. If no color or scalar are given, use the Expression only

Expression

The MaterialExpression to interpolate the Color or Scalar with

Weight

The weight of the Expression in the interpolation

TextureMode

The TextureMode of the Expression to determine if it requires normal flattening (bump and normal mode) or interpolation

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss