Archived

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

Aargyle

Heightmaps and polygons

Recommended Posts

I have a problem, which never occured to me until I tried to do it Using a simple 256x256 size heightmap for the ground in my scene results in 65536 quads or 131072 triangles to be rendered! Considering that an ''expensive'' character model is 1500 triangles, how on earth does anyone use heightmaps? If I make it big enough so that only some of them get drawn due to octree culling, the ground ends up looking like its from a supernintendo game. Any thoughts? I see games all the time with amazingly detailed landscape... makes me think they are using 1024x1024 heightmaps at least, but thats 2,097,152 triangles

Share this post


Link to post
Share on other sites
for a small heightmap suck as 256x256, triangle stripping / vertex buffering is usually enough to get good fps.

Larger heightmaps use some form of CLOD technique such as ROAM or geomipmapping to reduce teh triangle count.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I think the problem is, that you are trying to do the height map pixel by pixel. It might be pretty, but as you point out it is not feasible. What you need to do is sample only a certain amount of pixels. For example use every 25.6th pixel (256 / 10), this way you will result with a 10 x 10 matrix. Which is only about 100 quads. If you you would like a higher resolution landscape just increase the divisions, ie. every 2.56th (256 / 100) pixel resulting in a 100 x 100 matrix. This way you can scale your landscape to improve perfomance or graphics quality (ala Unreal Tournament 2003).

Share this post


Link to post
Share on other sites
quote:
Original post by Aargyle
I have a problem, which never occured to me until I tried to do it

Using a simple 256x256 size heightmap for the ground in my scene results in 65536 quads or 131072 triangles to be rendered! Considering that an ''expensive'' character model is 1500 triangles, how on earth does anyone use heightmaps? If I make it big enough so that only some of them get drawn due to octree culling, the ground ends up looking like its from a supernintendo game.

Any thoughts? I see games all the time with amazingly detailed landscape... makes me think they are using 1024x1024 heightmaps at least, but thats 2,097,152 triangles


Of course there is no game or land renderer in general that send the height map as it is; they use a max of 2000 - 5000 triangles (no more). How is it possible?
They reduce the level of detail in the region of the mesh that are distant from the viewer...

Rendering an height map is one of the most difficult task...fortunately there are tons of demos and articles!

Simply go to google and type terrain+lod -> SEARCH

Share this post


Link to post
Share on other sites
New question

On heightmaps which are dynamically changing, like in ROAM or some other tesselation scheme, does this mean you have to recompute the normals for each vertex all the time? It seems like that alone would kill the speed...

Share this post


Link to post
Share on other sites
quote:
Original post by Aargyle
New question

On heightmaps which are dynamically changing, like in ROAM or some other tesselation scheme, does this mean you have to recompute the normals for each vertex all the time? It seems like that alone would kill the speed...


I think that if you need normals you have not to recompute them because you discard vertices not create new ones (but you need to apply geomorphing to vertices and normals!).
In land rendering however normals are not usual...in most case is sufficient to blend light (precalculed) and color in a single big texture and use multitexture for datails.

Share this post


Link to post
Share on other sites
This is one of the best examples ever seen!

http://chat.carleton.ca/~eszoka/tstriplod/tstrip.htm

In particular the demo precompute shadows for the terrain-texture...

[edited by - blizzard999 on May 1, 2003 5:42:37 PM]

Share this post


Link to post
Share on other sites
Wow so the standard way to handle lighting and terrain is to turn off lighting when you draw the terrain? Who knew

That seems a little weird though, I remember firing a rocket in quake II and the ground underneath it lighting up. And that is really an effect I''d like to have! Mwhaha

Share this post


Link to post
Share on other sites
quote:
Original post by Aargyle
Wow so the standard way to handle lighting and terrain is to turn off lighting when you draw the terrain? Who knew

That seems a little weird though, I remember firing a rocket in quake II and the ground underneath it lighting up. And that is really an effect I''d like to have! Mwhaha


One thing is to light 10-20 polygons near the rocket/viewer...another is to light 2000 polys!!! And the result is not good as the precomputed method (read ''shadows'').
And the result in the ''T strip lod'' demo is very realistic and incredibly fast !!!

Of course (if you are not using nukes) you have not to light an entire world but only few vertices!!!

Share this post


Link to post
Share on other sites