Global Illumination with a Virtual Light Field Mel Slater Jesper Mortensen Pankaj Khanna Insu Yu...

44
Global Illumination Global Illumination with a Virtual Light with a Virtual Light Field Field Mel Slater Jesper Mortensen Pankaj Khanna Insu Yu Dept of Computer Science University College London [email protected] GR/ R13685/01 Research funded by:

Transcript of Global Illumination with a Virtual Light Field Mel Slater Jesper Mortensen Pankaj Khanna Insu Yu...

Page 1: Global Illumination with a Virtual Light Field Mel Slater Jesper Mortensen Pankaj Khanna Insu Yu Dept of Computer Science University College London Vlfproject@cs.ucl.ac.uk.

Global Illumination with a Global Illumination with a Virtual Light FieldVirtual Light Field

Mel Slater

Jesper Mortensen

Pankaj Khanna

Insu Yu

Dept of Computer ScienceUniversity College London

[email protected]

GR/R13685/01

Research funded by:

Page 2: Global Illumination with a Virtual Light Field Mel Slater Jesper Mortensen Pankaj Khanna Insu Yu Dept of Computer Science University College London Vlfproject@cs.ucl.ac.uk.

IntroductionIntroduction

ProblemBackground – Light FieldFundamental data structures & algorithmImplementation IssuesResultsConclusions

Page 3: Global Illumination with a Virtual Light Field Mel Slater Jesper Mortensen Pankaj Khanna Insu Yu Dept of Computer Science University College London Vlfproject@cs.ucl.ac.uk.

Problem: Global Illumination Problem: Global Illumination in Real-Timein Real-Time

The goal of this research is to achieve real-time walkthough of globally illuminated scenes.– Interaction between any type of surface

properties (I.e., BRDFs)Technically – to provide a fast approximate

solution of the rendering equation.– L(p, ) = Le(p, ) + f(p, i , ) L(p, i ) cosi di

Page 4: Global Illumination with a Virtual Light Field Mel Slater Jesper Mortensen Pankaj Khanna Insu Yu Dept of Computer Science University College London Vlfproject@cs.ucl.ac.uk.

Global IlluminationGlobal Illumination Ray tracing

– highly view dependent, models only specular reflection

Path tracing– Monte Carlo solution to rendering equation (view

dependent) Radiosity

– view independent, models only diffuse reflection Photon mapping/Monte Carlo

– rays through light emitters (view independent) view dependent ray tracing phase

Page 5: Global Illumination with a Virtual Light Field Mel Slater Jesper Mortensen Pankaj Khanna Insu Yu Dept of Computer Science University College London Vlfproject@cs.ucl.ac.uk.

Faster Global Illumination?Faster Global Illumination? Caching – reuse elements of a G.I. for one view in other

views. Ward, G. and Simmons, M. (1999) The Holodeck Ray Cache: An

Interactive Rendering System for Global Illumination in Nondiffuse Environments, ACM TOG, 18(4):361-98.

Precompute – e.g., estimate point lights that give similar solution to global illumination.

Walter, B., Alppay, G., Lafortune, E.P.F., Fernandez, S. and Greenberg, D. P. (1997) Fitting virtual lights for non-diffuse walkthroughs, SIGGRAPH 97, 45–48.

H/W ray tracing – implement BSP ray tracing in hardware efficient way.

Wald, I., Slusallek, P., Benthin, C., Wagner, M.: Interactive Rendering with Coherent Ray Tracing, Eurographics 2001 Proceedings.

Page 6: Global Illumination with a Virtual Light Field Mel Slater Jesper Mortensen Pankaj Khanna Insu Yu Dept of Computer Science University College London Vlfproject@cs.ucl.ac.uk.

Virtual Light Field (VLF)Virtual Light Field (VLF)

Gortler used term ‘virtual light field’ to refer to light field for a synthetic scene.

We extend the term to mean a LF for a virtual scene– But without the use of a separate rendering

system– With illumination computed within the LF itself.

Page 7: Global Illumination with a Virtual Light Field Mel Slater Jesper Mortensen Pankaj Khanna Insu Yu Dept of Computer Science University College London Vlfproject@cs.ucl.ac.uk.

Virtual Light FieldVirtual Light Field

Any ray is a point in 4D space R4

Suppose ‘all rays’ can (somehow) be represented.

Consider one ray:-

t1 t20

1t3 t4

Page 8: Global Illumination with a Virtual Light Field Mel Slater Jesper Mortensen Pankaj Khanna Insu Yu Dept of Computer Science University College London Vlfproject@cs.ucl.ac.uk.

Virtual Light Field: Basic Virtual Light Field: Basic ConceptsConcepts

Discrete representation of all rays in a scene All rays = union of parallel subfields (PSF) Parallel subfield is a rectangular grid of rays all in the

