Revisiting Topic. Scene Manager Details:+Data Structure

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
Post Reply
iblues1976
Gnome
Posts: 379
Joined: Fri Sep 16, 2011 4:54 pm
x 10

Revisiting Topic. Scene Manager Details:+Data Structure

Post by iblues1976 »

Hello,

I'm using Ogre 1.9.x

I'm adding a subsection about scene managers in my dissertation background chapter. It has been a great experience to use Ogre as the only rendering graphics engines for my dissertation.

I was trying to find out information about the generic scene manager that Ogre uses. I'm use ST_GENERIC.

Code: Select all

m_pSceneMgr = OgreFramework::getSingletonPtr()->m_pRoot->createSceneManager(ST_GENERIC, "GameSceneMgr")
I read the following topics/articles about the Scene Manager:

Topic: http://www.ogre3d.org/forums/viewtopic.php?f=1&t=70253

Scene Manager FAQ: http://www.ogre3d.org/tikiwiki/SceneManagersFAQ

API : http://www.ogre3d.org/docs/api/1.9/clas ... nager.html

I'm not using the plugin for octree, therefore, the scene uses the default one. My understanding from what I have read, is that in the case of generic (no octree), the data structure is the .scene structure.

Therefore, I'm assuming, looking at the .scene file that I get from OgreMax, that the structure is node tree , with parent node, children nodes and so forth... Is this correct? I was trying to find the definition of the data structures.

In terms of Octree information, which I'm not using, but Ogre is capable of using, there are plenty of information available, so I'm ok with that.

My understanding, that without extending OGRE, the following scene manager are available:

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

If I'm not mistaken, the terrain does not longer comes with Ogre 1.9.

From the same FAQ, it says the following scene managers are available

DefaultSceneManager
OctreeSceneManager
BspSceneManager
PCZSceneManager

Understanding that each scene manager has a different use, is there a scene manager, that is more use now days versus one that is a bit obsolete. Someone told me once (maybe here) that BSP is not used as much... I think octree will be the prefer method, right?

Please forgive if I have made any incorrect assumptions or statements. I'm trying to clarify.

Thank you
User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7157
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 534

Re: Revisiting Topic. Scene Manager Details:+Data Structure

Post by Kojack »

iblues1976 wrote:I'm not using the plugin for octree, therefore, the scene uses the default one. My understanding from what I have read, is that in the case of generic (no octree), the data structure is the .scene structure.
.scene is a 3rd party file format. No official part of ogre understands it.
(There's the dotscene scenemanager, it understands it, but it's a 3rd party addon)

The default base scene manager is a hierarchy of scene nodes. All of the scene managers have the same user exposed organisation (root scene node, child scene nodes, entities attached to scene nodes), but the default manager doesn't do anything beyond that. The other managers add extra hidden organisation (such as portals, octrees, bsps).
iblues1976 wrote:Therefore, I'm assuming, looking at the .scene file that I get from OgreMax, that the structure is node tree , with parent node, children nodes and so forth... Is this correct?
Yep, that's right. In fact all scene managers have this. For example, the octree manager uses an internal octree for visibility checks, but you still work with a tree of scene nodes. The bsp manager has a bsp structure for the world geometry (the map) but still uses the scene node tree for all other objects.
iblues1976 wrote:If I'm not mistaken, the terrain does not longer comes with Ogre 1.9.
Yep, terrain scene manager was removed, ogre now has the terrain component (an optional library that does terrain without needing a special scene manager). The terrain scene manager used to be included inside of the octree plugin (the plugin contained two scene managers).
iblues1976 wrote:Understanding that each scene manager has a different use, is there a scene manager, that is more use now days versus one that is a bit obsolete. Someone told me once (maybe here) that BSP is not used as much... I think octree will be the prefer method, right?
The BSP manager isn't well supported, it's only maintained to the point of running. It's also only Quake 3 bsp compatible, which limits it's usefulness (plus BSPs suck, but that's just my opinion). The portal connected zone scene manager would be great (it's an octree but with portal visibility), but getting the right data for it is tricky (you need to manually place portals to connect regions, I don't know any editor that exposes that ability). Most people use the octree scene manager.
iblues1976
Gnome
Posts: 379
Joined: Fri Sep 16, 2011 4:54 pm
x 10

Re: Revisiting Topic. Scene Manager Details:+Data Structure

Post by iblues1976 »

thanks.. .great info!
User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7157
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 534

Re: Revisiting Topic. Scene Manager Details:+Data Structure

Post by Kojack »

I should probably mention that all this changes in Ogre 2.0, there's only one scene manager (so far). :)
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5296
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1278
Contact:

Re: Revisiting Topic. Scene Manager Details:+Data Structure

Post by dark_sylinc »

iblues1976 wrote: From the same FAQ, it says the following scene managers are available

DefaultSceneManager
OctreeSceneManager
BspSceneManager
PCZSceneManager

Understanding that each scene manager has a different use, is there a scene manager, that is more use now days versus one that is a bit obsolete. Someone told me once (maybe here) that BSP is not used as much... I think octree will be the prefer method, right?
Funny enough, in 2.0 land all of them are deprecated.

Turns out, brute force beats brains. The benefits of iterating all objects in a DOD (Data Oriented Design) fashion which is cache friendly, SIMD friendly, and threadable far outweights those approaches.
There are long term plans for a 3D-cell-like scene manager (i.e. similar to Octree Scene Manager) for extremely large scenes.
You can read more about it in my slides. Don't forget to check the References section at the bottom (particularly Culling the Battlefield, Pittfalls of OOP, and Typical C++ bullshit).
Most of the slides have already been implemented in 2.0 branch with excellent performance results (except for the HighLevelCulling; the pieces are there but the default implementation does nothing).

Cheers,
Matías
Post Reply