Navigation
API > API/Plugins > API/Plugins/InterchangeImport > API/Plugins/InterchangeImport/MaterialX > API/Plugins/InterchangeImport/MaterialX/MaterialXUtils
Inheritance Hierarchy
- TSharedFromThis
- FMaterialXBase
- FMaterialXSurfaceShaderAbstract
References
| Module | InterchangeImport |
| Header | /Engine/Plugins/Interchange/Runtime/Source/Import/Public/MaterialX/MaterialXUtils/MaterialXSurfaceShaderAbstract.h |
| Include | #include "MaterialX/MaterialXUtils/MaterialXSurfaceShaderAbstract.h" |
Syntax
class FMaterialXSurfaceShaderAbstract : public FMaterialXBase
Variables
| Type | Name | Description | |
|---|---|---|---|
| TMap< FString, FOnConnectNodeOutputToInput > | MatchingConnectNodeDelegates | Matching MaterialX category and Connect function | |
| UInterchangeShaderGraphNode * | ShaderGraphNode | Initialized by the material shader (e.g: surfacematerial), the derived class should only set the ShaderType | |
| TMap< FNodeOutput, UInterchangeShaderNode * > | ShaderNodes | Store the shader nodes only when we create the shader graph node | |
| MaterialX::NodePtr | SurfaceShaderNode | The surface shader node processed during the Translate, up to the derived class to initialize it | |
| TOptional< TextureCompressionSettings > | TextureCompression |
Constructors
| Type | Name | Description | |
|---|---|---|---|
FMaterialXSurfaceShaderAbstract
(
UInterchangeBaseNodeContainer& BaseNodeContainer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| bool | AddAttribute
(
MaterialX::InputPtr Input, |
Add an attribute to a shader node from the given MaterialX input, only floats and linear colors are supported for the moment | |
| bool | AddAttributeFromValueOrInterface
(
MaterialX::InputPtr Input, |
Add an attribute to a shader node from the given MaterialX input if that input has either a value or an interface name | |
| bool | AddFloatAttribute
(
MaterialX::InputPtr Input, |
Add a float attribute to a shader node only if its value taken from the input is not equal to its default value. | |
| bool | AddLinearColorAttribute
(
MaterialX::InputPtr Input, |
Add a FLinearColor attribute to a shader node only if its value taken from the input is not equal to its default value. | |
| bool | AddVectorAttribute
(
MaterialX::InputPtr Input, |
Add a FLinearColor attribute to a shader node only if its value taken from the input is not equal to its default value. | |
| void | ConnectBitangentInputToOutput
(
const FConnectNode& Connect |
||
| void | ConnectBlurInputToOutput
(
const FConnectNode& Connect |
||
| void | ConnectCellNoise3DInputToOutput
(
const FConnectNode& Connect |
||
| void | ConnectConstantInputToOutput
(
const FConnectNode& Connect |
Begin Connect MaterialX nodes |
|
| void | ConnectConvertInputToOutput
(
const FConnectNode& Connect |
||
| void | ConnectDotInputToOutput
(
const FConnectNode& Connect |
||
| void | ConnectExtractInputToOutput
(
const FConnectNode& Connect |
||
| void | ConnectHeightToNormalInputToOutput
(
const FConnectNode& Connect |
||
| void | ConnectIfEqualInputToOutput
(
const FConnectNode& Connect |
||
| void | ConnectIfGreaterEqInputToOutput
(
const FConnectNode& Connect |
||
| void | ConnectIfGreaterInputToOutput
(
const FConnectNode& Connect |
||
| void | ConnectImageInputToOutput
(
const FConnectNode& Connect |
||
| bool | ConnectMatchingNodeOutputToInput
(
const FConnectNode& Connect |
Create and Connect the output of a MaterialX node that has already a matching in UE to a shader node, If not search for a registered delegate | |
| void | ConnectNodeCategoryOutputToInput
(
const MaterialX::Edge& Edge, |
Create and Connect manually the output of a MaterialX node to a shader node | |
| bool | ConnectNodeGraphOutputToInput
(
MaterialX::InputPtr InputToNodeGraph, |
Connect an ouput in the NodeGraph to the ShaderGraph | |
| bool | ConnectNodeNameOutputToInput
(
MaterialX::InputPtr Input, |
Create and Connect a node name directly connected from an input to a shader node | |
| bool | ConnectNodeOutputToInput
(
const char* InputName, |
Connect an output either from a node name or a node graph from a MaterialX input to the ShaderNode | |
| void | ConnectNoise3DInputToOutput
(
const FConnectNode& Connect |
||
| void | ConnectNormalInputToOutput
(
const FConnectNode& Connect |
||
| void | ConnectOutsideInputToOutput
(
const FConnectNode& Connect |
||
| void | ConnectPositionInputToOutput
(
const FConnectNode& Connect |
||
| void | ConnectRotate3DInputToOutput
(
const FConnectNode& Connect |
||
| void | ConnectSeparateInputToOutput
(
const FConnectNode& Connect |
||
| void | ConnectSwizzleInputToOutput
(
const FConnectNode& Connect |
||
| void | ConnectTangentInputToOutput
(
const FConnectNode& Connect |
||
| void | ConnectTexCoordInputToOutput
(
const FConnectNode& Connect |
||
| void | ConnectTimeInputToOutput
(
const FConnectNode& Connect |
||
| void | ConnectTransformPositionInputToOutput
(
const FConnectNode& Connect |
||
| void | ConnectTransformVectorInputToOutput
(
const FConnectNode& Connect |
||
| void | ConnectWorleyNoise3DInputToOutput
(
const FConnectNode& Connect |
||
| UInterchangeShaderNode * | CreateMaskShaderNode
(
uint8 RGBA, |
End Connect MaterialX nodes Create a ComponentMask shader node. | |
| UInterchangeShaderNode * | CreateShaderNode
(
const FString& NodeName, |
Helper function to create an InterchangeShaderNode | |
| UInterchangeTextureNode * | CreateTextureNode
(
MaterialX::NodePtr Node |
Helper function to create an InterchangeTextureNode | |
| FString | GetAttributeParentName
(
MaterialX::NodePtr Node |
Retrieve the interchange parent name of a MaterialX node, useful when a node is a combination of several nodes connected to different inputs (look for example Noise3D) | |
| FString | GetFilePrefix
(
MaterialX::ElementPtr Element |
Return the innermost file prefix of an element in the current scope, if it has none, it will take the one from its parents | |
| FString | GetInputName
(
MaterialX::InputPtr Input |
Get the input name, use this function instead of getName, because a renaming may have occured and we ensure to have the proper name that will be used by UE inputs | |
| const FString & | GetMatchedInputName
(
MaterialX::NodePtr Node, |
Get the UE corresponding name of a MaterialX Node category and input for a material | |
| FLinearColor | GetVector
(
MaterialX::InputPtr Input |
Helper function that returns a vector, the function makes no assumption on the input, and it should have a value of vectorN type | |
| void | |||
| void | SetAttributeNewName
(
MaterialX::InputPtr Input, |
Add the input new name under the attribute UE::NewName. | |
| void | SetMatchingInputsNames
(
MaterialX::NodePtr Node |
Set the matching inputs names of a node to correspond to the one used by UE, the matching name is stored under the attribute UE::NewName |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FConnectNode |
Typedefs
| Name | Description |
|---|---|
| FNodeOutput | |
| FOnConnectNodeOutputToInput |
Constants
| Name | Description |
|---|---|
| DefaultOutput | MaterialX states the default output name of the different nodes is 'out'. |
| EmptyString |