thumb|Click to enlarge

About

Author: lilljohan
Project: MOGRE Editable Terrain Manager (MET)
License: zlib license
Wrapped project: Editable Terrain Manager
Wrapped project license: GPLv2 with runtime exception.
Type: C++/CLI -Wrapper
Dependencies: Ogre/Mogre 1.4.8/1.6.4
/METMForMogre1.6.4.rar|here]
Status: add status
Binaries and sources: www.tinyrocket.se/MET.zip
Binaries for Mogre 1.6.4: here
Current version: Add version number
Start Date: Jan-09-2008
Support: Forum topic


MOGRE Editable Terrain Manager (MET) is a C++/CLI wrapper for the Editable Terrain Manager (ETM) and can be used with Mogre. ETM itself is an addon library which simply manages terrain and makes it possible to deform and texture this terrain in real-time in response to user input. You can use it with any other scene manager in theory, though in practice the author recommends the Octree scene manager.

Currently the MET.zip file includes the source code for the wrapper written in C++/CLI and a test application with source code written in C#.

Features

  • 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 Smile
  • 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.

Usage example

Maybe this code can be used as an example.

How to setup a project

... Please include an example

Information for maintainers

Please write some information about how to modify the wrapper

See also