same direction Each ray is segmented by the objects it intersects Light is propagated out from light sources following

the paths defined by the segmented rays The rays are used as approximation to true rays Rendering achieved in manner similar to normal light

field.

Page 9: Global Illumination with a Virtual Light Field Mel Slater Jesper Mortensen Pankaj Khanna Insu Yu Dept of Computer Science University College London Vlfproject@cs.ucl.ac.uk.

Use Ray ApproximationsUse Ray Approximations

Approximate each ‘true’ ray by its nearest ray in the collection of all rays

Page 10: Global Illumination with a Virtual Light Field Mel Slater Jesper Mortensen Pankaj Khanna Insu Yu Dept of Computer Science University College London Vlfproject@cs.ucl.ac.uk.

Use Ray ApproximationsUse Ray Approximations

Perfect specular reflection– use closest approximate ray to the true reflected

ray

Diffuse reflection– use all rays through the intersection point

Page 11: Global Illumination with a Virtual Light Field Mel Slater Jesper Mortensen Pankaj Khanna Insu Yu Dept of Computer Science University College London Vlfproject@cs.ucl.ac.uk.

Use Ray ApproximationsUse Ray Approximations

Perfect specular reflection

Page 12: Global Illumination with a Virtual Light Field Mel Slater Jesper Mortensen Pankaj Khanna Insu Yu Dept of Computer Science University College London Vlfproject@cs.ucl.ac.uk.

Use Ray ApproximationsUse Ray Approximations

Perfect specular reflection– use closest approximate ray to the true reflected

ray

Page 13: Global Illumination with a Virtual Light Field Mel Slater Jesper Mortensen Pankaj Khanna Insu Yu Dept of Computer Science University College London Vlfproject@cs.ucl.ac.uk.

Use Ray ApproximationsUse Ray Approximations

Perfect specular reflection– use closest approximate ray to the true reflected

ray

Diffuse reflection– use all rays through the intersection point

Page 14: Global Illumination with a Virtual Light Field Mel Slater Jesper Mortensen Pankaj Khanna Insu Yu Dept of Computer Science University College London Vlfproject@cs.ucl.ac.uk.

Spherical Angle Spherical Angle RepresentationRepresentation

Base is rotated through ‘all’ spherical angles

base

z

y

x

Spherical angles vary ‘uniformly’ cover the hemisphere

Page 15: Global Illumination with a Virtual Light Field Mel Slater Jesper Mortensen Pankaj Khanna Insu Yu Dept of Computer Science University College London Vlfproject@cs.ucl.ac.uk.

Scene CoveredScene Covered Each box is one parallel subfield

– a parallel subfield has all rays parallel total light field = set of all parallel subfields (i,j,,)

Verticalrays

Page 16: Global Illumination with a Virtual Light Field Mel Slater Jesper Mortensen Pankaj Khanna Insu Yu Dept of Computer Science University College London Vlfproject@cs.ucl.ac.uk.

Rendering into VLF is 2D Rendering into VLF is 2D RasterisationRasterisation

Vertical subfield rendering is equivalent to rasterisation

Any other angle result can be obtained by rotation– Standard hardware can be used

geometry (rotation) raster-scan + z-buffer

z

y

x

Page 17: Global Illumination with a Virtual Light Field Mel Slater Jesper Mortensen Pankaj Khanna Insu Yu Dept of Computer Science University College London Vlfproject@cs.ucl.ac.uk.

VLF OverviewVLF Overview

Rasterisation– Precomputes all ray object intersections to segment the

rays

Propagation– Propagates light out from the light sources until

convergence

Rendering– Uses the radiance stored in the ray segments to

reconstruct an image

Page 18: Global Illumination with a Virtual Light Field Mel Slater Jesper Mortensen Pankaj Khanna Insu Yu Dept of Computer Science University College London Vlfproject@cs.ucl.ac.uk.

Tiling Approach – Exploit Tiling Approach – Exploit CoherenceCoherence

Divide each PSF into tiles, in 3D these are tubes

For each PSF{for each object

propagate();}

}

Page 19: Global Illumination with a Virtual Light Field Mel Slater Jesper Mortensen Pankaj Khanna Insu Yu Dept of Computer Science University College London Vlfproject@cs.ucl.ac.uk.

TilingTiling

The NN resolution of the PSF is divided into square tiles of resolution MM (M<N)

PSF

Page 20: Global Illumination with a Virtual Light Field Mel Slater Jesper Mortensen Pankaj Khanna Insu Yu Dept of Computer Science University College London Vlfproject@cs.ucl.ac.uk.

TilingTiling

The NN resolution of the PSF is divided into square tiles of resolution MM (M<N)

Each tile maintains a listof object representations:

PSF

