Terrain Jiggle

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
Terrachild
Posts: 21
Joined: Sun Sep 03, 2006 5:58 am

Terrain Jiggle

Post by Terrachild »

I'm sure this has been asked, but I've searched around and can't find an answer.

I've run the terrain demo example and I can't figure out a way to make the terrain stop jiggling, altering its shape, as you move the camera.

Is it possible to make the terrain look fixed no matter what the camera is doing?

Thanks,

Terrachild
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

if you add a terrain with addTerrainSceneNode there is a parameter called maxLOD...
It's default is 5 just change it to 0... ;)
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Terrachild
Posts: 21
Joined: Sun Sep 03, 2006 5:58 am

Terrain

Post by Terrachild »

I don't see where to set that paramater.

I'm using .net, and here is what I tried per your suggestion:

Private terrain As ITerrainSceneNode

terrain = smgr.AddTerrainSceneNode(path + "terrain-heightmap.bmp", Nothing, -1, New Vector3D, New Vector3D(40, 4.4F, 40), New Color(255, 255, 255, 255))

terrain.OverrideLODDistance(5, 0)

This didn't help.

That's the only paramater that looks close to what you said. Is there something I'm missing.

Thanks
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

Sorry, but I don't know much about Irrlicht and .net... :cry:
You should always mention that you're using .net, because there are significant differences to the "normal" sdk !!! ;)

It seems to me too this function is the right one, but I'm not sure...
Perhaps the default LOD is not 5 in .net ???
Maybe try to override some other values than 5 ???
Otherwise I don't know, sorry... ;)

There is also a seperate forum for .net, maybe there you'll find some answers ???

EDIT: maybe this thread can help you: http://irrlicht.sourceforge.net/phpBB2/ ... errain+lod
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Terrachild
Posts: 21
Joined: Sun Sep 03, 2006 5:58 am

still see problems

Post by Terrachild »

Well, I don't think .Net is the problem.
I tried that thread, but still couldn't get it to stop warping.
Has anybody run the terrain example without the terrain warping, if so could you send me the code to do so? So I could see that it's possible.

I'll run it in C++, anything just to see the example run correctly.

I'm not sure if this is an Irrlicht issue. The terrain tutorial example really should work right shouldn't it?

Thanks
vibe3d
Posts: 1
Joined: Tue Sep 25, 2007 6:47 am

Post by vibe3d »

what you are seeing is the famous popping effect. The irrlicht terrain scene node will just blindly change LOD at a certain distance. What it really needs is either (or both) screen space pixel method (this is clearly described in the original GMM paper) or geomorphing (GPU based).

Just some history on the irrlict terrain scene node. It was actually completely based on soconne's (author of Freeworld3D) early GMM terrain SDK, although no credit has been given to him at all (i don't think he really would give a sh!t anyway). Soconne's version appeared to be inspired by Trent Polack's book, "focus on 3d terrain programming".

Anyway if u have a copy of Far Cry hanging about you will see it is very very similar to soconne implementation (it too is based on GMM), they mostly hide the popping effect with tree's :wink: .

If you can be bothered looking through the source code of Ogre, it has a really nice implementation of GMM in it, screen space pixel, geomorphing etc.

oops getting side tracked here .... changing the max LOD to 0 is a really bad idea, you are forcing the entire terrain to be rendered at at the highest level of detail possible!! ...if you do this method it would actually render faster if u implemented a proper brute force terrain method.

GMM = Geometrical MipMapping
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

One easy solution is to alter the distance checking algorithm in CTerrainSceneNode.cpp and find your own balance between look and performance. Doubling the distance looks a lot better, but probably won't be default until we have vertex buffers
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
Terrachild
Posts: 21
Joined: Sun Sep 03, 2006 5:58 am

Dare I mention it

Post by Terrachild »

I didn't want to say this, because after that enless firestorm created by comparing Irrlicht to Ogre, I'm hesitant to bring the topic up. Reminds me a little of IBM PC vs. Apple computer.

But I'll brave the topic: The Ogre terrain demo looks so fantastic compared to Irrlicht.

I like how easy it is to set up Irrlicht vs. Ogre, but seriously, shouldn't we Irrlicht users come up with some better demos?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

If somone prohibits you to make such a demo you should publicly announce it here so we can stop him. But otherwise just go ahead and do it.
You can also create new effects or implement new algorithms. It's definitely possible. But you should also look at existing code which might make what you're expecting. Arras Terrain tiling node is a good example.
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

I think the terrain should also be redone !!!
Alone the fact that the terrain is build upside down (mirrored in Z axis) forces this... ;)
And it should be possible to use larger height maps... ;)
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Post Reply