less_retarded_wiki

main page, file list (596), source, all in md+txt+html+pdf, commit RSS feed, report abuse, stats, random article, consoomer version

Portal Rendering

{ I haven't yet gotten to implementing a portal renderer so it's possible I make a wrong claim here by mistake, but I'll try not to :) ~drummyfish }

Portal rendering is a method of 3D rendering that treats the rendered environment as spaces (e.g. rooms) connected by portals (doors, windows, ...) which allows fast and simple determination of visibility and therefore fast and simple rendering. It was a quite popular way of 3D rendering for example in the old 1990s 3D games such as Descent and Duke Nukem.

The basic general idea is to represent the 3D environment as a set of "rooms" (generally any subdivision unit of space, not just "house rooms" of course) and their connections to other rooms through portals ("holes", shared walls through which one room connects to another); then when rendering we simply draw the room the camera resides in (from the inside) and proceed to draw the rooms that are connected by portals which are now visible on the screen, treating each of those portals as a kind of new smaller screen (i.e. a clipping window). Then we go on to recursively draw portals in those rooms again etc. until some terminating condition is met (e.g. all screen pixels are covered or we have reached maximum draw depth etc.). A limitation imposed on a room is often that it has to be convex so that its "from the inside" rendering is simple; non-convex spaces are then simply split into multiple convex ones -- EZ.

Just as similar methods like raycasting and BSP rendering, portal rendering can be used in various ways, it is not a simple algorithm but rather a method, approach to rendering. It may also be used just as a "helper" for visibility determination in another method. Notably there is a "full 3D" (Descent) and "2D" (Duke Nukem), sector based version of portal rendering. They are all based on the same principle but may have different limitations etc.

Advantages of portal rendering:

TODO

2D Portal Rendering

TODO


Powered by nothing. All content available under CC0 1.0 (public domain). Send comments and corrections to drummyfish at disroot dot org.