Leadwerks Engine - portal system

Miscellaneous Forums/Blitz Showcase/Leadwerks Engine - portal system

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

The last couple of days I was working on a brush slice routine, and cutting brushes up within whichever portalzones they resided in. The portal system is pretty much like UT2004's. You can see what UT2004 does if you open the console and type "rmode 1", 2, 3, 4, etc.

My portal system uses brushes designated as "portalzone" entities. Brush geometry is cut up and collapsed into single meshes within the portalzone. If the portalzone is not in the frustum, none of the contained geometry is drawn. If a portalzone has a portal that lies along any of its surfaces, it is only visible if the portal is visible. The portalzone is only visible through the visible portal, so all portalzone geometry not visible through the portal is clipped. All outdoor/non-portalized geometry in the scene is considered to be a part of the default "virtual" portalzone. I have it set up so the outdoor portalzone will automatically connect to any one-sided portals (a portal only touching one portalzone), which are taken to mean there is a transition from outdoor to indoor areas.





This room is full of meshes, but most are not visible through the portal in the entrance, so they get hidden. There are just as many shelves on the right as there are on the left. Also notice the brushes on the ramp are clipped to the portal edges. You are viewing in wireframe, so nothing is being obscured from view; the brush geometry is actually clipped.