DGL
https://delphigl.com/forum/

quad to 2 triangles how?
https://delphigl.com/forum/viewtopic.php?f=19&t=7177
Seite 1 von 1

Autor:  noeska [ Fr Jan 04, 2008 19:23 ]
Betreff des Beitrags:  quad to 2 triangles how?

i have a quad that consist of 4 vertexes and 4 indices (making up the face) e.g. 1,2,3,4
i want to have 2 triangles. Would i order the indices then as 1,2,3 and 3,2,4 ?
the resulting mesh still has holes.

Autor:  TAK2004 [ Fr Jan 04, 2008 19:32 ]
Betreff des Beitrags: 

2-3
|/|
1-4

1,2,3,3,4,1

Autor:  Lord Horazont [ Fr Jan 04, 2008 19:32 ]
Betreff des Beitrags: 

I would use 1,2,3 and 1,3,4 instead, see uploaded image.

greetz Lord Horazont

Dateianhänge:
quad2triangles.png
quad2triangles.png [ 3.96 KiB | 3743-mal betrachtet ]

Autor:  noeska [ Fr Jan 04, 2008 20:21 ]
Betreff des Beitrags: 

Thanks.

But what horror i ended up using
4,2,1 and 3,2,4

Should i look up the vertex values to determine winding of the face?

Autor:  Lord Horazont [ Fr Jan 04, 2008 20:42 ]
Betreff des Beitrags: 

Normally, if you have the original vertex data available in the order you would need it to draw the quad directly, you should be able to reuse them without changing anything. (or did I missunderstood your question?)

greetz Lord Horazont

Autor:  noeska [ Fr Jan 04, 2008 22:57 ]
Betreff des Beitrags: 

I am trying to read in .obj files from the dynamic ambient occlusion demo from the nvidia site. Appearantly the vertexes are ordered correctly for usage with quads but not optimized for usage with triangles. I better get hold of some more obj files.

Seite 1 von 1 Alle Zeiten sind UTC + 1 Stunde
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/