7280 Lecture5 Visibilityprocessing
7280 Lecture5 Visibilityprocessing
Software
Visibility Processing
Not rendered
900 FOV
CSC7280 Computer Game Software Production
Rendering
• The surviving 1/8
geometry will be
rendered i.e. within
the viewing frustum.
• We still want to
render only those
visible polygons i.e.
those camera can
see Still have to render all the walls here
normal
Add a
Polygon 3
Splitting of polygon
CSC7280 Computer Game Software Production
BSP tree example
Add
Polygon 4
Add
Polygon 5
F C C,D,e2
solid B,A,
F,e1
D solid
e1 E e2
CSC7280 Computer Game Software Production
solid
Solid Leafy BSP Tree
• Combining the two to have all the
advantages
B
C A
solid solid solid
A D F
• Ref:
graphics.lcs.mit.edu/~seth/talks/siggraph91.p
df
CSC7280 Computer Game Software Production
Portal Stabbing
Stab tree
• Tree node = leaf cell
• Tree edge = stabbed
portal
Top view of level
switch (portal_type)
case REGULAR:
paint destination room;
case REFLECTIVE:
calculate virtual camera using support plane of portal
Invert viewing matrices
Paint destination room
Paint portal using alpha blending
case TRANSLUCENCY:
Paint destination room
Paint portal using alpha blend
CSC7280 Computer Game Software Production
Hybrid Approaches
• BSP require static scene geometry in
general
• Portal techniques has problem in
handling room with huge number of
triangles
• Can combine octree with portal : portal
connecting room walls only, with interior
content in octree
CSC7280 Computer Game Software Production
Hybrid Approaches
• Quadtree-BSP useful in large areas to
be explored
• BSP break a level down to triangle level,
resulting in large tree & long traversal
• Quadtree detect quickly where we are
• BSP refine the location details to help in
collision detection
10 S5
A typical heightmap 5
0
S4
S3
1 S2
2
3
4
S1
5
Terrain block
(32 triangles total, 5x5 vertices)
CSC7280 Computer Game Software Production
Geomipmapping
• each node contains its bounding box
• 4 descendants => 4 subquadrants
• Until a node contains exactly a terrain
block
• depth traverse the tree & perform
hierarchical clipping
• Distant triangles must still be rendered!
Interpolated value
N
σ 2 = ∑ (x − x)2
1
variance
N i =1 i
Heightmap value
Splitting of
Triangle 1
diamonds
Triangle 2