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: 

Wrong Vertex winding and normal sign

0 REPLIES 0
Reply
Message 1 of 1
fastandhappy
388 Views, 0 Replies

Wrong Vertex winding and normal sign

I am reading my vertices,normals and indices from fbx files which are exported by maya and 3dsmax. When I apply the transformation, all the objects are in their correct position even the animations work fine. However at some meshes, normals are inverse and index orders are anti clockwise which I confirmed this by disabling culling. I realized that some objects had negative scaling, so I recursively calculated sign of the scale

//pesudo code
sc=1
do{

// I only use sign of x axis, as y and z always follow the same sign in my models.
sc=sc*node->localscaling(0) 

}while(node=node->parent)

if(sc<0)
mesh.rewind


for each object by also reaching to their parent's scaling and rewinded those produced negative scale and mirrored their normals around origin. While this worked for 1-2 objects, this time some of the correct objects looked wrong. So I guess I need another criteria to decide which objects/meshes to rewind.Any suggestions?

0 REPLIES 0

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

Post to forums  

Autodesk Design & Make Report