Download presentation source

Download Report

Transcript Download presentation source

CS 551/651:
Visibility Culling Cont
David Luebke
[email protected]
http://www.cs.virginia.edu/~cs551dl
DPL
7/27/2016
Administrivia

DPL
Hand back midterm for real
7/27/2016
Recap

Visibility culling: don’t render what
can’t be seen
– Off-screen: view-frustum culling
– Z-buffered away: occlusion culling

Potentially Visible Set (PVS)
– Conservative overestimate of visible
polygons
DPL
7/27/2016
Recap

Cells & Portals
– Works well for architectural models

Buildings, cities, catacombs…
– These divide naturally into cells

Rooms, alcoves, corridors…
– Transparent portals connect cells


DPL
Doorways, entrances, windows…
Key observation: cells only see each
other through portals!
7/27/2016
Recap
Create an adjacency graph of cells
 A cell is only visible if it can be seen
through a sequence of portals

– Need a line of sight
– So cell visibility reduces to testing
portal sequences…
DPL
7/27/2016
Recap

Airey: view-independent PVS
– Ray-casting for portal-portal visibility
– Slow, possibility of inaccuracies
DPL
7/27/2016
Recap

Teller: view-independent PVS, viewdependent runtime refinement
– Line stabbing as linear program
– Accurate, elegant, slow
DPL
7/27/2016
Recap

Luebke: view-dependent PVS
– Depth-first traversal of adjacency graph
Render cell w/ portals
 If portal is visible, render adjacent cell, but
clip to portal boundaries

– Cull boxes overestimate portal visibility,
simplify portal intersection
– Fast, easy, somewhat conservative
DPL
7/27/2016
pfPortals
Q: How badly does the cull box
approximation overestimate PVS?
 Q: How to represent and intersect
cull boxes?
 Note: Can implement mirrors as
portals with an extra transformation!

– Some clipping & Z-buffering issues
(Like what?)
DPL
7/27/2016
pfPortals
Show pictures (web page)
 Show video

DPL
7/27/2016
pfPortals

Intriguing thought: extend pfPortals
to view-independent solutions
– pfPortals based on simple box to
overestimate portal in screenspace
– Idea: use 3-D box to overestimate
portal in world space
Portal-portal visibility now overestimated
by line-box stabbing
 Amenti: O(n) line-box intersection test

DPL
7/27/2016
Cells and Portals: Details

Usually separate model into
occluders and detail objects
– Occluders: walls, floors
– Detail objects: desks, chairs, pencils
– Cell creation process only accounts for
occluders (Why?)
Compute detail object visibility
through portal sequences at run time
 Teller: also precompute into PVS

DPL
7/27/2016
Why View-Independent?
Q: If view-dependent techniques like
pfPortals can calculate a reasonable
PVS fast enough, why bother with
view-independent solutions?
 A: Intelligent prefetching

– Soda Hall walkthrough (Funkhouser)
Whole model doesn’t fit in memory
 Use Teller stab trees to load in only cells
that might be visible

DPL
7/27/2016
Creating Cells and Portals

Q: Given a model, how might you
extract the cells and portals?
– Airey: k-D tree (axis-aligned cells)
– Teller: BSP tree (general convex cells)
– Luebke: modeler (any cells at all)

Problems and issues
– Running time
– Free cells
– Intra-wall cells
DPL
7/27/2016
Cells & Portals: Summary

Architectural environments: mostly
considered a solved problem
– Got the “right” solution
– Got the good-enough hack
Imagine creating cells and portals for
a forest environment…
 Next up: general occlusion culling
using the hierarchical Z-buffer

DPL
7/27/2016