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.
Last edited by JellyDude on Wed Dec 12, 2007 8:47 am, edited 1 time in total.
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).
Yes, this works "visually correct", but will have some problems with tiling and collision handling. So I can only recommend 129x129 (or 65x65, 33x33, ...).
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! (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?
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.
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.