OGRE Wiki
Support and community documentation for Ogre3D
Ogre Forums
ogre3d.org
Log in
Username:
Password:
CapsLock is on.
Remember me (for 1 year)
Log in
Home
Tutorials
Tutorials Home
Basic Tutorials
Intermediate Tutorials
Mad Marx Tutorials
In Depth Tutorials
Older Tutorials
External Tutorials
Cookbook
Cookbook Home
CodeBank
Snippets
Experiences
Ogre Articles
Libraries
Libraries Home
Alternative Languages
Assembling A Toolset
Development Tools
OGRE Libraries
List of Libraries
Tools
Tools Home
DCC Tools
DCC Tutorials
DCC Articles
DCC Resources
Assembling a production pipeline
Development
Development Home
Roadmap
Building Ogre
Installing the Ogre SDK
Setting Up An Application
Ogre Wiki Tutorial Framework
Frequently Asked Questions
Google Summer Of Code
Help Requested
Ogre Core Articles
Community
Community Home
Projects Using Ogre
Recommended Reading
Contractors
Wiki
Immediate Wiki Tasklist
Wiki Ideas
Wiki Guidelines
Article Writing Guidelines
Wiki Styles
Wiki Page Tracker
Ogre Wiki Help
Ogre Wiki Help Overview
Help - Basic Syntax
Help - Images
Help - Pages and Structures
Help - Wiki Plugins
Toolbox
Freetags
Categories
List Pages
Structures
Trackers
Statistics
Rankings
List Galleries
Ogre Lexicon
Comments
History: ETM
View page
Source of version: 26
(current)
{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: [https://www.oddbeat.de/wiki/doku.php?id=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. {img src="https://www.oddbeat.de/wiki/lib/exe/fetch.php?media=etsm_demo.jpg"} {img src="https://www.oddbeat.de/wiki/lib/exe/fetch.php?media=etminimap.jpg"} {img src="https://www.oddbeat.de/wiki/lib/exe/fetch.php?media=etmv23.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)
Search by Tags
Search Wiki by Freetags
Latest Changes
IDE Eclipse
FMOD SoundManager
HDRlib
Building Ogre V2 with CMake
Ogre 2.1 FAQ
Minimal Ogre Collision
Artifex Terra
OpenMB
Advanced Mogre Framework
MogreSocks
...more
Search
Find
Advanced
Search Help
Online Users
105 online users