Navigation
API > API/Runtime > API/Runtime/MeshConversion
Converter that gives a specific UV layer of a provided mesh description and turns it into a flat FDynamicMesh, with vertices corresponding to UV elements, and their positions corresponding to those elements' UV coordinate values. The triangle id's in the dynamic mesh will correspond to original triangles of the mesh.
The converter can also bake back such a dynamic mesh to an existing mesh description UV layer after the dynamic mesh has been modified. The important part is that the triangle IDs continue to correspond to each other. This means that while welding/splitting vertices in the dynamic mesh is ok, adding or removing triangles is not.
The converter prefers shared UVs when they are available, though it will populate instanced UVs as well on the way back.
| Name | FMeshDescriptionUVsToDynamicMesh |
| Type | class |
| Header File | /Engine/Source/Runtime/MeshConversion/Public/MeshDescriptionUVsToDynamicMesh.h |
| Include Path | #include "MeshDescriptionUVsToDynamicMesh.h" |
Syntax
class FMeshDescriptionUVsToDynamicMesh
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ScaleFactor | double | The [0,1] UV range will be scaled to [0, ScaleFactor]. | MeshDescriptionUVsToDynamicMesh.h | |
| UVLayerIndex | int32 | MeshDescriptionUVsToDynamicMesh.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void BakeBackUVsFromUVMesh
(
const FDynamicMesh3* DynamicUVMesh, |
MeshDescriptionUVsToDynamicMesh.h | ||
int32 GetNumUVLayers
(
const FMeshDescription* InputMeshDescription |
MeshDescriptionUVsToDynamicMesh.h | ||
TSharedPtr< FDynamicMesh3 > GetUVMesh
(
const FMeshDescription* InputMeshDescription |
TODO: The conversion function forward to a dynamic mesh should be made to produce maps similar to MeshDescriptionToDynamicMesh, which is why this is not a const function. | MeshDescriptionUVsToDynamicMesh.h |