Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 3d engine: ordering of faces
Index -> General Programming
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Sharkbait




PostPosted: Mon May 11, 2009 9:14 am   Post subject: 3d engine: ordering of faces

currently i'm sorting the faces based on thier max and min values and with some success. Unfortunately when i'm rotating things I often end up with faces out of order (mostly the triangular parts). Is there another way to sort the faces so that i can avoid this problem?
Sponsor
Sponsor
Sponsor
sponsor
DemonWasp




PostPosted: Mon May 11, 2009 9:37 am   Post subject: RE:3d engine: ordering of faces

1. Make sure you're back-culling faces so that you can skip extra work in the sorting phase. Basically, this means "eliminate any faces that are pointed the other way". This improves the ordering of faces because anything pointed away from the camera will not be rendered, so faces won't poke through the "back" of thin objects.

2. You could order by average distance of the points from the camera. This works well excepting when you have long polygons that extend from near the camera to further away.
Display posts from previous:   
   Index -> General Programming
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: