Archived

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

Metus

heightmaps with trianglestrips?

Recommended Posts

Metus    168
let''s say i''m to render a 1024 * 1024 heightmap landscape using vertexbuffers and indexbuffers. what would the inrease of speed be if i rendered my landscape using trianglestrips instead of trianglefan? would it be noticeablw or should i forget the whole thing?

Share this post


Link to post
Share on other sites
Ataru    133
It will be noticeable if you render the entire terrain as one large triangle strip. The problem is that when you do one strip across, you have to go up to the second row. To do this, use degenerate triangles.

http://www.gamedev.net/reference/articles/article1871.asp

this will show you how. If you add cLOD to this then it should be real fast.

Share this post


Link to post
Share on other sites
Muhammad Haggag    1358
No one renders a 1024x1024 heightmap in one call - of course you''d do that in the beginning, but later you''ll add visibility determination, and most probably some LOD algorithm. With those, often you''ll have your terrain divided into "patches" or "nodes", each of which can be rendered as an indexed tri strip.

The best way to test the speed difference, would be to setup your engine for doing both types of rendering, and switch between them and see for yourself. The point is: There''s a limit to the number of degenerates you add, if you cross it, performance gets worse.

Muhammad Haggag
MHaggag''s corner

Share this post


Link to post
Share on other sites
Metus    168
yes i know, i''ve created a different set of vertex buffers (enough to split the terrain into 256 * 256 polys) and i''m using the index buffer and planning to use frustum culling to determine wich of the vb''s to draw

Share this post


Link to post
Share on other sites