23
Real-Time Caustics in Dynamic Scenes with Multiple Directional Lights presented by Budianto Tandianus, Henry Johan, and Hock Soon Seah School of Computer Engineering Nanyang Technological University 10 September 2010

Real-Time Caustics in Dynamic Scenes with Multiple Directional Lights

Embed Size (px)

Citation preview

Real-Time Caustics in Dynamic Scenes with Multiple Directional Lights

presented by

Budianto Tandianus, Henry Johan, and Hock Soon Seah

School of Computer Engineering

Nanyang Technological University

10 September 2010

CONTENTS

• Introduction

• Related Work

• Precomputation

• Rendering

• GPU Implementation

• Results

• Conclusions

International Conference on Entertainment Computing 2010

INTRODUCTION

• Photo-realistic rendering : generate images which are

visually indistinguishable to what we see in real-life

• Applications : games, movies, virtual reality

• Some real-life optical effects :

– Reflection

– Refraction

– Caustics : light focused on a surface

due to the refractive material and/or

reflective surface of a caustic object

International Conference on Entertainment Computing 2010

MOTIVATION

• Existing approaches :

– Do not support real-time caustics rendering under

environment illumination

– Mostly support one or few light sources

• Our goals :

– Real-time caustics under

environment illumination

– Also able to render volumetric

caustics

International Conference on Entertainment Computing 2010

RELATED WORK (1/2)

• Photon Mapping (Jensen 1996,

Gunther et al. 2004, Purcell et al. 2005,

Zhou et al. 2008)

– Accurate caustics

– Interactive rate (below 30

frames per second)

• Image-based (Wyman and Davis 2006,

Shah and Konttinen 2007, Sun et al. 2008)

– GPU based

– Real-time

– Approximate caustics

International Conference on Entertainment Computing 2010

Gunther et al. 2004

Shah and Konttinen

2007

RELATED WORK (2/2)

• Precomputation (Wyman et al. 2004)

– Precompute the caustic patterns on caustic

spheres

• Uniform radii difference :

– ri = radius of i-th sphere

– rmin = radius of the first/smallest sphere

– runi= radius difference

• Inefficient storage

– Light attenuates quadratically

– Implement using ray tracing in a CPU cluster

International Conference on Entertainment Computing 2010

FEATURES OF OUR METHOD

• Precompute caustic patterns

– Similar approach as Wyman et al.’s (2004)

• Efficient storage

– Determine the radii of caustic spheres taking into

account light attenuation

• Multiple directional lights and environment

illumination caustics rendering taking into account

occlusion

• Volumetric caustics

• Real-time GPU implementation

International Conference on Entertainment Computing 2010

MAIN STEPS OF OUR METHOD

International Conference on Entertainment Computing 2010

Precompute

caustic patterns

Segment

environment map

Compute radiance of each directional light

approximating the environment illumination

Compute caustic spheres of each directional light

approximating the environment illumination

Generate caustics cast on surfaces and/or volumetric caustics

Offline

Precomputation

Rendering

• Precompute the caustic patterns using

photon mapping for 26 directional light sources

• We use the quadratic function to compute the

radii of the caustic spheres

• Use less memory compared to

uniform radii (Wyman et al. 2004) for

the same visual quality

CAUSTIC PATTERNS

PRECOMPUTATION (1/2)

International Conference on Entertainment Computing 2010

ri = radius of i-th sphere

rmin = radius of the first/smallest sphere

rmax = radius of the last/biggest sphere

s = number of spheres

CAUSTIC PATTERNS

PRECOMPUTATION (2/2)

International Conference on Entertainment Computing 2010

0

0 2π

• Store the caustic spheres as images in latitude-longitude format

0

0 2π

caustic pattern images of two

directional lights

Caustic object

3

RENDERING UNDER ONE

DIRECTIONAL LIGHT (1/2)

International Conference on Entertainment Computing 2010

a. Rotate the precomputed caustic patterns such that the

predefined light direction of that caustic patterns coincide

