Community
FBX Forum
Welcome to Autodesk’s FBX Forums. Share your knowledge, ask questions, and explore popular FBX topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

FBX SDK importing cube normals not working

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
tyler5WSTU
312 Views, 3 Replies

FBX SDK importing cube normals not working

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!

3 REPLIES 3
Message 2 of 4
ilan.keshet
in reply to: tyler5WSTU

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

Message 3 of 4
ilan.keshet
in reply to: tyler5WSTU

I can confirm that the normals in your cube ascii file are completely broken -- and can also confirm that using GenerateNormals will fix them. 

Message 4 of 4
tyler5WSTU
in reply to: tyler5WSTU

Thank you 😄

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report