Skip to main content

History: ETM

Source of version: 22

Copy to clipboard
            {img src="img/wiki_up/MOGRE_Editable_Terrain_Manager_big.jpg" alt="thumb|Click to enlarge" imalign="right" width="316"}
{TRACKERLIST(trackerId=1, view=page, showlinks=n, max=-1, wiki="addons tpl") /}

!!Editable Terrain Manager
{maketoc}

I needed to write a map editor for a strategy game project and therefore needed the possibility to deform and texture terrain in real-time in response to user input. Unfortunately, Ogre's terrain scene manager does not possess any editing capabilities, and so I created a fork, the Editable Terrain Scene Manager. With version 2, I rewrote the interface, and it became the Editable Terrain Manager - that's right, it's no longer a custom scene manager, rather an addon library which simply manages terrain. You can use it with any other scene manager in theory, though in practice I'd recommend the Octree scene manager.

You can get the latest version here: [http://www.oddbeat.de/wiki/etm]

!!Overview
ETM is designed to be flexible, therefore there is no single terrain configuration file as you may be used from Ogre's TSM. Instead, you have to setup the terrain in code (unless, of course, you write your own config file loader).

ETM consists of two main components, the TerrainManager and the SplattingManager. The TerrainManager is the core of the library, it's in charge of creating and displaying terrain. For that purpose, you need to create a TerrainInfo object and pass it to TerrainManager's createTerrain function. The TerrainInfo object can be loaded from an Ogre::Image or from a raw data stream. It specifies the size and extents of the terrain. TerrainManager does not provide a standard material like Ogre's TSM does. You *always* need to provide TerrainManager with the material to use.
The SplattingManager, on the other hand, is more or less optional, but can be used to texture the terrain. Splatting is a technique where a couple of textures are rendered on top of each other based on alpha values in additional textures (which I call coverage or splatting maps). This allows for nice blends between different textures. What the SplattingManager does is manage those coverage maps and allow them to be edited in real-time. To actually make use of it, you need to use the coverage maps together with the splatting textures in a material which does the splatting.

Apart from the core components, there are a couple of convenience functions. The most notable is probably the one to create a lightmap with terrain shadows for your terrain. The calculation is pretty fast, it can definitely be used inside editors with real-time recalculation after deforms if your mapsize is moderate.

!!Features
* Manages and displays heightmapped terrain just like Ogre's ETM
* Allows real-time terrain deforming
* Supports loading and saving of terrain heightmaps in image or raw format
* Manages and edits coverage maps for texture splatting
* Supports loading and saving of coverage maps from/to images
* Lightning-fast lightmap generation function
* Base texture generation
* Terrain minimap creation function

!!Sample
The best way to learn how to use the Editable Terrain Manager library is to look at the sample provided with the sources. It contains basic editing and texturing functionality for terrain.

[https://www.oddbeat.de/wiki/lib/exe/detail.php?id=etm&media=etsm_demo.jpg]

!!Bindings for other languages
* MOGRE: ((MOGRE Editable Terrain Manager))
* Python-Ogre: Has an integrated wrapper in the latest release

!!See also
* ((Artifex Terra)) - Height map editor and painter for terrain (based on Editable Terrain Manager)
        

History

Information Version
Wed 09 of Nov, 2022 14:17 GMT-0000 randomcode 26
Wed 09 of Nov, 2022 14:11 GMT-0000 randomcode 25
Wed 09 of Nov, 2022 14:10 GMT-0000 randomcode Fix Image 24
Sat 08 of Jan, 2022 00:16 GMT-0000 sercero 23
Sat 08 of Jan, 2022 00:15 GMT-0000 sercero 22
Sun 17 of Apr, 2011 23:30 GMT-0000 Beauty added See Also section + link 21
Thu 16 of Sep, 2010 13:23 GMT-0000 Beauty added screenshot 20
Tue 08 of Dec, 2009 12:28 GMT-0000 JacobM [approved by jacmoe] 19
Tue 08 of Dec, 2009 09:37 GMT-0000 jacmoe 18
Tue 08 of Dec, 2009 09:35 GMT-0000 jacmoe 17
Tue 08 of Dec, 2009 09:34 GMT-0000 jacmoe 16
Tue 08 of Dec, 2009 09:33 GMT-0000 jacmoe 15
Tue 08 of Dec, 2009 09:32 GMT-0000 jacmoe 14
Tue 08 of Dec, 2009 09:31 GMT-0000 jacmoe 13
Tue 08 of Dec, 2009 09:30 GMT-0000 jacmoe 12
Tue 08 of Dec, 2009 09:29 GMT-0000 jacmoe 11
Tue 08 of Dec, 2009 09:28 GMT-0000 jacmoe 10
Tue 08 of Dec, 2009 01:39 GMT-0000 jacmoe 9
Tue 08 of Dec, 2009 01:39 GMT-0000 jacmoe 8
Tue 08 of Dec, 2009 01:38 GMT-0000 jacmoe 7
Tue 08 of Dec, 2009 01:37 GMT-0000 jacmoe 6
Tue 08 of Dec, 2009 01:36 GMT-0000 jacmoe 5
Tue 08 of Dec, 2009 01:33 GMT-0000 jacmoe 4
Tue 08 of Dec, 2009 01:10 GMT-0000 jacmoe 3
Mon 07 of Dec, 2009 20:43 GMT-0000 jacmoe 2