Terrain LOD and get terrain height

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
Zoulz
Posts: 12
Joined: Fri Aug 19, 2005 11:07 am
Location: Sweden
Contact:

Terrain LOD and get terrain height

Post by Zoulz »

Is there some way to turn off the terrain LOD or at least make it not so noticable?

Also, i've noticed that getting the Y of the terrain with a ray collision seem to invoke some strange behavior sometimes. Most of the times it works fine. But on occations i've seen my character just walk of a hill out into mid air. And sometimes he sort of pops down into the ground for about 1 frame.

Can I get a interpolated Y value direct from the heightmap, instead of doing a ray collision?

:?:
Fred

Post by Fred »

Do you mean the terrain popping that occurs? This isn't so obvious if you reduce the camera speed to something more realistic. Without the LOD, I don't think you would be able to display the terrain without reducing your PC to a crawl or a dead stop.

The ray intersection code appears to be buggy, although this hasn't been recognised by Niko or anyone working on it. Getting the height from the heightmap wouldn't work as the terrain is scaled. You could just fix the code. :D
Foole
Posts: 87
Joined: Mon Aug 29, 2005 10:08 am

Post by Foole »

Perhaps playing with CTerrainSceneNode::overrideLODDistance could help?
Post Reply