The best 3D portal generator

Some articles I've read recently remind me on my adventures with portals. Last year, I spent some time programming a portal generator. What's that, you might ask. It is something which creates something like this:

(Shot taken from a not yet released software, but stay tuned.) Using portals is a simple technique for speeding up indoor rendering, a lot of well known 3D engines (Unreal, Doom) use this. You simply define rooms connected through portals which are nothing more than windows, telling the 3D engine where you can look from one room into the other one. the only problem is: How do you get these rooms and portals? So I sat down and wrote a software which calculated this stuff automaticly. It worked quite well and gave good results. But the portal finding problem is quite complex (NP-complete, anyone?), and computing time grew exponential. For 200 polys, the algorithm created portals within less than a second. But for example for large levels with 1 mio polygons, it could take serval hours. And then, seeing the 3D artist clicking together the needed 8-10 portals for this huge level within one minute was a bit frustrating. So, instead of trying to optimize the algorithm, which was possible but would have taken development time, we decided to let the 3D artist create these portals. Now we had high quality portals in very short time, and better: we had full control about where the portals where. This is sometimes really necessary to increase rendering speed if you need it at some special places in a level for example. Conclusion: Maybe, the best portal generator is the 3D artist. :)

three comments, already:

Well that is how I have always done it in UNREAL. I place sheet brushes then add them as portals in doorways and windows to completely “zone” off an area from another. I think that is the best way and doesn’t really take that long for a level designer (plus the control over it is nice compared to the wait for a slow auto-algorithm).

Also in ut2k3 anti-portals were added to embed into and under terrain / against bsp walls etc because a brute force aproach was needed to cope with the (then) new technology – they had no auto-aproach so I wouldn’t feel bad if you can’t do it with quick speeds either.

btw The “unreleased tool” looks good from the limited shot! :)
Sharpfish () (link) - 25 11 05 - 21:41

Funny how you two are posting about portals at the same time:
Mike - 25 11 05 - 22:37

When I did portal culling for Lightfeather I didn’t even really think about trying to create a portal generation tool. It’s a lot of work for something that’s far from perfect
Electron () - 04 12 05 - 14:02

Remember personal info?
Email (optional):
URL (optional):
Enter "layered" (antispam):
Comment:Emoticons / Textile

  ( Register your username / Log in )

Notify: Yes, send me email when someone replies.  

Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.
Note: If you type in your email adress above, it will be visible to other visitors, although it will be hidden for bots using javaScript.