Honours Graphics 2008 Session 7
Today’s focus Indoor environment rendering BSP and Portal techniques revisited
Indoor / urban rendering Often makes use of BSP / PVS system Octrees and Portal systems in use as well Portals form a solution for PVS creation
BSP Several types of BSP trees: Node-storing BSP Leaf-storing BSP Solid BSP Each BSP type has specific properties that make it more useful for certain purposes
Node BSP Original BSP tree as described by Fuchs Chooses dividing plane from available faces in geometry. Stores dividing face in node, passes along remaining faces as appropriate Not conducive to tasks such as collision detection as the faces on nodes have no spatial relationship Traditionally used in software renderers as it generates the least amount of splits
Node BSP, image
Leaf BSP All geometric data stored in leafs Nodes store only dividing plane Leafs represent cells that store all the triangles in a list Cells are convex and it is possible to find the openings between cells (sometimes called portals) Useful in hardware rendering and techniques such as collision detection Portals can be used to compute PVS for BSP
Leaf BSP, image
Solid BSP Expands leafs of leafy BSP to provide solid information Effective and elegant for techniques such as collision detection
Solid BSP, image
Solid Leafy BSP Simply combines leafy and solid BSPs to maintain advantages of both
Solid Leafy BSP, image
Portals Either placed manually by level-designers, or automatically Automatic placement not optimal, but useful in many cases – such as automatically creating a PVS (requires portal information) Uses splitting nodes of BSP to determine portals automatically
Portals for rendering Many advantages: Theoretically no overdraw (optimal for software rendering) Allows effects such as transparency and reflection Can cater for somewhat dynamic environments Conceptually easy to understand But: can have significant computational overhead with arbitrary shaped view frusta with large number of planes. Not as good for urban scenes in general
Portals for rendering, cont. Automatic portal creation normally produces a very large set of portals Thus typically has to rely on manually placed portals by level-designers
BSP, Collision detection
Homework Write code (pseudo or real) for Line-of- Sight determination boolean GetLOS(BSP t, point a, point b); Complete for session 9