Terrain visualisation with a large map

Started by
4 comments, last by robotech_er 12 years, 8 months ago
Hi every one,
In order to visualize a large terrain, I use a height map with 16385 x 16385 pixel. To reduce the computation time I proceed as follow :

1. I read the map and save all the Y value in a array of 16385 x 16385 size
2. I use a recursive function to divide the terrain using quadtree concept and save only vertices which are visible using frustum culling test
3. I want to implement the CLOD (not yet achieved)

My problem is the recursive function is a time consuming, so is there any method (may be cutting the map) to solve my problem unsure.gif

I would be gratefull for any help
Thanks in advance
[color="#aab2b8"]
Advertisement
I'd recommend looking up geometry clipmaps.



I'd recommend looking up geometry clipmaps.



But the clipmaps is dynamic texture representation and it used GPU in rendring phase while I just use a CPU (opengl and Visual C++)
Is there an other method please help me


Why cant your use the GPU in OpenGL?
Wisdom is knowing when to shut up, so try it.
--Game Development http://nolimitsdesigns.com: Reliable UDP library, Threading library, Math Library, UI Library. Take a look, its all free.

[quote name='Syranide' timestamp='1311863661' post='4841605']
I'd recommend looking up geometry clipmaps.



But the clipmaps is dynamic texture representation and it used GPU in rendring phase while I just use a CPU (opengl and Visual C++)
Is there an other method please help me



[/quote]

I don't see why you couldn't switch to a GPU approach? Geometry clipmaps really is by far the best solution to huge heightmap terrains as far as I know... and they're not even particularily hard to implement. Most of the CPU-bound algorithms that exists are to my knowledge pretty much remnants of the early days of low resolution terrains and the GPUs being heavily underpowered and lacking essential features. These algorithms often don't even scale that well to high resolution terrains as the cost sky rockets when you double the resolution, consuming bandwidth, etc, etc.

Geometry clipmaps provide consistent high resolution and long view distances cheaply and with ease, minimal cpu usage (updating the heightmap textures). I did some project with this some time ago and my GTX280 managed to squeeze out 3000 FPS with a resolution of 128 (read: acceptable quality). Or 110 FPS with a resolution of 1024 (read: insane quality!), 16k units view distance (read: 16km if 1 unit = 1 meter). And it was heavily vertex throughput limited so you could throw huge amounts of sparkly pixel shaders on there too if you'd like. I assure you, you won't come close to that working on the CPU, in terms of performance and quality. Everything can also be streamed easily, the memory consumption is VERY LOW (0.3mb for 128, and 13mb for 1024... texture memory, with 16-bit precision).


Of course it's your choice, but if you still insist on going the same route... then I don't understand your questions... from what I can tell, in #2 you're trying to implement some custom algorithm... and then in #3 you're talking about using some unspecified CLOD algorithm, wouldn't that render #2 useless?

I don't really get why you are performing frustum culling tests in #2 as your are dividing up the world into different quadtree nodes? Are you recomputing all the nodes every frame or something? If so, you would be far better off just storing them as-is in the quadtree, there is often very little to gain from culling individual terrain vertices (especially with all modern GPUs).


www.vterrain.org
Surely all the lod tec can be implemented on cpu.

This topic is closed to new replies.

Advertisement