420 likes | 598 Views
Visibility Sorting and Compositing without Splitting for Image Layer Decompositions. John Snyder, Jed Lengyel. Layered Decomposition Problem. Given set of moving geometric parts , and moving camera, find visibility ordering for every frame. sort. composite. parts. sorted images.
E N D
Visibility Sorting and Compositing without Splitting for Image Layer Decompositions John Snyder, Jed Lengyel
Layered Decomposition Problem • Given set of moving geometric parts, • and moving camera, • find visibility ordering for every frame. sort composite parts sorted images composited result
Occlusion Cycles split group When no order exists, can split or group parts.
Non-Splitting Layered Decomposition • Don’t split parts that form occlusion cycles: • run-time splitting is slow • splitting is often unnecessary • splitting destroys coherence Sorting requires no global separating plane.
Image-Based Rendering Acceleration[Lengyel97] sprites composited image
Other Applications • fast special effects • animation playback with selective display • incorporation of external image streams • image stream compression • fast hidden line rendering • z resolution targeting
Previous Work • invisibility culling [Greene93,Zhang97] • analytic hidden surface removal [Mulmuley89] • global visibility [Teller93,Durand97] • image layer decompositions [Schumacker69,Newell72,Fuchs80] • dynamic visibility [Torres90,Sudarsky96] • depth sorting for special effects [Max85]
E B A Occlusion Graphs • pairwise occlusion relation: AE B • relations on parts forms directed graph: occlusion graph A B view from E side view
Occlusion Graphs (Ex. 1) A B A B C C
Occlusion Graphs (Ex. 2) A B A B C C
Occlusion Graphs (Ex. 3) A B C Forms strongly connected component (SCC).
Resolving Non-Binary Cycles SCCs need not be rendered as an aggregate!
E Occlusion Testing via Collision B A For convex hulls of objects A and B: BE A ch(A E) B
ch(A E) E Occlusion Testing via Collision:Occluding Example B ch(A E) B BE A
ch(A E) E ch(A E) B BE A / Occlusion Testing via Collision:Non-Occluding Example B
E B Trivial Sorting Algorithm • compute occlusion graph • detect and topologically sort SCCs • at least quadratic in number of parts! A C F D
A C F D E B Improving the Trivial Algorithm A B,C,D,F but nothing occludes A. Process A first.
E B Improving the Trivial Algorithm A C F D Sorting Output: A
E Improving the Trivial Algorithm C B F D Sorting Output: A, B
E Improving the Trivial Algorithm C F D Sorting Output: A, B, C
E Improving the Trivial Algorithm F D Sorting Output: A, B, C, D, F
E Incremental Visibility Sort (IVS) • similar to Newell, Newell, & Sancha algorithm, 1972 • sorts parts, not polygons • detects SCCs, doesn’t split • uses order from last query, not depth order • culls more efficiently using kd-tree A Z B Depth order doesn’t indicate visibility order.
IVS Algorithm • While L is nonempty, pop off top element A • if A is unmarked • if nothing remaining on L occludes A • send A to output • else • mark and reinsert A into L • else // A is marked • check for occlusion cycle • if found, group cycle objects and reinsert • else reinsert A into L
Occlusion Culling • Fundamental IVS query: • Which parts remaining in L occlude A? • use convex hulls around parts • bound hulls with spatial and angular extents • occlusion cull reduces to 1D interval intersection • bounded parts organized in dynamic kd-tree object kd extent convex hull
Spatial Extents B A B A /
Angular Extents B A B A /
B C B D D Kd-Tree Occlusion Culling • rebalance kd-tree every frame • kd-tree supports part deactivation x1 A y2 y1 y1 y2 C A y x1 x
Exact Occlusion Testing • Does B A? • uses hybrid Chung/Gilbert collision algorithm • requires extremal vertex query on A and B • no need to create ch(A E) dynamically • exploits coherence in object motion extremal vertex minimizes D•v on A D A v
Future Work • animation previewer • continuous time queries • adaptive splitting, especially for terrain • faster, less conservative visibility tests • automatic part decomposition • visibility sorting with minimal splitting
Conclusions • non-splitting layered decomposition useful • software visibility sorting is practical • basic ideas of approach: • exploit temporal and spatial coherence • exploit properties of convex objects • exploit incremental collision detection algorithms
Extent Tracking • use “vertex descent” • on convex polytope, local minimizer of extent is also global minimizer v1 D v0 v0 frame t1 frame t0
Results: Tumbling Toothpicks • uniform scale (“us”): add more of same size • biases occlusion complexity superlinearly • uniform density (“ud”): add more of scaled size • occlusion complexity increases linearly • eccentric ellipsoids moving in cubical volume
Performance with Increasing ObjectsUniform Density & Uniform Scale
Results: Canyon Flyby • six aircraft flying through valley • investigates rendering acceleration at various levels of terrain splitting • update rate assumptions: • aircraft parts: 20% • terrain parts: 70% • sky 40% • aggregation penalty: render every frame
Results: Canyon Flyby • cpu times are in ms per frame • update rate is poly-weighted
E Newell, Newell, & Sancha (1972) • traverse depth-sorted list of polygons • if next polygon doesn’t overlap, send to output • otherwise use tests of increasing complexity: • screen bounding box, vertex/plane, 2d intersection • if unoccluded, polygon is sent to output • if occluded, polygon is marked and reinserted • marked polygons are split to remove cycle H C F A B Z G