Hello,
I was playing with the terrain example and changed the height map to be a flat 1024x1024. It took quite a while to load, it did not render properly (it looked rectangular, not square, for the most part) and it brought the engine to its knees - down to about 9 FPS. 512X512 was no picknick either - 16 FPS and slooow. - Any suggestions?
Thank you.
Terrain Size
Well when you put 1024x1024 height map on a terrain it means that Engine must create 1024x1024 = 1048576 vertex mesh (more than Milioin!)
Its a little much for terrains ... but 9 fps for 1024x1024 ? ... its preety nice
256x256 height maps are looking preety well ... check the smoothing parameter if it looks rough for you.
Textured 256x256 height map + detail map gets 160-170 FPS for me.
If you really need/want to use so huge height map then try to play with LOD and Path size ... it can increase FPS a little but not so much. Set camera FarPlane also ... you don't need to render whole terrain all the time.
Its a little much for terrains ... but 9 fps for 1024x1024 ? ... its preety nice
256x256 height maps are looking preety well ... check the smoothing parameter if it looks rough for you.
Textured 256x256 height map + detail map gets 160-170 FPS for me.
If you really need/want to use so huge height map then try to play with LOD and Path size ... it can increase FPS a little but not so much. Set camera FarPlane also ... you don't need to render whole terrain all the time.
Hmm if you need just very huge terrain then you can set the Scale to 100.0f and use 256x256 height map with smoothing ... it will be preety big then but it loose some detail. If you're trying to make Smooth looking terrain like a grass and hills without any complex heights then this way seems to be best for you.
Other way for very detail and complex big terrains is to make a Custom node with couple child terrain nodes as sectors. You can still use 256x256 height map but you can use separate maps for each terrain sector which make it very very detail. Detail level here depends only on sector scale and how many sectors you use. To "not kill" your GPU check the camera position and set visible sectors to "visible" and hide the non visible.
This method is not quite good solution but works well with 50-60 FPS.
ps. All i posted here is for stock Irrlicht engine ... as Hybrid said using Arras tiled terrain node is a lot better and faster solution. It's easier to use also.
Other way for very detail and complex big terrains is to make a Custom node with couple child terrain nodes as sectors. You can still use 256x256 height map but you can use separate maps for each terrain sector which make it very very detail. Detail level here depends only on sector scale and how many sectors you use. To "not kill" your GPU check the camera position and set visible sectors to "visible" and hide the non visible.
This method is not quite good solution but works well with 50-60 FPS.
ps. All i posted here is for stock Irrlicht engine ... as Hybrid said using Arras tiled terrain node is a lot better and faster solution. It's easier to use also.
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
You can also use the terrain mesh (as opposed to the terrain scene node). It's available in the geometry creator. You will lose all the mentioned features of the terrain scene node, but you can stil use height maps. And with hw buffer support in Irrlicht 1.5 you should be able to use huge meshes without terrible performance impact. Or use terrain meshes from any 3d modelling tool, maybe in conjunction with octree optimization.