Page 21: Global Illumination with a Virtual Light Field Mel Slater Jesper Mortensen Pankaj Khanna Insu Yu Dept of Computer Science University College London Vlfproject@cs.ucl.ac.uk.

TilingTiling

The NN resolution of the PSF is divided into square tiles of resolution MM (M<N)

Each tile maintains a listof object representations:{ u_short object_id; EdgeTable visibility_mask; Image radiance; Image unshot_radiance;}

PSF

Objects are sampled at full PSF resolution

Images may be sampled at less than full resolution

Page 22: Global Illumination with a Virtual Light Field Mel Slater Jesper Mortensen Pankaj Khanna Insu Yu Dept of Computer Science University College London Vlfproject@cs.ucl.ac.uk.

PSF (S)

tile

Propagationrun through each tilein each PSF, propagatingand storing radiancefor objects in the tiles

Page 23: Global Illumination with a Virtual Light Field Mel Slater Jesper Mortensen Pankaj Khanna Insu Yu Dept of Computer Science University College London Vlfproject@cs.ucl.ac.uk.

PSF (S)

tile

Propagationrun through each tilein each PSF, propagatingand storing radiancefor objects in the tiles

Page 24: Global Illumination with a Virtual Light Field Mel Slater Jesper Mortensen Pankaj Khanna Insu Yu Dept of Computer Science University College London Vlfproject@cs.ucl.ac.uk.

PSF (S)

tile

Propagationrun through each tilein each PSF, propagatingand storing radiancefor objects in the tiles

Page 25: Global Illumination with a Virtual Light Field Mel Slater Jesper Mortensen Pankaj Khanna Insu Yu Dept of Computer Science University College London Vlfproject@cs.ucl.ac.uk.

PSF (S)

tile

Propagationrun through each tilein each PSF, propagatingand storing radiancefor objects in the tiles

Page 26: Global Illumination with a Virtual Light Field Mel Slater Jesper Mortensen Pankaj Khanna Insu Yu Dept of Computer Science University College London Vlfproject@cs.ucl.ac.uk.

PSF (S)

tile

PSF (R)

For specular – compute new PSF and store unshot radiance for same surface in respective tile.

Page 27: Global Illumination with a Virtual Light Field Mel Slater Jesper Mortensen Pankaj Khanna Insu Yu Dept of Computer Science University College London Vlfproject@cs.ucl.ac.uk.

PSF (S)

tile

PSF (R)

For diffuse – accumulate radiancesurface map for distribution at nextiteration.

Page 28: Global Illumination with a Virtual Light Field Mel Slater Jesper Mortensen Pankaj Khanna Insu Yu Dept of Computer Science University College London Vlfproject@cs.ucl.ac.uk.

PSF (S)

tile

PSF (R)

For diffuse – accumulate radiancesurface map for distribution at nextiteration.

Page 29: Global Illumination with a Virtual Light Field Mel Slater Jesper Mortensen Pankaj Khanna Insu Yu Dept of Computer Science University College London Vlfproject@cs.ucl.ac.uk.

Propagation …Propagation …

No need to keep surfaces sorted within a tile

Construct an ‘exchange buffer’ on the fly– For each surface can use z-buffer to compute– which other surfaces it can exchange energy

with along a tile.

Page 30: Global Illumination with a Virtual Light Field Mel Slater Jesper Mortensen Pankaj Khanna Insu Yu Dept of Computer Science University College London Vlfproject@cs.ucl.ac.uk.

‘‘Uniform’ Subdivisions on a Uniform’ Subdivisions on a HemisphereHemisphere

Major issue is to get ‘uniform’ partition of a hemisphere into ‘data points’ p=(x,y,z)– These correspond to the PSF directions

Problem – given any query point on the hemisphere find the nearest data point in (fast!) constant time.

Can be done in constant time using image based method:– Slater, M. (2002) Constant Time Queries on Uniformly

Distributed Points on a Hemisphere, Journal of Graphics Tools, 7(1):33-44.

Page 31: Global Illumination with a Virtual Light Field Mel Slater Jesper Mortensen Pankaj Khanna Insu Yu Dept of Computer Science University College London Vlfproject@cs.ucl.ac.uk.

Implementation IssuesImplementation Issues

Getting good specular reflections– Propagation approximates radiance on diffuse

and specular surfaces– To get exact specular reflections backwards ray

trace to a diffuse surface:

Radiance on the rays will beInaccurate…

Page 32: Global Illumination with a Virtual Light Field Mel Slater Jesper Mortensen Pankaj Khanna Insu Yu Dept of Computer Science University College London Vlfproject@cs.ucl.ac.uk.

Implementation IssuesImplementation Issues

Getting good specular reflections– Propagation approximates radiance on diffuse

and specular surfaces– To get exact specular reflections backwards ray

