POV-Ray : Newsgroups : povray.general : from quad to triangle ...? : from quad to triangle ...? Server Time
3 Aug 2024 02:19:29 EDT (-0400)
  from quad to triangle ...?  
From: ingo
Date: 25 May 2004 19:18:57
Message: <Xns94F5D63150A8seed7@news.povray.org>
While working on a mesh2 to *obj converter I ran into a problem. It 
seems that is important to the obj file and applications that use it how 
a quad is dividen in triangles. Or better, in what order the vertices 
should be specified, counteclockwise.

D     C
------
|   /|
|  / |
| /  |
|/   |
------
A     B

It wants <A,B,C>, <D,A,C>. Otherwise the normals get messed up, even if 
no normals are specified in the obj file. I only have to Poseray to test 
this and assume it works the right way.

Is there a consensus on how to specify quads>triangles in the CG world?

Is there a way to figure out from a list of face_indices and vertices in 
what way the faces are written?

For POV-Ray it doesn't seem to matter how the faces are arranged, as I 
noticed when writing the mesh macros. I there for no specific reason 
chose for <A,B,D><A,C,D>. This becomes a mess when converting to *obj :(


Ingo


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.