previous lecture the 7d plenoptic function, indexing all light. lightfields: a 4d (not 5d!) data...

64
Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region and permits reconstruction of arbitrary synthetic viewpoints. Can be built into a modern camera. Capturing and recreating visual content involves a combination of geometric and image-based methods. Lytro Camera

Upload: jason-hicks

Post on 15-Jan-2016

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

Previous LectureThe 7d plenoptic function, indexing all light.

Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region and permits reconstruction of arbitrary synthetic viewpoints. Can be built into a modern camera.

Capturing and recreating visual contentinvolves a combination of geometricand image-based methods.

Lytro Camera

Page 2: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

Image-Based Lighting

cs129: Computational PhotographyJames Hays, Brown, Fall 2012

© Eirik Holmøyvik

Slides from Alexei Efros and Paul Debevec

Page 3: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

Inserting Synthetic Objects

Why does this look so bad?• Wrong orientation• Wrong lighting• No shadows

Page 4: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

SolutionsWrong Camera Orientation

• Estimate correct camera orientation and render object– Requires camera calibration to do it right

Lighting & Shadows• Estimate (eyeball) all the light sources in the scene and

simulate it in your virtual rendering

But what happens if lighting is complex? • Extended light sources, mutual illumination, etc.

Page 5: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

Environment Maps

Simple solution for shiny objects• Models complex lighting as a panoramic image• i.e. amount of radiance coming in from each direction• A plenoptic function!!!

Page 6: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

reflective surface

viewer

environment texture image

v

n

r

projector function converts reflection vector to texture image (u, v)

Environment Mapping

Reflected ray: r=2(n·v)n-v

Texture is transferred in the direction of the reflected ray from the environment map onto the objectWhat is in the map?

Page 7: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

What approximations are made?The map should contain a view of the world with the

point of interest on the object as the Center of Projection• We can’t store a separate map for each point, so one map is

used with the COP at the center of the object• Introduces distortions in the reflection, but we usually don’t

notice• Distortions are minimized for a small object in a large room

The object will not reflect itself!

Page 8: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

Environment MapsThe environment map may take various forms:

• Cubic mapping• Spherical mapping• other

Describes the shape of the surface on which the map “resides”

Determines how the map is generated and how it is indexed

Page 9: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

Cubic Mapping

The map resides on the surfaces of a cube around the object• Typically, align the faces of the cube with the coordinate axes

To generate the map:• For each face of the cube, render the world from the center of

the object with the cube face as the image plane– Rendering can be arbitrarily complex (it’s off-line)

To use the map:• Index the R ray into the correct cube face• Compute texture coordinates

Page 10: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

Cubic Map Example

Page 11: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

Sphere MappingMap lives on a sphere

To generate the map:• Render a spherical panorama from the designed center

point

To use the map:• Use the orientation of the R ray to index directly into the

sphere

Page 12: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

Example

Page 13: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

What about real scenes?

From Flight of the Navigator

Page 14: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

What about real scenes?

from Terminator 2

Page 15: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

Real environment mapsWe can use photographs to capture environment maps

How do we deal with light sources? Sun, lights, etc?• They are much much brighter than the rest of the

enviarnment

User High Dynamic Range photography, of course!

Several ways to acquire environment maps:• Stitching mosaics• Fisheye lens• Mirrored Balls

Page 16: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

Stitching HDR mosaicsStitching HDR mosaics

http://www.gregdowning.com/HDRI/stitched/http://www.gregdowning.com/HDRI/stitched/

Page 17: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

Scanning Panoramic CamerasScanning Panoramic CamerasPros:

very high res (10K x 7K+)Full sphere in one scan – no stitchingGood dynamic range, some are HDR

Issues:More expensiveScans take a while

Companies: Panoscan, Sphereon

Pros:very high res (10K x 7K+)Full sphere in one scan – no stitchingGood dynamic range, some are HDR

Issues:More expensiveScans take a while

Companies: Panoscan, Sphereon

Page 18: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

Fisheye ImagesFisheye Images

Page 19: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

Mirrored SphereMirrored Sphere

Page 20: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region
Page 21: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region
Page 22: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

Sources of Mirrored BallsSources of Mirrored Balls

2-inch chrome balls ~ $20 ea. e.g. McMaster-Carr Supply Company

www.mcmaster.com

6-12 inch large gazing balls

Hollow Spheres, 2in – 4in e.g. Dube Juggling Equipment

www.dube.com

FAQ on http://ict.debevec.org/~debevec/HDRShop/main-pages/tutorials.html

2-inch chrome balls ~ $20 ea. e.g. McMaster-Carr Supply Company

www.mcmaster.com

6-12 inch large gazing balls

Hollow Spheres, 2in – 4in e.g. Dube Juggling Equipment

www.dube.com

FAQ on http://ict.debevec.org/~debevec/HDRShop/main-pages/tutorials.html

Page 23: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

0.34 0.34

0.580.58

=> 59% Reflective=> 59% Reflective

Calibrating Mirrored Sphere Reflectivity

Calibrating Mirrored Sphere Reflectivity

Page 24: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

Real-World HDR Lighting Environments

Lighting Environments from the Light Probe Image Gallery:http://www.debevec.org/Probes/Lighting Environments from the Light Probe Image Gallery:http://www.debevec.org/Probes/

