Table of contents
- Selecting a Scene Manager
- Generic Scene Manager (default)
- Octree Scene Manager
- BSP Scene Manager
- Portal Connected Zone Scene Manager (PCZSM)
- Ogre Terrain System
- Terrain Scene Manager
- Paging Scene Manager (ogreaddons)
- DotSceneOctree SceneManager (ogreaddons)
- Myrddins Paging Landscape Plugin
- Editable Terrain Manager
- Overhang Terrain Scene Manager
- Planet Rendering Engine
- Tunnel Scene Manager
- See also
A scene is an abstract representation of what is shown in a virtual world. Scenes may consist of static geometry such as terrain or building interiors, models such as trees, chairs or monsters, light sources that illuminate the scene and cameras that view the scene.
Scenes can have quite different types. An interior scene might be made up of hallways and rooms populated by furniture and artwork on the walls. An exterior scene might consist of a terrain of rolling hills, trees, grass waving in the breeze and a blue sky with gently moving clouds.
Ogre provides a set of different scene managers, each of which is customized to best support different kinds of scenes. Ogre experts may even wish to develop their own scene manager, customized to best the type of scene used in their application.
This document lists the various scene managers provided by Ogre and discusses their strengths and weaknesses.
You can select a scene manager via the createSceneManager() method defined in your root node, replacing ST_GENERIC with your scene manager of choice:
The argument to createSceneManager specifies the type of scene manager to use, based on the following values:
- ST_GENERIC - Generic scene manager (Octree if you load Plugin_OctreeSceneManager, DotScene if you load Plugin_DotSceneManager)
- ST_EXTERIOR_CLOSE - old Terrain Scene Manager
- ST_EXTERIOR_FAR - Nature scene manager (this mode is not present anymore in Ogre 1.0. Use "Terrain", or "Paging Landscape" instead)
- ST_EXTERIOR_REAL_FAR - Paging Scene Manager
- ST_INTERIOR - BSP scene manager
Each SceneManager can register any combination of those flags for itself, since they are simple bit masks. So the default manager registers itself as ST_GENERIC, the octree manager and PCZ manager register themselves as all types, the BSP manager registers itself as ST_INTERIOR.
When you request a scene manager by type instead of name, Ogre picks the last manager to register a matching type.
The order depends on the order you load plugins in the plugins.cfg file. If you load the BSP, PCZ and Octree managers in that order, the Octree manager will grab all scene requests (when requested by type).
That's is also the order in the default Ogre plugins.cfg, so most people are probably using the octree manager if they use the type flags (even if they request ST_INTERIOR and have the BSP manager loaded, if the BSP plugin is loaded before the Octree plugin!).
Instead of requesting a scene manager via type, you can also do it via the name. The text names to find the scene managers explicitly are (case sensitive):
Only those above listed four are official Ogre scene managers in the sense of being provided by the Ogre team. However, there are quite some community developed alternatives which are partially listed on this page as well. The Ogre Terrain System is also developed by the Ogre team and is the new standard approach for terrain rending. It is however not technically an own scene manager, but rather a scene manager independent component.
Uses an Octree to split the scene and performs well for most scenes, except those which are reliant on heavy occlusion.
- A simple and generic solution, works well for most scenes
- Can use the StaticGeometry class to accelerate large chunks of immovable geometry
- No specific acceleration for particular scene structures
- Heavily occluded scenes will need a more specialised solution
This scene manager is intended for use in interior scenes. Particularly, it is optimized for the sort of geometry that results from intersecting walls and corridors.
The normal process for creating levels in a format usable by the BSP scene manager is:
- Use one of the numerous level editing tools to create your level, saving the level in .map format.
- Compile the .map file to a Quake 3-style .bsp file, which can be read in by the BSP scene manager. You can use id Software BSP compiler (q3map2) for this task, since it's no longer proprietary (released under the GNU GPL).
See the Portal Connected Zone Scene Manager page for information on this scenemanager.
- Optimized for interior scenes.
- Compatible with numerous level editing tools.
- Quake 3-style .bsp format may not be that efficient with modern GPUs in any case.
- Some people recommend instead creating levels in a general purpose modeling tool such as Blender, exporting the level in .scene format.
Here is a link to a Blender BSP importer which works great: http://blenderartists.org/forum/showthread?t=41306
The Ogre Terrain System is the default terrain system since Ogre 1.8.
- SceneManager independent, separate optional component
- Long term support (because it's no add-on, it's part of the Ogre core)
- Many improvements in comparison to older/other terrain managers
- Integrates with (optional) Ogre::Paging component
- Inherently editable - a lot like ETM
- In-built support for splatting layers, configurable sampler inputs and pluggable material generators
- Maybe there are still some performance optimizations needed
See also: Ogre Terrain System for a lot of additional information and links regarding the new component.
The terrain scene manager (TSM) is intended for relatively small scenes involving static terrain. This scene manager makes it easy to generate terrain from a heightmap. Heightmaps can be created from a variety of tools.
The TSM is an extended version of the OctreeSceneManager (with added terrain chunks).
Note: In Ogre 1.8 the TSM was removed, in favor of the new and more powerful Terrain Component. So it's only available up to Ogre 1.7.
- Fast rendering of high-resolution terrain (due to efficient level of detail and culling algorithms)
- Easy to generate terrain via heightmaps and terrain textures
- Vertex program based morphing between LOD levels
- Customisable material so you can use shaders if you want
- No paging out of the box - the interface hooks are there but you need to add it
- No splatting out of the box, but can be done with a custom material
Detailed documentation on the terrain scene manager can be found here.
The Paging Scene Manager allows scenes to be split into a set of pages. Only those pages that are being used need be loaded at any given time, allowing arbitrarily large scenes. Each page has its own heightmap, to which several textures can be applied by height. This allows snowy-peaked mountains within a green landscape, for example.
- Handles larger scenes than both the terrain and nature scene managers
- Allows Real-time Terrain deformation and saves to files.
- Allows multiple heightmaps and multiple textures per heightmap
Image + detail (fading on distance) Texture coloring based on user height (4 colors) Splatting. Real-time Splatting using Shaders. Real-time Texture coloring based on user height (4 colors)
- Special Video Card Memory Savings that divides at least per 3 Memory consumption:
- Texture Coordinates sharing accross pages (one texture coordinates set for any number of pages.) - Displacment Mapping using shaders (use only one float for a vertices instead of 3.)
- Map Tool (called "Mapsplitter") that split Big Map and Textures in pages, can compute lightmaps, normal maps, splatting maps.
- Support Raw Heightmap up to 16 bits per height (instead of 8 bits jpg,png files)
- Real-time Map change, Texturing Change
- Binary demo here: http://tuan.kuranes.free.fr/Ogre.html
- Vertex Morphing using shaders
- Horizon Occlusion Visibility Real-time determination: nothing behind a mountain will be sent to the video card
- Octree support
- Requires installation of the paging scene manager plug-in
- Needs use of The Map Tool to generate pages
- More options means more complexity
The DotSceneOctree SceneManager allows the geometry and meshes of a scene to be stored in a single file.
It's a kind of a hybrid of static geometry and the octree. It has an external tool which merges all geometry into octree nodes based on material type and maximum triangle count. It registers all scene types.
- Contains scene in a single file
- Allows meshes to be classified as static or dynamic
- Octree support
- Needs use of a processing tool to build a binary octree (.bin) file.
- Does not support 32 bit indices, so bigger meshes needs to be split up before being fed to the processing tool.
A project with many features and great looking terrains.
The terrain is editable (only by Mogre projects).
For more details look to Myrddin Landscape Plugin.
- It works with Ogre and Mogre
A project which offers an API to edit height and texture of a terrain.
For more details look to Editable Terrain Manager.
The powerful landscape/scene editor Artifex Terra uses the API of the Editable Terrain Manager. Created scenes can be loaded to Ogre applications by an additional loader.
- It works with Ogre and Mogre
Can display terrain with overhangs and tunnels.
It's a modified version of the Terrain Scene Manager, which adds modifications/additions to height map based terrain. A modify tool is integrated.
It was created for Ogre 1.4 and is open source.
For details look to page Overhang Terrain Scene Manager.
The aim of this terrain manager is to render a planet. So it's possible to fly from far away to the planet, plunge to the atmosphere and move plane to the planet surface. A LOD system is integrated for seamless gradation.
More details are in this forum thread.
For Ogre it's not available. But it's listed here for information and inspiration.
Most (high performance) racing games use a "tunnel" scene manager. It's all about he spatial structure of the game: A game like Mario Kart needs to be more than a tunnel in spacial terms but a F1 or WipeOut-like game would benefit from it.
A "tunnel" scene manager would part space in chunks that are following a way.