Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: e speedups D22 Cells and Portals • Teller (1993): view­independent + view­dependent – Portal­portal visibility calculated by line stabbing using linear program • • Cell­cell visibility stored in stab trees View­dependent eye­portal visibility stage further refines PVS at run time – Slow preprocess – Elegant, exact scheme D23 Cells and Portals • Luebke (1995): view­dependent only – Eye­portal visibility determined by intersecting portal cull boxes – No preprocess (integrate w/ modeling) – Quick, simple hack – Public­domain library: pfPortals D24 pfPortals Algorithm • Depth­first adjacency graph traversal – Render cell containing viewer – Treat portals as special polygons • • • If portal is visible, render adjacent cell But clip to boundaries of portal! Recursively check portals in that cell against new clip boundaries (and render) – Each visible portal sequence amounts to a series of nested portal boundaries • Kept implicitly on recursion stack D25 pfPortals Algorithm • Recursively rendering cells while clipping to portal boundaries not new – Visible­surface algorithm (Jones 1971): general polygon­polygon clipping • Elegant, expensive, complicated – Conservative overestimate (pfPortals): use portal’s cull box • • Cull box = x­y screenspace bounding box Cheap to compute, very cheap (constant time) to intersect D26 pfPortals Algorithm • How badly does the cull box approximation overestimate PVS? – Not much for most architectural scenes • Note: Can implement mirrors as portals with an extra transformation! – Some clipping & Z­buffering issues D27 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?) pfPortals: find detail object visibility through portal sequences at run time Teller: also precompute into PVS D28 Why View­Independent? • • If view­dependent techniques can often calculate a reasonable PVS fast enough, why bother with view­independent solutions? One good answer: smart 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 D29 Creating Cells and Portals • Given a model, how might you extract the cells and portals? – – – • Airey: k­D tree (axis­aligned boxes) Teller: BSP tree (general convex cells) Luebke: modeler (any cells at all) Problems and issues – – – Running time Free cells Intra­wall cells D30 Cells and Portals: Discussion • Good solution for most architectural or urban models – Use the simplest algorithm that suffices for your needs: • • pfPortals­style algorithm: view­dependent solution, reasonably tight PVS, no preprocess necessary (except partition) Teller­style algorithm: tighter PVS, somewhat more complex, can provide view­independent solution for prefetching D31 Cells and Portals: Discussion • Public­domain code I’m aware of: – pfPortals: A very simple set of Performer callbacks that implements cull­box portal culling – pfWalkthru: • Includes code to extract cells and portals • – Game engine sites • • Lots of “level builders” and “level compilers” Treat these with a grain of salt D32 General Occlusion Culling • When cells and portals don’t work… – Trees in a forest – A crowded train station • Need general occlusion culling algorithms: – Aggregate occlusion – Dynamic scenes – Non­polygonal scenes D33 General Occlusion Culling • I’ll discuss two algorithms: – Hierarchical Z­Buffer • Ned Greene, SIGGRAPH 93 – Hierarchical Occlusion Maps • Hansong Zhang, SIGGRAPH 97 D34 Hierarchical Z­Buffer • Replace Z­buffer with a Z­pyramid – Lowest level: full­resolution Z­buffer – Higher levels: each pixel represents the maximum depth of the four pixels “underneath” it • Basic idea: hierarchical rasterization of the polygon, with early termination where polygon is occluded D35...
View Full Document

This note was uploaded on 12/09/2011 for the course CS 561/661 taught by Professor Lubke during the Summer '11 term at Virginia Tech.

Ask a homework question - tutors are online