FunstonBeach

UffiziGallery

EucalyptusGrove

GraceCathedral

Page 25: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

Acquiring the Light ProbeAcquiring the Light Probe

Page 26: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

Assembling the Light ProbeAssembling the Light Probe

Page 27: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

Not just shiny…Not just shiny…

We have captured a true radiance map

We can treat it as an extended (e.g spherical) light source

Can use Global Illumination to simulate light transport in the scene So, all objects (not just shiny) can be

lighted What’s the limitation?

We have captured a true radiance map

We can treat it as an extended (e.g spherical) light source

Can use Global Illumination to simulate light transport in the scene So, all objects (not just shiny) can be

lighted What’s the limitation?

Page 28: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

Illumination ResultsIllumination Results

Page 29: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

Comparison: Radiance map versus single imageComparison: Radiance map versus single image

Page 30: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

Putting it all togetherPutting it all together

Synthetic Objects +Real light!

Synthetic Objects +Real light!

Page 31: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

CG Objects Illuminated by a Traditional CG Light Source

CG Objects Illuminated by a Traditional CG Light Source

Page 32: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

Paul Debevec. A Tutorial on Image-Based Lighting. IEEE Computer Graphics and Applications, Jan/Feb 2002.

Paul Debevec. A Tutorial on Image-Based Lighting. IEEE Computer Graphics and Applications, Jan/Feb 2002.

Page 33: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

Rendering with Natural LightRendering with Natural Light

SIGGRAPH 98 Electronic Theater

Page 34: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

RNL Environment mapped onto

interior of large cube

Page 35: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

MOVIE!MOVIE!

Page 36: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

Illuminating a Small SceneIlluminating a Small Scene

Page 37: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region
Page 38: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

We can now illuminatesynthetic objects with real light.

How do we add synthetic objects to a real scene?

We can now illuminatesynthetic objects with real light.

How do we add synthetic objects to a real scene?

Page 39: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

Real Scene ExampleReal Scene Example

Goal: place synthetic objects on tableGoal: place synthetic objects on table

Page 40: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

Light Probe / Calibration GridLight Probe / Calibration Grid

Page 41: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

real scenereal scene

Modeling the SceneModeling the Scene

light-based modellight-based model

Page 42: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

The Light-Based Room ModelThe Light-Based Room Model

Page 43: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

real scenereal scene

Modeling the SceneModeling the Scene

synthetic objectssynthetic objects

light-based modellight-based model

local scenelocal scene

Page 44: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

The Lighting ComputationThe Lighting Computation

synthetic objects(known BRDF)

synthetic objects(known BRDF)

distant scene (light-based, unknown BRDF)distant scene (light-based, unknown BRDF)

local scene(estimated BRDF)

local scene(estimated BRDF)

Page 45: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

Rendering into the SceneRendering into the Scene

Background PlateBackground Plate

Page 46: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

Rendering into the SceneRendering into the Scene

Objects and Local Scene matched to SceneObjects and Local Scene matched to Scene

Page 47: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

Differential RenderingDifferential Rendering

Local scene w/o objects, illuminated by modelLocal scene w/o objects, illuminated by model

Page 48: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

Differential Rendering (2)Difference in local sceneDifferential Rendering (2)Difference in local scene

-- ==

Page 49: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

Differential RenderingDifferential Rendering

Final ResultFinal Result

Page 50: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

IMAGE-BASED LIGHTING IN FIAT LUXPaul Debevec, Tim Hawkins, Westley Sarokin, H. P. Duiker, Christine Cheng, Tal Garfinkel, Jenny Huang

SIGGRAPH 99 Electronic Theater

Page 51: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region
Page 52: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

HDR Image SeriesHDR Image Series

2 sec2 sec 1/4 sec1/4 sec 1/30 sec1/30 sec

1/250 sec1/250 sec 1/2000 sec1/2000 sec 1/8000 sec1/8000 sec

Page 53: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

Stp1 PanoramaStp1 Panorama

Page 54: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

Assembled PanoramaAssembled Panorama

Page 55: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

Light Probe ImagesLight Probe Images

Page 56: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

Capturing a Spatially-Varying Lighting EnvironmentCapturing a Spatially-Varying Lighting Environment

Page 57: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

The MovieThe Movie

Page 58: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

Simulating the Glare in the Human Eye

Simulating the Glare in the Human Eye

• Greg Spencer, Peter Shirley, Kurt Zimmerman, and Donald Greenberg. Physically-based glare effects for digital images. SIGGRAPH 95.

• Greg Spencer, Peter Shirley, Kurt Zimmerman, and Donald Greenberg. Physically-based glare effects for digital images. SIGGRAPH 95.

Page 59: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

Scattering in the eye

What’s the scattering model?

Page 60: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

HDR Image

Page 61: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

Gaussian Blur, LDR information Only

Page 62: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

Gaussian Blur, Full HDR Information

Page 63: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

Full HDR Disc Blur

Page 64: Previous Lecture The 7d plenoptic function, indexing all light. Lightfields: a 4d (not 5d!) data structure which captures all outgoing light from a region

Frame Postprocessing in Rendering with Natural Light

Frame Postprocessing in Rendering with Natural Light