Terrain strip only

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
JellyDude
Posts: 9
Joined: Tue Dec 11, 2007 6:35 am
Location: Australia

Terrain strip only

Post by JellyDude »

Hi Guys,

I've created a gray-scale bitmap from a DTED (DEM) file and modified the Terrain Demo to read my bitmap instead of the default one. I created a texture from the DTED as well. The DTED is 1201x1201, however I downsized it to 1024x1024 thinking it might help. When I build and run the demo, all I get is a strip of the terrain, not the whole lot. I've turned on the debugDataVisible flag and the empty areas have bounding boxes displayed, and the collision detection is working as I walk over the terrain ... there's just no sign of the terrain/texture.

Screenshot attached (hopefully). Any info or help would be appreciated.

Image
Last edited by JellyDude on Wed Dec 12, 2007 8:47 am, edited 1 time in total.
hybrid
Admin
Posts: 14144
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

The terrain scene node only works for heightmaps sized 129x129. But you can use the addTerrainMesh function of the scene manager to generate larger terrains (without LOD, though).
JellyDude
Posts: 9
Joined: Tue Dec 11, 2007 6:35 am
Location: Australia

Post by JellyDude »

Hmm, the Demo loads terrain-heightmap.bmp which is 256x256.
hybrid
Admin
Posts: 14144
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Yes, this works "visually correct", but will have some problems with tiling and collision handling. So I can only recommend 129x129 (or 65x65, 33x33, ...).
oldskoolPunk
Posts: 199
Joined: Wed Nov 29, 2006 4:07 am

Post by oldskoolPunk »

I would also like to comment on this thread. I was having this exact same problem when this thread was started, and it solved my problem, too! :D (only a small strip was showing)

The reason I was trying a larger sized heightmap was because my terrain was "stair-stepped". I thought a larger heightmap image would solve this problem. JellyDude, do you have this problem also? How do we get our terrain to be smooth with such a small image file?
Signature? I ain't signin nuthin!
JellyDude
Posts: 9
Joined: Tue Dec 11, 2007 6:35 am
Location: Australia

Post by JellyDude »

The Smoothing parameter looks like it performs a simple convolution on the image ... increasing this value would smooth the image even more and remove the steps (eventually).

So what we need is a combination of the TerrainSceneNode (LOD) and the TerrainMesh (large). If I get time I'll look at creating a Node that implements the ROAM algorithm. Wish me luck.
hybrid
Admin
Posts: 14144
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Yeah, some new terrain techniques would be nice to have. The smoothing parameter defines the number of rounds that are applied. Each round takes the average of neighbouring vertices.
BTW: Since Irrlicht 1.5 will feature vertex buffers the tiled terrain managers will get some performance boost. You can define a large heightmap with these terrains. They are split across several tiles, with a tile based culling operation. Using static HW buffers should make those scene nodes pretty fast. And of course the simple terrain node is always available and will also become noticeably faster than before.
Post Reply