Problems with getHeight

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Veiter
Posts: 18
Joined: Sun Mar 11, 2007 6:24 pm

Problems with getHeight

Post by Veiter »

Hi,

i have problems with the terrain->getHeight()-function.

It only works correct with a LOD of 0. But i often smooth my terrain. How can i tell the function that it should work with LOD 3 or 4?

Thank you!

Kind regards
Veiter
Frosty Topaz
Posts: 107
Joined: Sat Nov 04, 2006 9:42 pm

Post by Frosty Topaz »

If you mean smoothing as in you set the smoothFactor parameter then you haven't effected the level of detail, just made it smoother. If you're forcing a lower LOD at close ranges, why?? It'd be easier and better to just use a larger scale with a smaller heightmap.

The only problem with the getHeight function right now (that I'm aware of) is that objects far from the camera (at lower LOD) may not be placed correctly on the rendered terrain because they will be at the exact height of the fully detailed terrain.

If you want you could manually do this by getting the current LOD of the patch containing the point you need the height of and get the appropriate mesh buffer for that patch and LOD. This will let you calculate it yourself. Alternately you could adapt the existing getHeight function to get the rendered height (with LOD), not the actual height (full LOD).
Frosty Topaz
=========
It isn't easy being ice-encrusted aluminum silicate fluoride hydroxide...
Veiter
Posts: 18
Joined: Sun Mar 11, 2007 6:24 pm

Post by Veiter »

Yes that works ... smaller heightmaps ... good idea

Thanks!
Post Reply