What I Want do Is
- Export StaticMesh To Fbx.
- Modify Fbx UV Use RizomUV Software
- Transfer Fbx UV Channel To Specified UV Channel Of StaticMesh (C++)
I Read Fbx UV Info Through Fbx SDK
if (lUVElement->GetMappingMode() == FbxGeometryElement::eByPolygonVertex)
{
int lPolyIndexCounter = 0;
for( int lPolyIndex = 0; lPolyIndex < lPolyCount; ++lPolyIndex )
{
// build the max index array that we need to pass into MakePoly
const int lPolySize = pMesh->GetPolygonSize(lPolyIndex);
for( int lVertIndex = 0; lVertIndex < lPolySize; ++lVertIndex )
{
if (lPolyIndexCounter < lIndexCount)
{
FbxVector2 lUVValue;
//the UV index depends on the reference mode
int lUVIndex = lUseIndex ? lUVElement->GetIndexArray().GetAt(lPolyIndexCounter) : lPolyIndexCounter;
lUVValue = lUVElement->GetDirectArray().GetAt(lUVIndex);
//User TODO:
//Print out the value of UV(lUVValue) or log it to a file
lPolyIndexCounter++;
}
}
}
}
But UStaticMesh SetUVChannel Need FVertexInstanceId.
bool SetUVChannel
(
int32 LODIndex,
int32 UVChannelIndex,
const TMap < FVertexInstanceID , FVector2D > & TexCoords
)