Title: Fast Non-Linear Projections using Graphics Hardware
1Fast Non-Linear Projections using Graphics
Hardware
- Jean-Dominique Gascuel, Nicolas Holzschuch,
Gabriel Fournier, Bernard Péroche - I3D 2008
2Non-linear projections What Why ?
wiki.panotools.org, Ben Kreunen
lensmateonline.com
3Motivations
Heidrich Seidel,1998Introduced Parabola
envmaps
4Previous 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
5Our 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
6Plan
- Introduction
- Case studies
- Sphere projection
- Parabola projection
- Other projections
- Rendering Pipeline
- Triangle Based Bounding
- Quad Based Bounding
- Demo Results
- Conclusion
7Sphere projection 1/5
8Sphere projection 2/5
9Sphere projection 3/5
10Sphere projection 4/5
11Sphere projection 5/5
12Triangles made of known ellipses
13Plan
- Introduction
- Case studies
- Sphere projection
- Parabola projection
- Other projections
- Rendering Pipeline
- Triangle Based Bounding
- Quad Based Bounding
- Demo Results
- Conclusion
14Parabola projection 1/3
15Parabola projection 2/3
16Parabola projection 3/3
17Parabola 3D line ? 2D circle 1/2
18Triangles made of arcs 2/2
19Plan
- Introduction
- Case studies
- Sphere projection
- Parabola projection
- Other projections
- Rendering Pipeline
- Triangle Based Bounding
- Quad Based Bounding
- Demo Results
- Conclusion
20Other projections
- Fisheyes
- arcs with
- single minimum in normal direction,
- possible maximumat extremities.
21Application-driven choice
- Sphere
- lighting ? solid angle x cos
- Parabola
- envmaps ? less distortions
- Lambert
- ambient occlusion ? equal area
- Fish eye 2
- Ideal photographic fish-eye
22Plan
- Introduction
- Case studies
- Rendering Pipeline
- Triangle Based Bounding
- Quad Based Bounding
- Demo Results
- Conclusion
23Rendering strategy
24FS Ray-casting
- FS discards pixels outside original 3D triangle
- unproject 2D fragment coordinates ? 3D ray
direction - ray/triangle intersection
25FS 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 a, ß
- ? dot product (1, a, ß) . (C0, C1-C0, C2-C0)
26Plan
- Introduction
- Case studies
- Rendering Pipeline
- Triangle Based Bounding
- Basic Triangle
- Near plane Clipping
- Concave Covering Triangle
- Quad Based Bounding
- Demo Results
- Conclusion
27Bounding triangle 1/2
28Bounding Triangle 2/2
29Triangle Covering
30Plan
- Introduction
- Case studies
- Rendering Pipeline
- Triangle Based Bounding
- Basic Triangle
- Near plane Clipping
- Concave Covering Triangle
- Quad Based Bounding
- Demo Results
- Conclusion
31Bellow horizon
32Camera Plane Clipping 1/3
33Camera Plane Clipping 2/3
34Camera Plane Clipping 3/3
35Plan
- Introduction
- Case studies
- Rendering Pipeline
- Triangle Based Bounding
- Basic Triangle
- Near plane Clipping
- Concave Covering Triangle
- Quad Based Bounding
- Demo Results
- Conclusion
36Concave Covering Triangle 1/2
37Concave Covering Triangle 2/2
- 1 input triangle ? 1 to 4 bounding triangles
38Plan
- Introduction
- Case studies
- Rendering Pipeline
- Triangle Based Bounding
- Quad Based Bounding
- Demo Results
- Conclusion
39Needed because
- We dont have easy tangents for Fisheyes
projections - G80 geometry shader take worst case timing4
output triangles in some rare case ? x4 slowdown
everywhere in GS
40Oriented Bounding Box
- Easy for a single ellipse.
41Quad coverage scheme
- Merge extremal points into a single aaBB
42Parabola projection
- Bent triangles are made of circles
- Any axis will work.
- ? optimal axis aligned bounding box
43Generic bounding scheme
44Plan
- Introduction
- Case studies
- Rendering Pipeline
- Triangle Based Bounding
- Quad Based Bounding
- Demo Results
- Conclusion
45Example scenes
46Triangles
47Aligned bbox
107 overdraw But FASTER on G80
48Test scene 2/4
49Test scene 3/4
- Columns Thin triangles,
- With large deformations
50Test scenes 4/4
- Sphere 560K triangles
- Â Real lifeÂ
51Inside the OpenGL pipeline
52Cubemap vs. Parabola-map
- Better quality than cubemaps
- Heidrich, Laine, Osman
- Lower memory footprint
- Low triangle scenes x2 to x4 speedups (better
on hi res)
Color(ms) Depth (ms) Coverage(ms)
6 x 512x512 cubemaps2x 512x512 parabola 2590716 548 157 490 121
6 x 16x16 cubemaps2 x 16x16 parabola 8.83.4 5.2 2.6 4.8 2.2
53Hemicube vs non-linear projection
Color(ms) Depth (ms) Coverage(ms)
5 512 512 hemicube 1 512 512 parabola 1 512 512 sphere map 1 512 512 Lambert 1500 375 433 396 375 79 71 80 320 61 61 67
5 16 16 hemicube 1 16 16 parabola 7.1 2.5 4.3 1.9 4.0 1.6
- Low triangle scenes
- x2.5 to x5 speedups (better on hi res)
54Plan
- Introduction
- Case studies
- Rendering Pipeline
- Triangle Based Bounding
- Quad Based Bounding
- Demo Results
- Conclusion
55Conclusion
- Implemented Non-linear projections on GPU
- Specific class of projections, useful for many
applications - Tight bounding shapes
- Faster than cubemaps
- Projections
- Parabola optimal BB ? fast overall computations
- Sphere sub-optimal BB, still fast
- Other (Lambert/Fisheye) generic BB, lots of
overdraw - Full sources at http//artis.inrialpes.fr/Publicat
ions
56Future Directions
- Better quad bounding for Lambert fisheye
- Should be Sphere projection
- Improve GS bottleneck
- Faster, not worst case based (NVidias job)
- Multi pass triangle bounding
- Multiple layers rendering (all faces at once)
- Deferred shading
- Benchmark within a local/global lighting
framework.