#### Archived

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

# triangle or polygon?

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

## Recommended Posts

How do you define a "face" in your scene or terrain? face = triangle (3 indices/face) or polygon (>=3 indices/face)? Which one is better (faster fit to render pipeline, faster collision detection, etc.)?

##### Share on other sites
A face can be any sort of polygon.

Triangles are the fastest on common consumer hardware.

------------
- outRider -

##### Share on other sites
Yup same here, always face=triangle.

Its the most hardware friendly (i.e. most hardware only supports triangles). Almost all systems which allow non triangular polygons convert them to triangles at some stage.

The constraints etc make lots of the maths simpler.

The biggest VERY useful constraint I can think of is that a 3D triangle will never be concave or "twisted", it always lies in a plane. Concave stuff causes lots of "issues" for many things. The core of most collision is often a "something to plane" check. Backface culling based on winding order relies on a plane or "outness" to work properly etc...

--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com

##### Share on other sites
Yes, that is what I think too.

I asked this question because I just studied the Quake3 .bsp file format from gametutorials.com. The file defined a face as a polygon, and the tutorial sample code call glDrawArrays using triangle fans for every single non-culled face in render time.

So, I wonder isn''t it better to store a face as a triangle, so that it''s possible to group many faces and render by one call - using triangle lists.

1. 1
Rutin
45
2. 2
3. 3
4. 4
5. 5
JoeJ
19

• 11
• 13
• 10
• 12
• 10
• ### Forum Statistics

• Total Topics
633001
• Total Posts
3009821
• ### Who's Online (See full list)

There are no registered users currently online

×