Vertex Winding order?

Software: Away3D 4.x

Stephen Hopkins, Sr. Member
Posted: 07 August 2011 03:45 AM   Total Posts: 110

What winding order(cc or ccw) does away3d use?

How do you specify the winding order in molehill (not in away3d, but if you were doing a standalone demo)?

I haven’t been able to find anything other than the as3 docs saying that you just need consistent order across your mesh.

 Signature 

http://www-scf.usc.edu/~shopkins

   

Avatar
Alexander Seifert, Moderator
Posted: 08 August 2011 09:08 AM   Total Posts: 129   [ # 1 ]

I’ve always been under the impression that Away3D was a left-handed 3D system, which employs the left-hand-rule and a clock-wise winding order. I’d also assume that Molehill does the same, as is Windows Direct3D tradition. On a Mac and/or OpenGL, Molehill could be using glFrontFace(GL_CW) to keep left-handedness consistent. That is, if it really is left-handed.

Is there a special use case that you need to set the winding order for? In most cases using vertex buffer objects, you simply fill the normal buffer so winding order is rendered irrelevant.

Cheers!
Alex

 Signature 
signature_image

http://www.deltastrike.org

   

Avatar
David Lenaerts, Administrator
Posted: 08 August 2011 09:28 AM   Total Posts: 80   [ # 2 ]

The Stage3D API lets you specify which faces should be culled:

context3D.setCulling(...) passing any value in Context3DTriangleFace. So depending on your windedness, you either pass FRONT or BACK. But yeah, you need to be consistent throughout.

   

Stephen Hopkins, Sr. Member
Posted: 08 August 2011 11:02 AM   Total Posts: 110   [ # 3 ]

I see, thanks for the replies. There isn’t some special case, I am just building some of my own meshes. I think you are right in that away3d, and molehill are clockwise winding order. If I use counterclockwise order, I need to do setCulling(FRONT) which seems weird to me. I was just hoping there was a way to use ccw order and setCulling(BACK).

 Signature 

http://www-scf.usc.edu/~shopkins

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X