[email protected] - fournier Laboratoire d'InfoRmatique en Image et Systèmes...

24
[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

Transcript of [email protected] - fournier Laboratoire d'InfoRmatique en Image et Systèmes...

[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

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

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

WSCG - 2/01/2005 4

Outline of the presentation

Previous work Our method

OverviewMulti meshMesh subdivisionHardware sampling

Results and discussions Future work

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)

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

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

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

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

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

WSCG - 2/01/2005 11

Mesh example

WSCG - 2/01/2005 12

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

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

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

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

WSCG - 2/01/2005 16

Sampling density

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

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

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

WSCG - 2/01/2005 20

Results

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

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

WSCG - 2/01/2005 23

Questions ?

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