Navigation
API > API/Developer > API/Developer/MeshMergeUtilities
References
| Module | MeshMergeUtilities |
| Header | /Engine/Source/Developer/MeshMergeUtilities/Public/MeshMergeDataTracker.h |
| Include | #include "MeshMergeDataTracker.h" |
Syntax
class FMeshMergeDataTracker
Remarks
Used to keep track of in-flight data while meshes are merged and their corresponding materials baked down
Variables
| Type | Name | Description | |
|---|---|---|---|
| int32 | AvailableLightMapUVChannel | First available UV channel across all RawMesh entries | |
| bool[8][MAX_MESH_TEXTURE_COORDS_MD] | bOcuppiedUVChannels | ||
| bool[8] | bWithVertexColors | Flags for UV and vertex color usage | |
| TMap< FMeshLODKey, uint32 > | ComponentToWedgeOffsets | ||
| TMap< FMeshLODKey, int32 > | LightmapChannelLODs | Mesh / LOD index, lightmap channel. | |
| TArray< int32 > | LODIndices | All LOD indices which should be populated in the final merged mesh | |
| TMap< UMaterialInterface *, FName > | MaterialInterfaceToMaterialSlotName | Use this map to recycle the material slot name. | |
| TMap< FMeshLODKey, FMeshDescription > | RawMeshLODs | Mesh / LOD index, RawMesh. | |
| TArray< FMeshLODKey > | RequiresUniqueUVs | Whether a key requires unique UVs. | |
| int32 | SummedLightMapPixels | ||
| TMultiMap< FMeshLODKey, SectionRemapPair > | UniqueSectionIndexPerLOD | Remapping pairs for each mesh and LOD index combination | |
| TArray< FSectionInfo > | UniqueSections | Unique set of sections in mesh | |
| TMultiMap< uint32, FMeshLODKey > | UniqueSectionToMeshLOD | Maps from each unique section index to all the RawMesh entries which contain an original section that's mapped to it |
Constructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| FMeshDescription & | AddAndRetrieveRawMesh
(
int32 MeshIndex, |
Adds or retrieves raw mesh data for the mesh and LOD index | |
| void | AddBakedMaterialSection
(
const FSectionInfo& SectionInfo |
Clears out unique section to be replaced with the baked material one | |
| void | AddComponentToWedgeMapping
(
int32 MeshIndex, |
||
| void | AddLightmapChannelRecord
(
int32 MeshIndex, |
Adds a record of what channel lightmap data is stored at | |
| void | AddLightMapPixels
(
int32 Pixels |
Add number of lightmap pixels used for one of the Meshes | |
| void | AddLODIndex
(
int32 LODIndex |
Adds a LOD index which will be part of the final merged mesh | |
| void | AddMaterialSlotName
(
UMaterialInterface* MaterialInterface, |
Add a material slot name for a unique material instance. | |
| int32 | AddSection
(
const FSectionInfo& SectionInfo |
Adds (unique) section to stored data | |
| void | AddSectionRemapping
(
int32 MeshIndex, |
Adding a mapping between the index for an original mesh section index and the mesh section it will be indexed to in the final mesh | |
| bool | Returns whether or not any raw mesh entry contains vertex colors for any LOD index | ||
| bool | DoesLODContainVertexColors
(
int32 LODIndex |
Returns whether or not any raw mesh entry contains vertex colors for the specified LOD index | |
| bool | Returns whether or not the raw mesh entry for the given MeshLOD key requires unique UVs for baking out its material(s) | ||
| bool | DoesUVChannelContainData
(
int32 UVChannel, |
Returns whether or not any raw mesh entry contains texture coordinates for the specified UV channel and LOD index | |
| bool | DoesUVChannelContainData
(
int32 UVChannel |
Returns whether or not any raw mesh entry contains texture coordinates for the specified UV channel and any LOD index | |
| FMeshDescription * | FindRawMeshAndLODIndex
(
int32 MeshIndex, |
Tries to retrieve a FMeshDescription and returns the LOD index it found an entry for | |
| int32 | Returns the first available UV channel across all raw mesh entries, which will be a good fit for the lightmap UV index in the final mesh | ||
| uint32 | GetComponentToWedgeMappng
(
int32 MeshIndex, |
||
| TConstRawMeshIterator | Returns a const key/value iterator for the FMeshDescription entries | ||
| int32 | Returns the texture dimension required to distribute all of the lightmap pixels | ||
| TConstLODIndexIterator | Iterates over LOD indices for mesh | ||
| void | GetMappingsForMeshLOD
(
FMeshLODKey Key, |
Retrieves all section mappings for the MeshLOD key | |
| UMaterialInterface * | GetMaterialForSectionIndex
(
int32 SectionIndex |
Returns the material used by the unique section | |
| FName | GetMaterialSlotName
(
UMaterialInterface* MaterialInterface |
Get the material slot name from a unique material instance. | |
| void | GetMeshLODsMappedToUniqueSection
(
int32 UniqueIndex, |
Retrieves the MeshLOD keys from which the original sections are mapped to the unique section index | |
| int32 | Retrieves number of LODs part of the final merged mesh | ||
| TRawMeshIterator | Returns a non-const key/value iterator for the FMeshDescription entries | ||
| FMeshDescription * | GetRawMeshPtr
(
FMeshLODKey Key |
Retrieves Raw Mesh ptr for the given MeshLOD key | |
| FMeshDescription * | GetRawMeshPtr
(
int32 MeshIndex, |
Retrieves Raw Mesh ptr for the given mesh and LOD index | |
| const FSectionInfo & | GetSection
(
int32 SectionIndex |
Returns the unique section instance | |
| double | GetTextureSizeFromTargetTexelDensity
(
float InTargetTexelDensity |
||
| int32 | Returns the number of unique sections | ||
| void | Looks at all available raw mesh data and processes it to populate some flags | ||
| void | RemoveRawMesh
(
int32 MeshIndex, |
Removes raw mesh entry for the given mesh and LOD index | |
| FMeshDescription * | TryFindRawMeshForLOD
(
int32 MeshIndex, |
Tries to retrieve a FMeshDescription for the given mesh and LOD index, if it can't it will try to find an entry for each LOD levle below InOutDesiredLODIndex |