Top Banner
[email protected] - http://liris.cnrs.fr/~fournier Laboratoire d'InfoRmatique en Image et Systèmes d'information http://liris.cnrs.fr FRE 2672 WSCGWSCG 2005 WSCG - 2/01/2005 Multi-mesh caching and hardware sampling for progressive and interactive rendering Gabriel Fournier and Bernard Péroche
24
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Gabriel.fournier@bat710.univ-lyon1.fr - fournier Laboratoire d'InfoRmatique en Image et Systèmes d'information .

[email protected] - http://liris.cnrs.fr/~fournier

Laboratoire d'InfoRmatique en Image et Systèmes d'informationhttp://liris.cnrs.fr

FRE 2672

WSCGWSCG 2005

WSCG - 2/01/2005

Multi-mesh caching and hardware sampling

for progressive and interactive rendering

Gabriel Fournier and Bernard Péroche

Page 2: Gabriel.fournier@bat710.univ-lyon1.fr - fournier Laboratoire d'InfoRmatique en Image et Systèmes d'information .

WSCG - 2/01/2005 2

Introduction

Our Goal: Interactive rendering

a few images/sec walkthrough

of triangulated scenes area light sources

on a single PC with soft shadows indirect lighting no long preprocessing

Page 3: Gabriel.fournier@bat710.univ-lyon1.fr - fournier Laboratoire d'InfoRmatique en Image et Systèmes d'information .

WSCG - 2/01/2005 3

The problem

Full lighting computations for each pixel

Too long for interactive time

Solutions : Lighting computations for only a few pixels Speed up and adaptation of light sampling Progressive improvement of the image quality

Page 4: Gabriel.fournier@bat710.univ-lyon1.fr - fournier Laboratoire d'InfoRmatique en Image et Systèmes d'information .

WSCG - 2/01/2005 4

Outline of the presentation

Previous work Our method

OverviewMulti meshMesh subdivisionHardware sampling

Results and discussions Future work

Page 5: Gabriel.fournier@bat710.univ-lyon1.fr - fournier Laboratoire d'InfoRmatique en Image et Systèmes d'information .

WSCG - 2/01/2005 5

Cache of samplesLighting cached Re-used from frame to frame- Object space partition cache :

- Irradiance caching (Ward et al. – 1988), Light vectors (Zaninetti and Péroche – 1998)

Complex interpolations

- Image cache : - Render cache (Walter et al. 1998),

Missing pixels (Render cache),

- Tapestry (Simmons and Séquin - 2000)First frames with inexact geometry

- Object space cache :- On the geometry : Shading cache (Tole et al – 2002)

Page 6: Gabriel.fournier@bat710.univ-lyon1.fr - fournier Laboratoire d'InfoRmatique en Image et Systèmes d'information .

WSCG - 2/01/2005 6

Lighting samplingWhat is sampled and interpolated ?- Single global lighting value :

- Shading cache (Tole et al. - 2002)Limited re-use of cached valueSampling density

- Multiple lighting values (direct, indirect, caustic radiance):

- Light vectors (Zaninetti and Péroche - 1998)

No method with multiple values cached on the geometry

Page 7: Gabriel.fournier@bat710.univ-lyon1.fr - fournier Laboratoire d'InfoRmatique en Image et Systèmes d'information .

WSCG - 2/01/2005 7

Indirect lighting sampling

Direct irradiance required on CPU Costly if many area lights (100 rays per light)Direct irradiance should be cached

to be re-used during indirect irradiance sampling

Page 8: Gabriel.fournier@bat710.univ-lyon1.fr - fournier Laboratoire d'InfoRmatique en Image et Systèmes d'information .

WSCG - 2/01/2005 8

Overview

Object space cache : triangle mesh over the geometry

hardware rendering, fast subdivisions and interpolations

Multiple meshes : separate storage of direct irradiance from each light source indirect irradiance

Re-use of already computed valuesDirect diffuse irradiance for the indirect oneDiffuse radiance from the previous frames

Multi-pass rendering : color / direct radiance / indirect radiance

interactivity, progressiveness

Page 9: Gabriel.fournier@bat710.univ-lyon1.fr - fournier Laboratoire d'InfoRmatique en Image et Systèmes d'information .

WSCG - 2/01/2005 9

Framework

Radiance and

Irradiance meshes

Geometrical Mesh

CPU GPU

Rendering of material reflectance

properties

Rendering of the final image

Refinement

Visible triangles set

construction

Rendering of radiance

Rendering of ID

Irradiance sampling

User interaction

Page 10: Gabriel.fournier@bat710.univ-lyon1.fr - fournier Laboratoire d'InfoRmatique en Image et Systèmes d'information .

WSCG - 2/01/2005 10

Multiple meshes Triangular mesh

Simple interpolationsFast subdivisionFast ray tracingOpenGL primitive Geometry mesh

Direct irradiance meshes for each light source

Direct diffuse radiance mesh

Indirect irradiance mesh

Page 11: Gabriel.fournier@bat710.univ-lyon1.fr - fournier Laboratoire d'InfoRmatique en Image et Systèmes d'information .

WSCG - 2/01/2005 11

Mesh example

Page 12: Gabriel.fournier@bat710.univ-lyon1.fr - fournier Laboratoire d'InfoRmatique en Image et Systèmes d'information .

