The answer to 100% working terrain ??

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.
Xaron
Posts: 310
Joined: Sun Oct 16, 2005 7:39 am
Location: Germany
Contact:

Post by Xaron »

There is no physics engine fix. I just use the Newton Engine to do all the collision things for me. Therefor you have to include this physics engine into your project. Start a search with "Newton and Terrain" on this board - you might find some useful threads. I've posted a code how to get the terrain into the newton physics engine.

The 32bit patch is a patch which will set all 16 bit indices in Irrlicht to 32 bit. I use a modified Irrlicht 1.0 version. You can get this patch here:
http://parsys.informatik.uni-oldenburg. ... 2bit.patch

This is the index to the patch page for 1.0:
http://parsys.informatik.uni-oldenburg. ... x_1_0.html

BUT: This patch does only work for Irrlicht 1.0!!!

That's all so far, let me know if you have further questions. ;)

Regards - Xaron
trooper
Posts: 85
Joined: Fri Nov 03, 2006 7:34 pm
Location: Maryland, USA
Contact:

Post by trooper »

Hi Xaron,

As per my original post, I am trying to highlight issues for noobies.

Who either, can't or don't wish to patch, hack, and recompile the engine.

Hence 32bit patches are out, unless someone wishes to share a patched engine.

Also I see irrSpintz fixes this problem, but again, only if you have the knowledge and the means to compile it.

Again not all noobies can, plus it also requires a newer version of visual studio to compile.

You say the physics engine is not a fix.

Although I would agree most games need some kind of physics, it still seems to be true that, irrlicht has a major bug with terrain and collison.

So it seems, the only 'FIX' for this, is to go with a physics engine.

Unless anyone out there, as the post says, has a 100% fix for terrains and irrlicht.
You scratch my back, I'll scratch yours.
gfxstyler
Posts: 222
Joined: Tue Apr 18, 2006 11:47 pm

Post by gfxstyler »

i told you how to prevent to get stuck/fall through the terrain ...
trooper
Posts: 85
Joined: Fri Nov 03, 2006 7:34 pm
Location: Maryland, USA
Contact:

Post by trooper »

gfxstyler wrote:what's so hard about terrain?

terrain heightmap size: irrlicht cant handle more than 65535 vertices with the same mesh because it uses unsigned 16bit indexes, and each pixel on the image of the heightmap is a vertex. this limits the heightmap to a max of 256x256.

you need 256+1x256+1 though, so your max heightmap size is 257x257.

This is my point, as per the subject of the thread !!

Read any one of a 100 posts on the topic of terrains, and no one can give a firm answer.

I don't claim to be an expert, but most people would disagree with your statement, and that 257x257 terrains don't work.

It appears the maximun 'working' heightmap is 129x129.
gfxstyler wrote: oh, and i use 129x129 heightmaps and scale them. if you use good textures it wont look crappy, no need for 2049x2049 terrains (irrlicht can't handle them anyway, even with 32bit patch, because it's too slow)

so the short answer is: dont use heightmaps bigger than 129x129, dont scale it up too much (use smaller player meshes/objects/whatever) and use proper textures.

and @ hybrid: i think it depends on how big he scales the terrain. if you scale it up high, LOD will be culling away a lot of vertices, so it should (theoretically) work without render problems (with 257x257).

Although I may agree to some extent on the limitations of the engine, and that physics may be a cure for falling through terrain, the point of the thread was to provide an answer for everyone, on issues with terrains.

I don't wish to knock your knowledge or ability, and you have made no statement on your knowledge of terrains, or even the use of them, other than maybe trying the terrain demo for 2 minutes, like everyone else, who wishes to voice a firm opinion on terrains.

But the bottom line is, terrains in irrlicht are flawed, and I simply wish some one to share firm answers on known issues or limitations, possible 'working' demos.

I'm sure this will spark many opinions, but I'm sure this will help many people.
Being a noobie, does not mean being an idiot. Many people here are experienced programmers, or just new to the realm of gaming, or even this is their first attempt at using terrains.

We should all be able to team together to make this an easier topic for Everyone !!

Cheers :wink:
You scratch my back, I'll scratch yours.
Post Reply