Module |
|
Header |
/Engine/Source/Developer/MaterialUtilities/Public/MaterialUtilities.h |
Include |
#include "MaterialUtilities.h" |
Source |
/Engine/Source/Developer/MaterialUtilities/Private/MaterialUtilities.cpp |
static void RemapUniqueMaterialIndices
(
const TArray< struct FSectionInfo > & InSections,
const TArray< struct FRawMeshExt > & InMeshData,
const TMap< FIntPoint, TArray< int32 > > & InMaterialMap,
const FMaterialProxySettings & InMaterialProxySettings,
const bool bBakeVertexData,
const bool bMergeMaterials,
TArray< bool > & OutMeshShouldBakeVertexData,
TMap< FIntPoint, TArray< int32 > > & OutMaterialMap,
TArray< struct FSectionInfo > & OutSections
)
Remaps material indices where possible to reduce the number of materials required for creating a proxy material
Parameter |
Description |
---|---|
InMaterials |
List of Material interfaces (non-unique) |
InMeshData |
Array of meshes who use the materials in InMaterials |
InMaterialMap |
Map of MeshIDAndLOD keys with a material index array as value mapping InMeshData to the InMaterials array |
InMaterialProxySettings |
Settings for creating the proxy material |
bBakeVertexData |
Flag whether or not Vertex Data should be baked down |
bMergeMaterials |
Flag whether or not materials with be merged for this mesh |
OutMeshShouldBakeVertexData |
Array with Flag for each mesh whether or not Vertex Data should be baked down or is required to |
OutMaterialMap |
Map of MeshIDAndLOD keys with a material index array as value mapping InMeshData to the OutMaterials array |
OutMaterials |
List of Material interfaces (unique) |