Moderators: Moderators, OGRE Team

robin_3d wrote:Sounds great, it sure will be beneficial to everyone to have a professionally paid graphics programmer doing work like this for the benefit of the community. Cheers
By the way, could you describe what you mean by portal. I thought I knew what you meant until you mentioned that it would be possible to use them regardless of the scenemanager.


sinbad wrote:Hi Chaster, good to see you back on this again
Your design thoughts are looking good; all I would suggest is that the culling planes you use for culling entities based on a portal would be best simplified so that you are still only dealing with 4 planes, ie the smallest square culling area which covers the portal. You might also want to use this for portal visibility, since realistically portals are likely to be quite regular in shape, and it's less work than trying to cull / detect based on an arbitrary portal shape.



Chaster wrote:BTW, Sinbad - my implementation requires (?) that I add a stack (or similar) of "extra" culling planes to the camera frustum. This doesn't seem like a big deal to me (since they will not take up much memory/overhead if not used) but I am open to other ideas...









sinbad wrote:1. _notifyCurrentCamera means the portal is visible to the camera according to it's bounds; it is not called if not. The scene manager / scene node already do bounds culling on MovableObject instances before it gets to that stage.
I'm not sure why you wouldn't want to just make entire subtrees visible / invisible. The fact that it would make a portal attached to that subtree 'visible' is correct, because it just means it's 'potentially visible', not 'definitely visible'. If it is visible, then it will cascade and make it's linked node visible too, which sounds like exactly what you would want. Maybe I missed something.
BTW SceneNode::setVisible controls visibility by setting the visibility flag on all objects and objects attached to children, so it's not that efficient (it's meant as a shortcut to doing it individually on objects, but letting you refine that later). You'd be better to use removeChild and addChild to quickly drop and reattach subtrees.


const Sphere& MovableObject::getWorldBoundingSphere(bool derive) const
{
if (derive)
{
mWorldBoundingSphere.setRadius(getBoundingRadius());
mWorldBoundingSphere.setCenter(mParentNode->_getDerivedPosition());
}
return mWorldBoundingSphere;
}

Users browsing this forum: Ask Jeeves [Bot] and 5 guests