with the incoming light direction and blend them

b. Use bilinear interpolation to interpolate caustic patterns of

the nearest four light directions

1

Incoming light

direction

2

Predefined directions

and their caustic

patterns

RENDERING UNDER ONE

DIRECTIONAL LIGHT (2/2)

• Afterward, compute the caustics on the points on the

surface

– Render the scene omnidirectionally into a cube map

– Based on the information in the cube map (e.g. depth),

sample the caustic spheres

• Volumetric caustics are computed

by sampling the caustic spheres at

the points along the viewing ray

International Conference on Entertainment Computing 2010

RENDERING UNDER MULTIPLE

DIRECTIONAL LIGHTS

• Apply the one directional light algorithm for all

directional lights in the scene

– Accumulate the results

• Application : approximate

caustics under environment

illumination

– Environment cube map

– Approximate as a set of

directional lights

International Conference on Entertainment Computing 2010

RADIANCE SAMPLING AND

OCCLUSION HANDLING

• During the rendering, sample the radiance of each

region by rendering the region

– The surrounding occluders are rendered as black

color

– The radiance is the total unoccluded pixels

International Conference on Entertainment Computing 2010

GPU IMPLEMENTATION

• Store the caustic spheres in 3D textures

– Automatic trilinear filtering by GPU

• Compute and accumulate the caustic patterns of all light

directions into a compiled 3D texture

• Render in multiple passes

– Each pass corresponds to the caustic patterns computation

for one light direction

• Directional light radiance computation

– Render each light region to a layer of a texture array

– Use mipmapping to compute its average, and multiply the radiance

average with the number of pixels of that region in order to compute

the total unoccluded radiance

International Conference on Entertainment Computing 2010

RESULTS (1/3)

• PC specifications :

– Intel Core i7 2.67 GHz

– Nvidia GTX 285

• Program parameters :

– Image size : 1024 x 768

– Texture array size : 32 x 32

• Performance (for 24 Directional lights and 16 caustic

spheres) :

– Only cast caustics : 29.9 frames per second

• Mental ray needs 4 minute in order to render each frame

– Cast caustics and volumetric caustics : 14.57 frames per second

International Conference on Entertainment Computing 2010

RESULTS (2/3)

(a) Quadratic radii (s = 16) (b) Uniform radii (s = 16) (c) Uniform Radii (s = 32)

(d) Mental ray (without (e) Occlusion – Quadratic (f) mental ray (with

occlusion) radii (s = 16) occlusion)

International Conference on Entertainment Computing 2010

RESULTS (3/3)

(a) Quadratic radii (s = 16) (b) Uniform radii (s = 16) (c) Uniform Radii (s = 32)

(d) Mental ray (without (e) Occlusion – Quadratic (f) mental ray (with

occlusion) radii (s = 16) occlusion)

International Conference on Entertainment Computing 2010

VIDEO

CONCLUSIONS

• Our technique can generate approximate caustics

under environment illumination taking into account

occlusion in real-time

• Efficient GPU implementation

• Environment map segmentation and sampling taking

into account occlusion

• Using quadratic radii, we are able to achieve similar

visual quality to the uniform radii with less caustic

spheres thus our technique use less memory

• The result of our visual quality is similar to the mental

ray results and our technique is in real-time

International Conference on Entertainment Computing 2010

FUTURE WORK

• Develop efficient technique to compress the

precomputed caustic patterns

• Investigate the technique to handle deformable

caustic objects

International Conference on Entertainment Computing 2010

ACKNOWLEDGMENTS

• Supported by the National Research Foundation

grant, which is administered by the Media

Development Authority Interactive Digital Media

Programme Office, MDA (IDMPO)

• Paul Debevec for the environment cube maps

• Chris Wyman for the GPU implementation of

refraction

• Stanford Computer Graphics Laboratory for the 3D

models

International Conference on Entertainment Computing 2010

THE END

• Q & A

International Conference on Entertainment Computing 2010