Quads Of Tris for Own Map?

Started by
5 comments, last by Metus 21 years, 5 months ago
I''ve been designing a map format for a couple of hours now and bumped into a problem.. what kind of primitives should i use for the map, tris or quads?
Ethereal
Advertisement
3D cards generally support triangles. For better performance you''d store triangle strips, but if you''re just starting I''d just use triangles.

It''s better to just get it working before you get it working fast.

Helpful links:
How To Ask Questions The Smart Way | Google can help with your question | Search MSDN for help with standard C or Windows functions
As [siaspete] said, you can only use tris to render in 3D.
But for a map you can simulate quads (a squad is the same as two tris.).
What is the best ? quads or tris ? I cannot say, it depends of what you want to do with it...
you could use trianglefans

i have written a .map file compiler for worldcraft
this compilers sorts the vertices so i can render them as trianglefans if it only has 3 vertices per polygon
quads for 4 coplanar vertices and the rest can be rendered as a trianglefan

i get very good performances
http://www.8ung.at/basiror/theironcross.html
The problem with fans is that you can''t create degenerates to skip around the world.

You''d be using a fan for each polygon, which means you have to split your map into loads of fans, which means loads of rendering calls, which leads to reduced performance.

If you use strips you can draw your map with fewer rendering calls. Basically one strip per texture/shader.

Helpful links:
How To Ask Questions The Smart Way | Google can help with your question | Search MSDN for help with standard C or Windows functions
well you can use strips for terrain rendering but as soon as you have some buildings in it you need to use fans cause fans are the easiest way to draw complex building geometry
http://www.8ung.at/basiror/theironcross.html
I''m not so sure about that.

Helpful links:
How To Ask Questions The Smart Way | Google can help with your question | Search MSDN for help with standard C or Windows functions

This topic is closed to new replies.

Advertisement