Thinking to use PCZSM as main scene manager in Ogitor...


24-07-2009 14:24:54


I was thinking to use PCZSM as main scene manager in Ogitor due to following facts:

1 - It can do everything OctreeSM can do and even more (right?)
2 - The new terrain is not dependent on any particular scene manager
3 - The new paging system does not depend on any particular scene manager
4 - BSPSM is long time dead...

so, there is almost no drawbacks of using PCZSM as the main scene manager for any project. I am saying almost because i have to admit that i have no technical knowledge on PCZSM, thats why i need a small briefing if possible, so that we can integrate whole set of features PCZSM has, in Ogitor and make it way much easier to create/modify/position/tweak zones/portals/anti-portals in Ogitor's interface...

What I really need to know is the REQUIREMENTS of PCZSM, like does it require that every object/camera/light have a zone, does it require that there should be initial portals? does it require that every object/camera/light has a node? Also are PCZSM's SceneNodes any different than OctreeSM's SceneNodes, so do i have to design another SceneNode wrapper to be able to use certain features or a usual Ogre::SceneNode would supply me all the functionality?

And everything else i REALLY SHOULD KNOW about...

I know that you have all those info somewhere on the wikis and forums and i really dont want to be help vampire, but the need to read thousands of lines of code/questions/wiki was what caused me to postpone PCZSM integration till now, since a short briefing can get me started and complete %90 of the integration.

Thanks in advance,

Ismail TARIM


24-07-2009 15:09:21

This topic is about just that - providing a sort of editor for pczsm:


24-07-2009 15:28:02

Hints for other topic readers using - or planning to use - PCZSM for their projects:

The more help we get, the better it will be. :)

None of us have experience using this scene manager, so speak up.


24-07-2009 19:37:35

Just about all you need to know is in that wiki article. However, the biggest difference between the PCZSM and the other SMgrs is that PCZSM needs a node for all objects in the scene including the camera.

One bit of frustration that I have run across is forgetting to add the node to the PCZSM. Everything will seem to be working correctly until the node crosses over a portal; the mesh attached to the node will disappear.

Ogre::PCZSceneNode *node = (Ogre::PCZSceneNode*)pczSM->getRootSceneNode()->createChildSceneNode(uniqueName);

// Don't forget this step.
pczSM->addPCZSceneNode(node , mPCZone);

It doesn't seem to matter if the mPCZone provided to the addPCZSceneNode() method is the default_zone or the zone that the object physically resides, although I pass in the objects initial mPCZone.

As others have discovered, don't forget to update the camera bounds. This little bit of detail is not spelled out in the wiki, it's only discovered by a careful reading of the example application.