You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when i load the output fbx file into blender it shows uv layers names as [Attribute.n] etc
if (uvChannels > 0)
{
mesh->mTextureCoordsNames = new aiString * [AI_MAX_NUMBER_OF_TEXTURECOORDS];
// Initialize pointers to null to avoid garbage data
for (int k = 0; k < AI_MAX_NUMBER_OF_TEXTURECOORDS; k++) {
mesh->mTextureCoordsNames[k] = nullptr;
}
}
// Allocate UV channels and set names
for (int i = 0; i < uvChannels; i++)
{
mesh->mTextureCoords[i] = new aiVector3D[mesh->mNumVertices];
mesh->mNumUVComponents[i] = 2; // 2D UVs
if (primMesh->UvLayersNames[i] != nullptr)
{
mesh->mTextureCoordsNames[i] = new aiString(ManagedToStdString(primMesh->UvLayersNames[i]).c_str());
}
}
is this array supported in fbx export ?
full exporter
static std::string ManagedToStdString(System::String^ managedStr)
{
if (managedStr == nullptr)
return "";
return msclr::interop::marshal_as(managedStr);
}
// Helper to convert Float3 to aiVector3D
static aiVector3D ToAiVector3D(Float3 vec)
{
return aiVector3D(vec.X, vec.Y, vec.Z);
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
when i load the output fbx file into blender it shows uv layers names as [Attribute.n] etc
if (uvChannels > 0) { mesh->mTextureCoordsNames = new aiString * [AI_MAX_NUMBER_OF_TEXTURECOORDS]; // Initialize pointers to null to avoid garbage data for (int k = 0; k < AI_MAX_NUMBER_OF_TEXTURECOORDS; k++) { mesh->mTextureCoordsNames[k] = nullptr; } } // Allocate UV channels and set names for (int i = 0; i < uvChannels; i++) { mesh->mTextureCoords[i] = new aiVector3D[mesh->mNumVertices]; mesh->mNumUVComponents[i] = 2; // 2D UVs}
is this array supported in fbx export ?
full exporter
static std::string ManagedToStdString(System::String^ managedStr) { if (managedStr == nullptr) return ""; return msclr::interop::marshal_as(managedStr); } // Helper to convert Float3 to aiVector3D static aiVector3D ToAiVector3D(Float3 vec) { return aiVector3D(vec.X, vec.Y, vec.Z); }// Helper to convert Float4x4 to aiMatrix4x4
static aiMatrix4x4 ToAiMatrix4x4(Float4x4 mat)
{
return aiMatrix4x4(
mat.M11, mat.M12, mat.M13, mat.M14,
mat.M21, mat.M22, mat.M23, mat.M24,
mat.M31, mat.M32, mat.M33, mat.M34,
mat.M41, mat.M42, mat.M43, mat.M44
);
}
// Convert PrimordialNode to aiNode
static aiNode* ConvertNode(PrimordialNode^ node, aiNode* parentNode)
{
aiNode* ainode = new aiNode();
ainode->mName = aiString(ManagedToStdString(node->Name).c_str());
ainode->mTransformation = ToAiMatrix4x4(node->LocalTransform);
ainode->mParent = parentNode;
}
// Convert PrimordialMesh to aiMesh
static aiMesh* ConvertMesh(PrimordialMesh^ primMesh)
{
aiMesh* mesh = new aiMesh();
mesh->mName = aiString(ManagedToStdString(primMesh->Name).c_str());
}
Beta Was this translation helpful? Give feedback.
All reactions