I'm using the FBX SDK to import FBX files and read their vertices and normals.
I have a 'cube.fbx' in binary, and I have used the FBX converter to convert it to ascii 'cube (ascii).fbx'
When I import cube.fbx using the SDK, srcMesh->GetElementNormal()->GetDirectArray() is populated with all the normals as you would expect...
However, when importing 'cube (ascii).fbx', the normals array is seemingly zeroed out, and all normals are 0,0,0. The normals ARE present in the ascii FBX file.
Even using the sample code from the ImportScene example does not pull the normals properly...
Is this a bug in the library? or is there a way to work around this? Thanks!
Solved! Go to Solution.
Solved by ilan.keshet. Go to Solution.
FBX does have a mesh->GenerateNormals function that "sort of" works if the mesh has smoothing groups. You can try that.
However it doesn't always work -- though in a case of a cube it will work.
I will have a look at the ascii cube from as well
I can confirm that the normals in your cube ascii file are completely broken -- and can also confirm that using GenerateNormals will fix them.
Can't find what you're looking for? Ask the community or share your knowledge.