Retrieving heigh at higher lod level.

Crashy

03-12-2005 16:35:23

Hello, I don't remember if I alread asked that, but is there a way to get the real height of all the terrain and at Higher lod level.

I want to place objects without seeing them flying. Dynamic objects like character are behaving well, because they're taking lod modifications, but static objects batched into static geometrys are not precisely placed.

I tried to load , before loading object , the terrain with a special cfg file(with things like MaxPixElerror=0, every pages loaded, etc...) to try to get the higher lod, place the objects, and then load terrain with better performance options, but, if result is better, I still have flying objects.

Thx for any help.

tuan kuranes

03-12-2005 18:18:22

I can add a new Flag to query, but if you don't use MaxPixElerror=0, you may have sometimes tiles under cam not at higher lod.

Solution I can give is a TileLod Change Event.

Crashy

03-12-2005 18:26:24

Solution I can give is a TileLod Change Event.

Possible, but adapted only if I load/unload objects per Tile.
I would like to place objects only at the first loading of the level.(after that, I may load/unload them if they are visible or not).

->With camera position at the center of the world, get the right y position for the whole terrain, and not only the tiles closes to the Camera. For this part, set maxPixelError to 0 is not a problem.

tuan kuranes

03-12-2005 19:01:14

Tile under cam is not always at max LOD (only if user run terrains always at maxpixelerror=0). so you'll still get object floating with this solution.

I'm afraid that tile load may be the only solution.

You can make a preload of object per page, and then a hieght postionning pass per tile.

Crashy

03-12-2005 19:56:28

So it's really impossible to have a terrain with no lod at all? :cry:

the methods "getInterpolatedWorldHeight" quoted in this topics couldn't handle this?

http://www.ogre3d.org/phpBB2addons/viewtopic.php?t=231

tuan kuranes

05-12-2005 09:33:15

if you use the RSQ_Height_no_interpolation you won't get Any LOD, but no interpolation between triangle points either.

As said before, I can add a getInterpolatedWorldHeight without LOD, but results won't be good, as you'll get "floating objects".

Crashy

05-12-2005 12:28:54

Ok, I think I've found a solution: I calculate height my object on a 10 times higher terrain. Then, I place my object at pos.y/10 , and then load the final terrain.

The result is that height difference between lod height and normal height is 10times little->ojbects are no more floating.