Heightmap - Which area is visible for camera?

Hi!

I have a heightmap and a camera which can zoom and scroll over it. (Like in Warcraft III or Ragnarök Online, if you know)

Now I like to know the area which is visible to the camera. Would be good to know because I wouldn’t have to draw the other parts of the heightmaps (and trees, …)

Thx 4 every help

For a start you can get rid of everything behind the camera…

You only need to draw what is in your viewing frustum, which is determined by:
your camera position, which way it is facing, it’s field-of-view, and the near and far clipping planes,etc…

Do a google search for view frustum clipping.

Happy coding

quadtrees and octrees are also something you may look into.

[This message has been edited by starboarder2001 (edited 10-11-2003).]

For this kind of work, you have frustum culling… I have a question though… Are doing brute force on your heightmap, or you are using roam or something of that nature?

The reason is because you must be able to cull different portion of your space…

As someone suggested, quadtrees and octrees… What these two big words do is simply partition space into managable portion that allow for quickly deciding who is in your camera and who is not…

In my terrain engine I use sphere culling… It is very simple and does not require much mathematics are compared to many popular culling methods…

But then again, we fall back to what it is you are using to partition your space, if you are at all…

Miguel

Originally posted by ProfEich:
[b]Hi!

I have a heightmap and a camera which can zoom and scroll over it. (Like in Warcraft III or Ragnarök Online, if you know)

Now I like to know the area which is visible to the camera. Would be good to know because I wouldn’t have to draw the other parts of the heightmaps (and trees, …)

Thx 4 every help [/b]