#### Archived

This topic is now archived and is closed to further replies.

# Quad or triangle based rendering

This topic is 6099 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I''ve got this old terrain engine that renders everything in quads (based on the Cutting Edge 3D with C++ book). Most engines uses triangles to render everything so I tried to alter my engine down to three points. Apparently that will not work unless I rewrite the graphics pipeline and restructure the polygon structure. Should I even bother? It''s used for a terrain engine if that matters.

##### Share on other sites
Well, it depends on how well you engine works, and how much time you''re willing to spend on it. http://www.gvu.gatech.edu/people/peter.lindstrom/papers/visualization2001a/ is an article I''ve been reading (but not fully understanding yet) that renders terrain as triangles (one huge tri strip, so it should be very fast), and removes pretty much everything outside the view frustrum, and simplifies what''s inside (with variable detail). It looks like a great method of doing it to me, so I plan to try it out as soon as I can figure out how^^

-Deku-chan

DK Art (my site, which has little programming-related stuff on it, but you should go anyway^_^)

##### Share on other sites
This depends entirely on how your quads are structured. Since the quads share the same vertices as the triangles, i might be trivial to render the triangles. Similarly, if your quad vertices are out of order to become triangles, it may be difficult to convert. However, if you do not want to rearrange your vertex order, consider just adding an index buffer to reference the vertices in proper order.

##### Share on other sites
Some video driver versions have a "bug" when rendering QUADS that do not have all 4 verteces on the same plane because they assume that a QUAD is a true quadrilateral when backface culling is enabled. The result is that the surface normal is calculated for 1 of the 2 triangles that makes up the quad, and both triangles are culled if the dot product between that and the view vector is negative; eg, if one triangle should be culled, it assumes both should be. If both triangles are not in the same plane, though, then often one will need to be culled but not the other. This means that, if you''re not rendering a true quadrilateral (that is, not all 3 verteces are on the same plane) then you shouldn''t use QUADS; you should use triangles in one of their many forms.

1. 1
2. 2
Rutin
24
3. 3
4. 4
JoeJ
18
5. 5

• 14
• 22
• 11
• 11
• 9
• ### Forum Statistics

• Total Topics
631766
• Total Posts
3002221
×