The Editable Terrain Manager is an addon library for OGRE which manages and displays terrain based on heightmap data. It can be used as a replacement for the Terrain Scene Manager, but its main advantage is the edit possibility for the terrain: You can deform and set the terrain heights in real time, as you would need to if you are developing an editor application.
In addition, the library also has means to support editable splatting, probably the current standard for detailed terrain texturing.
All of the parts have been designed to be as flexible as possible and do not even depend upon each other. That means you don't need to use splatting if you don't want to - or you can use that part with a different terrain renderer. Unlike OGRE's TSM, it's not a scene manager, either, so you could (in theory) choose whatever scene manager you like. All its headers are light-weight, using the PIMPL idiom to hide costly implementation details.
This is what it offers:
- Terrain deforming - Just like the PLSM you can deform terrain as well as retrieve and set height values at arbitrary positions. You can save your work at any time, the ETM provides convenience functions to save and load terrain in raw file format as well as any image format provided by Ogre using 1 to 4 bytes per pixel. But you can just as well write your own load/save code, it's not much of a challenge
- Terrain texturing - The terrain material is completely your responsibility, so you can do whatever you want. The ETM provides a SplattingManager class which you can use to do editable texture splatting, but it's really up to you.
- More flexible terrain sizes - ETM does not provide paging, but its restraints on valid terrain sizes are a lot less restrictive than those of the TSM. Rectangular terrain is just fine. The tile size must still be 2^n+1, but the terrain size can be anything that fits A * (tilesize-1) + 1 x B * (tilesize-1) + 1.
- Lightmap calculation - You can tell the ETM to calculate a lightmap including terrain shadows. The lightmaps may not be the prettiest ever to have been generated, but the algorithm is pretty fast. In my map editor which uses terrain sizes of up to 256x256 I do a recalculation of the lightmap after every completed editing step with no noticable time cost.
The size of the lightmap is completely up to you, although the larger the lightmap, the longer the calculation will need.
- Base texture generation - You can "bake" your splatting layout into a single texture. This texture could be used as an alternative to dynamic splatting on older hardware or as a base texture at distance, so that splatting only takes place close to the camera.
- Minimaps - A simple helper function can combine a lightmap and a base texture to a new image which can be used as a minimap of the terrain.
The current version can be found and downloaded at our website: http://www.oddbeat.de/wiki/etm
The source code is released under the terms of the GPLv2 with runtime exception, i. e. you can use it for whatever you like, only if you change the library itself, then you must release those changes.
Wiki page: http://www.ogre3d.org/wiki/index.php/ETM