WSCG - 2/01/2005 12

Direct irradiance caching Each light source sampled and cached separately Reduce the number of samples

Page 13: Gabriel.fournier@bat710.univ-lyon1.fr - fournier Laboratoire d'InfoRmatique en Image et Systèmes d'information .

WSCG - 2/01/2005 13

Priority =

max(sons’ priority)

Geometry mesh

Radiance mesh

Element to subdivide

Subdivision : element choice

Priority stored in the mesh tree leaves

visible size of the triangle maximum radiance contrast on its edge 0 if the triangle should not be subdivided

Page 14: Gabriel.fournier@bat710.univ-lyon1.fr - fournier Laboratoire d'InfoRmatique en Image et Systèmes d'information .

WSCG - 2/01/2005 14

Subdivision of a triangle if it has more than 3 visible pixels

and it is too big

or it has at least 2 required

vertices :

sampled != interpolated

or it has one edge with visible

T-vertices

Subdivision : criteria

Radiance

A

M : required vertex

B

Interpolated radiance

Sampled radiance

T-vertex

A BM

CD

N

Page 15: Gabriel.fournier@bat710.univ-lyon1.fr - fournier Laboratoire d'InfoRmatique en Image et Systèmes d'information .

WSCG - 2/01/2005 15

Subdivision : radiance difference Subdivision only if there might be a visible

differenceTone mapping of the values on screen colorUse of an experimentally built map to get the maximum

authorized difference

Maximum unnoticeable

color difference

On screen color

Del

ta m

ax

0

8

0 255

Page 16: Gabriel.fournier@bat710.univ-lyon1.fr - fournier Laboratoire d'InfoRmatique en Image et Systèmes d'information .

WSCG - 2/01/2005 16

Sampling density

Page 17: Gabriel.fournier@bat710.univ-lyon1.fr - fournier Laboratoire d'InfoRmatique en Image et Systèmes d'information .

WSCG - 2/01/2005 17

Area light source sampling

Ray tracing

Hardware sampling

Nb samples

Tim

e

Small light source bounding frustum Hardware rendering on a small image Texture mapping to weight each pixel Multiple passes to sum the image until

it is small enough to be read back

Faster than ray tracing Frees up the CPU

Object to shade

Occluder

Light source

Rendering surface

View frustum

Page 18: Gabriel.fournier@bat710.univ-lyon1.fr - fournier Laboratoire d'InfoRmatique en Image et Systèmes d'information .

WSCG - 2/01/2005 18

Indirect lighting sampling

Only 1 bounce indirect diffuse radiance being sampled

Rendering of a low detail version of the diffuse direct radiance mesh

Small part of the incoming irradiance is missing

160° field of viewObject to shade

Indirect lighting emitters

Rendering surface

View frustum

Page 19: Gabriel.fournier@bat710.univ-lyon1.fr - fournier Laboratoire d'InfoRmatique en Image et Systèmes d'information .

WSCG - 2/01/2005 19

Final image generation

Irradiance of each light sources

Indirect diffuse

irradiance

Scene description

CPU ScreenGPU1x /frame

Updated 20x /s

Updated 3x /s

Rendered 3x~15x /s

Page 20: Gabriel.fournier@bat710.univ-lyon1.fr - fournier Laboratoire d'InfoRmatique en Image et Systèmes d'information .

WSCG - 2/01/2005 20

Results

Page 21: Gabriel.fournier@bat710.univ-lyon1.fr - fournier Laboratoire d'InfoRmatique en Image et Systèmes d'information .

WSCG - 2/01/2005 21

Discussion

Pros Interactivity with exact geometryExact soft shadowsWe save some computations compared to the Shading

cache method

Cons Indirect lighting quite limited, still slowHigh memory cost 200 MB for the 8000 triangles sceneNon real time

Page 22: Gabriel.fournier@bat710.univ-lyon1.fr - fournier Laboratoire d'InfoRmatique en Image et Systèmes d'information .

WSCG - 2/01/2005 22

Conclusion and future work

Include missing part of radiance (indirect specular, caustic and indirect with more bounces)

Include a visual model to better tune the subdivision of the mesh (priority, precision)

Optimize and increase the quality of indirect lighting computations

Page 23: Gabriel.fournier@bat710.univ-lyon1.fr - fournier Laboratoire d'InfoRmatique en Image et Systèmes d'information .

WSCG - 2/01/2005 23

Questions ?

Page 24: Gabriel.fournier@bat710.univ-lyon1.fr - fournier Laboratoire d'InfoRmatique en Image et Systèmes d'information .

WSCG - 2/01/2005 24

References

Ward, Rubinstein, Clear. 1988. A ray tracing solution for diffuse interreflection. In Computer Graphics (Proceedings of SIGGRAPH 88), vol. 22, 85–92.

Zaninetti, Serpaggi, Péroche. 1998. A vector approach for global illumination in ray tracing. Computer GRaphics Forum, 17(3):149-158, 1998

Simmons, Séquin. 2000. Tapestry: A dynamic mesh-based display representation for interactive rendering. In Rendering Techniques 2000: 11th Eurographics Workshop on Rendering, 329–340.

Tole, Pellacini, Walter, P. Greenberg. 2002. Interactive global illumination in dynamic scenes. ACM transactions on graphics, 21(3) : 537-546, July 2002