Portals

Hey everyone. I am making a building map for one of my levels. I undstand the best way to do this is to use portals to hide object not being seen by the user. I also know a few programs will make portals for the user automaticly. Can panad 3d do any post work for setting such things up?

I understand portals are not good for open worlds, but can they be used for towns that have many buildings with stuff in them?

Also, how do you set up a portal, lol?

There is rudimentary support in Panda for portals. Try searching the forum for “PortalNode”.

David

I made a portal demo a while back, I’ve uploaded it here: http://www.novuscom.net/~spacebullet/out/Portal-Culling.zip
Note that using geoms with a collision mask as is done in the demo is a bad idea performance-wise. In a real system you should use proper collision polygons.
You might also find a better method to determine which cell objects are in, for example tie it into a navmesh system or use volumes.
Also I wrote up a manual page on portals but it is far from complete. http://www.panda3d.org/manual/index.php/Portal_Culling

If you look at naith (code.google.com/p/naith/) it has portal support, and uses them when you run ‘original level’. It works by letting the user chop the level into intersecting axis-aligned cuboids however - nothing automated, though its setup such that the level designer using Blender can just drop in cuboids, tag them and it does the rest. naith only uses them to cull static meshes - never got far enough to do moving meshes, though that was the intention.