heightmaps with trianglestrips?

Started by
2 comments, last by Metus 20 years, 6 months ago
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?
Ethereal
Advertisement
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.
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

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
Ethereal

This topic is closed to new replies.

Advertisement