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

Started by
1 comment, last by thona 21 years, 4 months ago
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)
RegardsThomas TomiczekTHONA Consulting Ltd.(Microsoft MVP C#/.NET)
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.
Sirob Yes.» - status: Work-O-Rama.
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)
RegardsThomas TomiczekTHONA Consulting Ltd.(Microsoft MVP C#/.NET)

This topic is closed to new replies.

Advertisement