Navigation
API > API/Plugins > API/Plugins/InterchangeImport
| Name | FMaterialXBase |
| Type | class |
| Header File | /Engine/Plugins/Interchange/Runtime/Source/Import/Public/MaterialX/MaterialXUtils/MaterialXBase.h |
| Include Path | #include "MaterialX/MaterialXUtils/MaterialXBase.h" |
Syntax
class FMaterialXBase : public TSharedFromThis< FMaterialXBase >
Inheritance Hierarchy
- FSharedFromThisBase → TSharedFromThis → FMaterialXBase
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FMaterialXBase
(
UInterchangeBaseNodeContainer& BaseNodeContainer |
MaterialX/MaterialXUtils/MaterialXBase.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FMaterialXBase() |
MaterialX/MaterialXUtils/MaterialXBase.h |
Enums
Public
| Name | Remarks |
|---|---|
| EMaterialXLog |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FAttributeValue | TPair< const char *, const char * > | MaterialX/MaterialXUtils/MaterialXBase.h | |
| FAttributeValueArray | TArray< FAttributeValue > | MaterialX/MaterialXUtils/MaterialXBase.h | |
| FInputToCopy | TPair< const char *, MaterialX::InputPtr > | MaterialX/MaterialXUtils/MaterialXBase.h | |
| FInputToCreate | TPair< const char *, FAttributeValueArray > | MaterialX/MaterialXUtils/MaterialXBase.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void SetNodeDefinition
(
const char* NodeDefinition |
Set the node definition of a shader, useful when a shader has multiple definition per types and when we know the type only at the top level during a surfacematerial for example and not a construction-time. | MaterialX/MaterialXUtils/MaterialXBase.h | |
void SetTranslator
(
const UInterchangeTranslatorBase* InTranslator |
Set the translator, only used for logging messages | MaterialX/MaterialXUtils/MaterialXBase.h | |
UInterchangeBaseNode * Translate
(
MaterialX::NodePtr Node |
MaterialX/MaterialXUtils/MaterialXBase.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
MaterialX::InputPtr GetInput
(
MaterialX::NodePtr Node, |
Retrieve the input from a surfaceshader node, or take the default input from the library, this function should only be called after testing the MaterialX libraries have been successfully imported, meaning the node definition of the surfaceshader should always be valid | MaterialX/MaterialXUtils/MaterialXBase.h | |
FLinearColor GetLinearColor
(
MaterialX::InputPtr Input |
Helper function that returns a linear color after a color space conversion, the function makes no assumption on the input, and it should have a value of Color3-4 type | MaterialX/MaterialXUtils/MaterialXBase.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void AddTexCoordToTiledImageNodes
(
MaterialX::ElementPtr Graph |
Add a texcoord input to the tiledimage nodes if the input is missing, and connect it to a texcoord node in the nodegraph This function should be called before the subgraphs substitution to avoid missing UVs input on a texture See for example standard_surface_brick_procedural where the tiledimage nodes have no texcoord input | MaterialX/MaterialXUtils/MaterialXBase.h | |
static void ConvertGeomPropValueNodesToTexCoord
(
MaterialX::GraphElementPtr Graph |
Convert |
MaterialX/MaterialXUtils/MaterialXBase.h | |
static void ConvertNeutralNodesToDot
(
MaterialX::ElementPtr NodeGraph |
Convert math nodes (add, sub, div, mul) that have a neutral input, to the MaterialX |
MaterialX/MaterialXUtils/MaterialXBase.h | |
| Helper function that create a MaterialX node, useful to insert a node between 2 nodes especially when an operation cannot be done in one pass If the node already exists in the graph, this one is returned | MaterialX/MaterialXUtils/MaterialXBase.h | ||
static FString GetColorSpace
(
MaterialX::ElementPtr Element |
Return the innermost color space of an element in the current scope, if it has none, it will take the one from its parents | MaterialX/MaterialXUtils/MaterialXBase.h | |
static void UpdateDocumentRecursively
(
MaterialX::GraphElementPtr Graph |
Update a MaterialX Document recursively by either initializing nodes (like |
MaterialX/MaterialXUtils/MaterialXBase.h |