SceneManagersFAQ

From Ogre Wiki

Jump to: navigation, search

Todo on this page:

  • fill out the open points
  • add/update information
  • add new scene managers

Note: This page seems to be outdated! Search in the forums for additional information.


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.


Contents

Selecting a Scene Manager

You can select a scene manager via the createSceneManager or getSceneManager method (depending on the Ogre version you are using) defined in your root node, replacing ST_GENERIC with your scene manager of choice:

From Dagon 1.2 version to date

mRoot->createSceneManager (ST_GENERIC);

Old releases

mRoot->getSceneManager (ST_GENERIC);

The argument to createSceneManager (getSceneManager in older releases) 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 - 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


Octree Scene Manager

Uses an octree to split the scene and performs well for most scenes, except those which are reliant on heavy occlusion.

Pros:

  • A simple and generic solution, works well for most scenes
  • Can use the StaticGeometry class to accelerate large chunks of immovable geometry

Cons:

  • No specific acceleration for particular scene structures
  • Heavily occluded scenes will need a more specialised solution


Terrain Scene Manager

The terrain scene manager 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.

Pros:

  • 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

Cons:

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


Nature Scene Manager (ogreaddons)

The nature scene manager is intended for larger outdoor scenes than those provided by the terrain scene manager. The same heightmap is repeated over a set of terrain tiles, each of which can use a different terrain texture.

Pros:

  • Handles larger scenes than the terrain scene manager

Cons:

  • Terrains have substantially less detail than with the terrain scene manager


Paging Scene Manager (ogreaddons)

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 arbitarily 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.)


Pros:

  • 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

Cons:

  • Requires installation of the paging scene manager plug-in
  • Needs use of The Map Tool to generate pages
  • More options means more complexity


BSP Scene Manager

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).

Pros:

  • Optimized for interior scenes.
  • Compatible with numerous level editing tools.

Cons:

  • Quake 3-style .bsp format may not be that efficient with modern GPU's 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


DotSceneOctree SceneManager (ogreaddons)

The DotSceneOctree SceneManager allows the geometry and meshes of a scene to be stored in a single file.

Pros:

  • Contains scene in a single file
  • Allows meshes to be classified as static or dynamic
  • Octree support

Cons:

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


Portal Connected Zone Scene Manager (PCZSM)

See the Portal Connected Zone Scene Manager page for information on this scenemanager.


Myrddins Paging Landscape Plugin

A newer project with many features and great looking terrains.
The terrain is editable (only by Mogre projects).
For more details look to Myrddin Landscape Plugin.

Pros:

  • It works with Ogre and Mogre
  • ...

Cons:

  • ...


Editable Terrain Manager

A newer project with wich you can edit height and texture of a terrain.
For more details look to Editable Terrain Manager.

Pros:

  • It works with Ogre and Mogre
  • ...

Cons:

  • ...


Planet Rendering Engine

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 seemless graduation.

More details are in this forum thread.

Pros:

  • ...

Cons:

  • ...


... a brand-new terrain system (by Sinbad)

In March 2009 Sinbad (the father of Ogre) began creating a new terrain system from scratch.

Details and discussion are in this forum thread.
Screenshots are in this thread.

Pros:

  • ...

Cons:

  • ...


See also

Personal tools
administration