UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
DatasmithMaterialsUtils Namespace Reference

Classes

struct  FUVEditParameters
 

Functions

DATASMITHCORE_API IDatasmithMaterialExpressionTextureCreateTextureExpression (const TSharedRef< IDatasmithUEPbrMaterialElement > &MaterialElement, const TCHAR *ParameterName, const TCHAR *TextureMapPath, const FUVEditParameters &UVParameters)
 
DATASMITHCORE_API IDatasmithMaterialExpressionCreateWeightedMaterialExpression (const TSharedRef< IDatasmithUEPbrMaterialElement > &MaterialElement, const TCHAR *ParameterName, TOptional< FLinearColor > Color, TOptional< float > Scalar, IDatasmithMaterialExpression *Expression, float Weight, EDatasmithTextureMode TextureMode=EDatasmithTextureMode::Diffuse)
 
DATASMITHCORE_API FLinearColor TemperatureToColor (float Kelvin)
 

Function Documentation

◆ CreateTextureExpression()

IDatasmithMaterialExpressionTexture * DatasmithMaterialsUtils::CreateTextureExpression ( const TSharedRef< IDatasmithUEPbrMaterialElement > &  MaterialElement,
const TCHAR ParameterName,
const TCHAR TextureMapPath,
const FUVEditParameters UVParameters 
)

Generate material expressions on a given DatasmithUEPbrMaterialElement to output a texture with UV settings applied to it

Parameters
MaterialElementThe UEPbrMaterialElement on which to create the material expressions
ParameterNameThe display name for the Texture expression
TextureMapPathThe texture to use for the Texture expression
UVParametersThe UVEditParameters to apply
Returns
Texture expression with UVEdit applied to it; nullptr if no TextureMapPath is specified

◆ CreateWeightedMaterialExpression()

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

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

Parameters
MaterialElementThe UEPbrMaterialElement on which to create the material expressions
ParameterNameThe display name for the Color or Scalar input
ColorThe color to interpolate the Expression with. If no color is given, use the scalar
ScalarThe scalar to interpolate the Expression with. If no color or scalar are given, use the Expression only
ExpressionThe MaterialExpression to interpolate the Color or Scalar with
WeightThe weight of the Expression in the interpolation
TextureModeThe TextureMode of the Expression to determine if it requires normal flattening (bump and normal mode) or interpolation
Returns
Material expression that outputs a Color or Scalar interpolated with Expression; nullptr if no Color, Scalar or Expression are given

◆ TemperatureToColor()

FLinearColor DatasmithMaterialsUtils::TemperatureToColor ( float  Kelvin)