Jump to content
  • Advertisement

Archived

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

thona

Terrain Rendering - how to determine how FAR AWAY to render terrain?

This topic is 5796 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Ok, stupid question :-) I am working on a terrain renderer, and am making pretty nice progress. I basically have a tiled terrain, with every tile being 512x512 vertices (and loaded etc. from disc independently, as well as unloaded). Tiles are drawn as patches - which can get as small as 32x32 vertices, which is the 4th separation level on a quadtree :-) Works like a charm - I can hover high above the ground (ok, using a lot of memory - I will introduce smaller placeholder heightmaps soon for far away tiles) and when I drop down into the terrain, I get a lot of divisions and pretty good looking and nice terrain at the end. VERY nice. My main problem, though - currently I am rendering with a 5000 meter view frustrum. Thats perfect - and does not impose too much load. BUT - when going "low on altitude", my view horizon is WAY smaller. Basically so small that I can argue whether it makes any sense to render 5000 km away terrain at all (for example when in a jeep on the ground). OTOH I dont want to just change the frustum on these occasions. So, is there any way to basically dynamically adapt the view distance? Some occluder tech that could be useful on terrain (after all I have patches iwth a minimal height - not "random terrain"). I was thinking of using a mathematical function and basically adapt the view range depending on the height above ground - with 3 parameters (distance at 0, distance at heightmax and heightmax) and some interpolation logic I could basically have a curve that dynamically adjusts the view distance when you go higher. Anyone a better idea? Regards Thomas Tomiczek THONA Consulting Ltd. (Microsoft MVP C#/.NET)

Share this post


Link to post
Share on other sites
Advertisement
Sounds good, but theres a problem with adapting the distance -- if you have a high mountain at 4000m and you are reducing the view distance below 4000, that mountain wouldn''t show, even though it''s hight isn''t minimal.

Share this post


Link to post
Share on other sites
Really?

Tink about it - such a hich mountain would NOT go up vertically :-) With just a small slope, the individual 32x32m patches WOULD show if you are near.


Regards

Thomas Tomiczek
THONA Consulting Ltd.
(Microsoft MVP C#/.NET)

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!