Navigation
API > API/Plugins > API/Plugins/InterchangeImport > API/Plugins/InterchangeImport/MaterialX > API/Plugins/InterchangeImport/MaterialX/MaterialXUtils
Inheritance Hierarchy
- FSharedFromThisBase
- 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 | |
|---|---|---|---|
| bool | bTangentSpaceInput | Used for texture compression and transform to tangent space nodes coming from inputs such as coat_normal | |
| 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 |
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. | |
| 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 | AddBooleanAttribute
(
MaterialX::InputPtr Input, |
Add a bool attribute to a shader node only if its value taken from the input is not equal to its default value. | |
| 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 an 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 an 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. | |
| 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 shader node. | |
| void | ConnectNoise3DInputToOutput
(
const FConnectNode& Connect |
||
| void | ConnectNormalInputToOutput
(
const FConnectNode& Connect |
||
| void | ConnectNormalMapInputToOutput
(
const FConnectNode& Connect |
||
| void | ConnectOutsideInputToOutput
(
const FConnectNode& Connect |
||
| void | ConnectPositionInputToOutput
(
const FConnectNode& Connect |
||
| void | ConnectRotate2DInputToOutput
(
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 |
||
| UInterchangeFunctionCallShaderNode * | CreateFunctionCallShaderNode
(
const FString& NodeName, |
||
| UInterchangeFunctionCallShaderNode * | CreateFunctionCallShaderNode
(
MaterialX::ElementPtr Element, |
Helper function to create an InterchangeFunctionCallShaderNode. | |
| UInterchangeShaderNode * | CreateMaskShaderNode
(
uint8 RGBA, |
End Connect MaterialX nodes Create a ComponentMask shader node. | |
| UInterchangeShaderNode * | CreateShaderNode
(
MaterialX::ElementPtr Element, |
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. | |
| FString | GetFilePrefix
(
MaterialX::ElementPtr Element |
Return the innermost file prefix of an element in the current scope. | |
| FString | GetInputName
(
MaterialX::InputPtr Input |
Get the input name. | |
| const FString & | GetMatchedInputName
(
MaterialX::NodePtr Node, |
Get the UE corresponding name of a MaterialX Node category and input for a material. | |
| FString | GetUniqueName
(
MaterialX::ElementPtr Element |
Ensure that we put in the node container the unique name, 2 nodes in a same file may have the same name as long as their parent's name is different, we just traverse the whole hierarchy to have a unique name | |
| FLinearColor | GetVector
(
MaterialX::InputPtr Input |
Helper function that returns a vector. | |
| 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. | |
| UInterchangeShaderNode * | Translate
(
EInterchangeMaterialXShaders ShaderType |
This function should be called first by the Translate method of derived class, SurfaceShaderNode should initialized first by the derived class |
Overridden from FMaterialXBase
| Type | Name | Description | |
|---|---|---|---|
| void | Translate
(
MaterialX::NodePtr ShaderNode |
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 |