Archived

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

Metus

Quads Of Tris for Own Map?

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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...

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites