SoC2006 SceneManagement         Scene Management - GSoC 2006

Summer of Code 2006: Scene Management

Student: Wael el Oraiby (farakon)
Mentor: Paul Cheyrou-lagreze (tuan kuranes)
Status: Still experimental, obtain CVS branch soc06-scenemanagement


Create an hybrid Portal/BSP scene manager that benifits from the current visibility system on GPU (via occlusion queries) and that acts as a higher level container for other subscene managers. In short, each cell can have its own scene manager, cells are connected via portals. Objects/Camera relative position (the cell they are in) is queried via BSP. Portal visibility gives cells visibility and from that we can extract cells/subscene managers visibility.

Project modules

Preprocessor: Preprocess the scene upon loading, does the CSG, colouring and BSP. Although time depends on the complexity of the occlusion mesh and the number of portals/objects, we might choose to either preprocess the scene when loading or load the preprocessed data from a file.

Manager: This is where everything that has to do with visibility/queries/batching is done.

Project steps

Portal/Occlusion mesh CSG

Status: Completed (need more debugging and testing)

The method I used consisted in building a BSP tree for the occluder mesh, and another one for the portals. Occluders are clipped with the portal BSP, and portals are clipped with Occluder BSP. A final BSP of both clipped portals and occluders can be built after.


Cell colouring

Status: completed (need more debugging and testing)

Cell colouring means identifying each cell and the polygons for each cell, this way we can now in which cell the camera is in.


Integration into Ogre

Status: completed (need more testing and debugging)

I moved the code I ve done to Ogre now, it uses no external libraries now, it seems to be working (more testing is needed though before confirming a completion status)


Portal/Cell connectivity and BSP of the result mesh/Proximity query/Position query

Status: completed (need more testing and debugging)

I have done the connectivity extraction between portals and cell, the methods are exposed: getNeighboringCells, getNeighboringPortals, getCellPortals, getPortalCells, and few others. Portals and Cells are currently handled as indices, they can be easily adapted later as we need.


Portal occlusion query/Cell (subscene) visibility extraction and a simple Hybrid Portal/BSP scene manager

Status: completed (need more testing and debugging)

occlusion query implemented, and got the visibility extraction from it, whole cells could be culled when not seen.

Master Scene Manager and Adaptation of existing scene managers

Status: completed (need more debugging and testing)

API is completly redesigned, the dotScene loader and level builder is now outside the scene manager. The scene manager is now independant of the level format. Implemented functionalities for the super scene managers, the use of other scene managers within this scene manager as master is now possible.


In the left pic 2 cells were culled because their portals weren't visible (the camera is in the solid space), in the right image both cells are visible because their portals are visible.

movers are now supported, the computation of mover spacial position (which cell) is done using the node center, it will be enhanced soon to support bounding sphere and bounding box:


the ninja is inside the green cell

7. [.Net editor or Demo]

8. [batcher or Demo]

Note: 1-6 are the preliminary steps, once finished and hopefully the time allows it, steps 6-7 are the next objectives. I m going to give more information on each step later on as I progress. Depending on optimisations and new ideas, these steps can change and might be combined.