trace to a diffuse surface:

Follow exact ray paths…

Page 33: Global Illumination with a Virtual Light Field Mel Slater Jesper Mortensen Pankaj Khanna Insu Yu Dept of Computer Science University College London Vlfproject@cs.ucl.ac.uk.

Implementation IssuesImplementation Issues

Getting good specular reflections– Propagation approximates radiance on diffuse

and specular surfaces– To get exact specular reflections backwards ray

trace to a diffuse surface:

Follow exact ray paths…

Page 34: Global Illumination with a Virtual Light Field Mel Slater Jesper Mortensen Pankaj Khanna Insu Yu Dept of Computer Science University College London Vlfproject@cs.ucl.ac.uk.

Implementation IssuesImplementation Issues

Getting good specular reflections– Propagation approximates radiance on diffuse

and specular surfaces– To get exact specular reflections backwards ray

trace to a diffuse surface:

until diffuse surface is hit…

Page 35: Global Illumination with a Virtual Light Field Mel Slater Jesper Mortensen Pankaj Khanna Insu Yu Dept of Computer Science University College London Vlfproject@cs.ucl.ac.uk.

•No shadow rays•Fast ray traversal

Implementation IssuesImplementation Issues

Getting good specular reflections– Propagation approximates radiance on diffuse

and specular surfaces– To get exact specular reflections backwards ray

trace to a diffuse surface:

until diffuse surface is hit…

Page 36: Global Illumination with a Virtual Light Field Mel Slater Jesper Mortensen Pankaj Khanna Insu Yu Dept of Computer Science University College London Vlfproject@cs.ucl.ac.uk.

RenderingRendering

4 Methods1. Render only from ray-information in tiles

2. Texture mapping for diffuse surfaces

3. Backwards ray tracing for specular surfaces

4. Progressive (1 or 2 + 3 when still)

Page 37: Global Illumination with a Virtual Light Field Mel Slater Jesper Mortensen Pankaj Khanna Insu Yu Dept of Computer Science University College London Vlfproject@cs.ucl.ac.uk.

ResultsResults

A simple Cornell type scene with 6 specular reflectors. Propagation Time = 16 hours. FPS =8.5

Page 38: Global Illumination with a Virtual Light Field Mel Slater Jesper Mortensen Pankaj Khanna Insu Yu Dept of Computer Science University College London Vlfproject@cs.ucl.ac.uk.

Light field(2.1 fps) Diffuse textures(9.8 fps)

Raytracing (0.2 fps) H/W raytracing(19.2fps)

Page 39: Global Illumination with a Virtual Light Field Mel Slater Jesper Mortensen Pankaj Khanna Insu Yu Dept of Computer Science University College London Vlfproject@cs.ucl.ac.uk.

 

Office test scene

Page 40: Global Illumination with a Virtual Light Field Mel Slater Jesper Mortensen Pankaj Khanna Insu Yu Dept of Computer Science University College London Vlfproject@cs.ucl.ac.uk.

Caustic Test SceneCaustic Test Scene

Smits, B. and Jensen, H.W. (2000) Global Illumination Test Scenes; Tech. Rep. UUCS-00-013, Computer Science Department, University of Utah, June 2000.

Using Light Field Original Test Image

Propagation time = 33.53 hours FPS =18.2

Page 41: Global Illumination with a Virtual Light Field Mel Slater Jesper Mortensen Pankaj Khanna Insu Yu Dept of Computer Science University College London Vlfproject@cs.ucl.ac.uk.

Some PropertiesSome Properties Propagation time is long (but only has to be done

once). Memory requirement is large. Propagation time is quadratic in number of

surfaces Memory is linear in numbers of polygons Smaller tile size results in less polygons per tile,

reduces propagation time, increases memory Rendering is fast for global illumination.

Page 42: Global Illumination with a Virtual Light Field Mel Slater Jesper Mortensen Pankaj Khanna Insu Yu Dept of Computer Science University College London Vlfproject@cs.ucl.ac.uk.

VideosVideos

Page 43: Global Illumination with a Virtual Light Field Mel Slater Jesper Mortensen Pankaj Khanna Insu Yu Dept of Computer Science University College London Vlfproject@cs.ucl.ac.uk.

ConclusionsConclusions

An experimental methodShows some promise for fast walkthrough

for globally illuminated scenesProblems remain in huge memory

requirements and long propagation timesFurther work….in progress.

Page 44: Global Illumination with a Virtual Light Field Mel Slater Jesper Mortensen Pankaj Khanna Insu Yu Dept of Computer Science University College London Vlfproject@cs.ucl.ac.uk.

Additional materialsAdditional materials

Tech papersPresentationsVideos, images etc.

http://www.cs.ucl.ac.uk/research/vr/Projects/VLF/Media/