540 likes | 663 Views
Fast Non-Linear Projections using Graphics Hardware. Jean-Dominique Gascuel, Nicolas Holzschuch, Gabriel Fournier, Bernard Péroche I3D 2008. Non-linear projections: What & Why ?. [wiki.panotools.org, Ben Kreunen]. [lensmateonline.com]. [Kautz et al., 2004] Cosine sphere for local shadows.
E N D
Fast Non-Linear Projections using Graphics Hardware Jean-Dominique Gascuel, Nicolas Holzschuch, Gabriel Fournier, Bernard Péroche I3D 2008
Non-linear projections: What & Why ? [wiki.panotools.org, Ben Kreunen] [lensmateonline.com]
[Kautz et al., 2004] Cosine sphere for local shadows [Osman et al., 2006] Dual parabola shadowmaps Motivations [Heidrich & Seidel,1998]Introduced Parabola envmaps
Previous work [Kautz 2004] CPU rasterization Close papers: [Fournier 2005] Indirect illumination [Loyd 2006] Logarithmic shadow maps [Hou 2006] Multi perspective reflections [Liu 2007] Non linear beam tracing GPU based, same rendering pipeline & FS
Our contributions Targeted to a specific class of non-linear projections • Single center of projection • Convex, C1, and invertible • Each triangle maps to one simple shape. • Simple equations for projected edges. • Fast ~x2 to x4 times faster than cubemaps or hemicubes. • Everything is done on the GPU
Plan • Introduction • Case studies • Sphere projection • Parabola projection • Other projections • Rendering Pipeline • Triangle Based Bounding • Quad Based Bounding • Demo & Results • Conclusion
Triangles made of known ellipses Looking at the2D screen:
Plan • Introduction • Case studies • Sphere projection • Parabola projection • Other projections • Rendering Pipeline • Triangle Based Bounding • Quad Based Bounding • Demo & Results • Conclusion
Plan • Introduction • Case studies • Sphere projection • Parabola projection • Other projections • Rendering Pipeline • Triangle Based Bounding • Quad Based Bounding • Demo & Results • Conclusion
Other projections… Fisheyes arcs with: • single minimum in normal direction, • possible maximumat extremities.
Application-driven choice • Sphere lighting solid angle x cos • Parabola envmaps less distortions • Lambert ambient occlusion equal area • Fish eye 2 Ideal photographic fish-eye
Plan • Introduction • Case studies • Rendering Pipeline • Triangle Based Bounding • Quad Based Bounding • Demo & Results • Conclusion
FS: Ray-casting FS discards pixels outside original 3D triangle • unproject: 2D fragment coordinates 3D ray direction • ray/triangle intersection
FS: Interpolations Mimic linear interpolation inside the 3D triangle Non-linear interpolation in 2D screen For all vertex varying attributes: normals, colors, texture coordinates, etc. Ray-intersect gives barycentric coordinates α, β dot product: (1, α, β) . (C0, C1-C0, C2-C0)
Plan • Introduction • Case studies • Rendering Pipeline • Triangle Based Bounding • Basic Triangle • Near plane Clipping • Concave Covering Triangle • Quad Based Bounding • Demo & Results • Conclusion
Plan • Introduction • Case studies • Rendering Pipeline • Triangle Based Bounding • Basic Triangle • Near plane Clipping • Concave Covering Triangle • Quad Based Bounding • Demo & Results • Conclusion
Plan • Introduction • Case studies • Rendering Pipeline • Triangle Based Bounding • Basic Triangle • Near plane Clipping • Concave Covering Triangle • Quad Based Bounding • Demo & Results • Conclusion
Concave Covering Triangle 2/2 1 input triangle 1 to 4 bounding triangles
Plan • Introduction • Case studies • Rendering Pipeline • Triangle Based Bounding • Quad Based Bounding • Demo & Results • Conclusion
Needed because • We don’t have easy tangents for Fisheyes projections • G80 geometry shader take worst case timing:4 output triangles in some rare case x4 slowdown everywhere in GS…
Oriented Bounding Box “Easy” for a single ellipse.
Quad coverage scheme Merge extremal points into a single aaBB
Parabola projection …Bent triangles are made of circles… • Any axis will work. optimal axis aligned bounding box
Plan • Introduction • Case studies • Rendering Pipeline • Triangle Based Bounding • Quad Based Bounding • Demo & Results • Conclusion
Example scenes Lemmings
Triangles 37% overdraw
Aligned bbox 107% overdraw But FASTER on G80
Test scene 2/4 Cubemaps/hemicube
Test scene 3/4 Columns = Thin triangles, With large deformations
Test scenes 4/4 Sphere – 560K triangles « Real life »
Facades Inside the OpenGL pipeline
Better quality than cubemaps Heidrich, Laine, Osman Lower memory footprint Low triangle scenes:~ x2 to x4 speedups (better on hi res) Cubemap vs. Parabola-map