Paging Scene Manager Option        

Using setOption / getOption Mechanism, you can use the PLSM2 in a way more advanced way, here's the option documented :


Terrain Position

  • PositionX
  • PositionY
  • PositionZ

Terrain Selection

  • CurrentMap
  • InsertNewMap

Texture Mode Selection

  • CurrentTextureFormat

Terrain Modifications

Brush Setup

All terrain modification use the same Brush setup (Brush is a modification mask, like gimp/photoshop brushes)

  • BrushScale
  • BrushArray :array of floats. Delta you want to apply. Not the final height.
  • BrushArrayWidth : it's just the array width
  • BrushArrayHeight : same but for height.


The thing to notice is that DeformationCenter is a BrushArray Center (width/2 and height/2), so you may want to shift deformation center accordingly.

  • DeformationCenter


  • PaintCenter
  • setPaintChannelValues

tuan kuranes said
It will be "PaintCenter" for all. (no more PaintColorCenter or PaintAlphaCenter) and "setPaintChannelValues" to specify factor. (no more channel selection before that.)

  • PaintAlphaCenter
  • PaintColorCenter
  • PaintChannel
  • PaintColor


  • fillBrushArray

Data Page handling

  • PageUpdate
  • LoadNow Preloads all possible tiles

Terrain Mesh Tile Getter

PageGetTileVertexData_2 : This is the optimized, yet a bit fuzzy implementation of the getVertexDataPatch

Usage: Pass in a std::vector<void*> Pointer to the getOption call containing at least 5 Elements :

  • [0](Ogre::uint*) = X Index of the Page to retrieve data from,
  • [1](Ogre::uint*) = Z Index of the Page to retrieve data from;
  • [2](Ogre::uint*) = X Index of the Tile within the Page to retrieve data from,
  • [3](Ogre::uint*) = Z Index of the Tile within the Page to retrieve data from,
  • [4](Ogre::uint*) = LodLevel to get the data at (note that level 0 means highest detail),

The getData call will then append 3 entries to the end of the vector.
In Detail(in order),

  • [End-2](Ogre::uint*) = Number of vertices returned,
  • [End-1] (Ogre::Vector3*) = The actual vertices, this is a array containing as many elements as returned in End-2,
  • [End] (Ogre::IndexData*) = The index data for the terrain polygons at the queried LodLevel.

Note that the caller is in charge of deleting the vector array and the integer with the number of vertices returned.


Terrain size

  • MapBoundaries : Ogre::AxisAlignedBox
  • GlobalToPage : Ogre::Vector3
  • getAreaSize
  • PositionX
  • PositionY
  • PositionZ
  • ScaleX
  • ScaleY
  • ScaleZ

Terrain debug

  • VisibilityMaterial

Terrain Option

  • MaxNumTiles
  • MaxNumRenderables

Paging Info

  • PagePreloadQueue
  • PageTextureloadQueue
  • PageLoadQueue
  • PreLoadedPages
  • TextureLoadedPages
  • LoadedPages
  • UnloadedPages
  • RenderableFree
  • TileFree
  • RenderableLoading
  • VisibleRenderables

Terrain Deformation

  • Impact
  • ImpactPageX
  • ImpactPageZ
  • ImpactTileX
  • ImpactTileZ
  • numModifiedTile
  • BrushSize
  • BrushScale

Texture Mode Selection

  • NextTextureFormat
  • CurrentTextureFormat

Terrain Selection

  • NextMap
  • PreviousMap
  • CurrentMap
  • CurrentMapFileName

Camera Info

  • CurrentCameraPageX : int
  • CurrentCameraPageZ : int
  • CurrentCameraTileX
  • CurrentCameraTileZ

Cull Info

  • NextCullMode
  • CullDebug
  • CurrentOptionCamera
  • getCullingMode

use cases

  • look at demo code

  • how to paint terrain
  • how to deform terrain
  • how to erode terrain
  • how to make splat
  • how to get a trimesh to feed newton, Ode, Opcode, AI polygon soup pathfinder.
  • how to change culling modes