Image-based Lighting

Similar documents
Image-Based Lighting

Image-Based Lighting : Computational Photography Alexei Efros, CMU, Fall Eirik Holmøyvik. with a lot of slides donated by Paul Debevec

The 7d plenoptic function, indexing all light.

Image-Based Lighting. Eirik Holmøyvik. with a lot of slides donated by Paul Debevec

Image-based Lighting (Part 2)

Image-Based Lighting. Inserting Synthetic Objects

COMP371 COMPUTER GRAPHICS

Capturing light. Source: A. Efros

Rendering Synthetic Objects into Real Scenes. based on [Debevec98]

Ray Tracing. CSCI 420 Computer Graphics Lecture 15. Ray Casting Shadow Rays Reflection and Transmission [Ch ]

Consider a partially transparent object that is illuminated with two lights, one visible from each side of the object. Start with a ray from the eye

Introduction to 3D Concepts

Light Transport CS434. Daniel G. Aliaga Department of Computer Science Purdue University

Stochastic Path Tracing and Image-based lighting

CMSC427 Advanced shading getting global illumination by local methods. Credit: slides Prof. Zwicker

Topic 12: Texture Mapping. Motivation Sources of texture Texture coordinates Bump mapping, mip-mapping & env mapping

Rendering: Reality. Eye acts as pinhole camera. Photons from light hit objects

Topic 11: Texture Mapping 11/13/2017. Texture sources: Solid textures. Texture sources: Synthesized

Topic 11: Texture Mapping 10/21/2015. Photographs. Solid textures. Procedural

Global Illumination CS334. Daniel G. Aliaga Department of Computer Science Purdue University

Global Illumination. COMP 575/770 Spring 2013

CS635 Spring Department of Computer Science Purdue University

Recursion and Data Structures in Computer Graphics. Ray Tracing

INFOGR Computer Graphics. J. Bikker - April-July Lecture 10: Ground Truth. Welcome!

CS4670/5760: Computer Vision Kavita Bala Scott Wehrwein. Lecture 23: Photometric Stereo

Ray-Tracing. Misha Kazhdan

High Dynamic Range Images

I have a meeting with Peter Lee and Bob Cosgrove on Wednesday to discuss the future of the cluster. Computer Graphics

lecture 18 - ray tracing - environment mapping - refraction

Computergrafik. Matthias Zwicker Universität Bern Herbst 2016

Advanced Graphics. Path Tracing and Photon Mapping Part 2. Path Tracing and Photon Mapping

Computer Graphics. Lecture 9 Environment mapping, Mirroring

Intro to Ray-Tracing & Ray-Surface Acceleration

Shading I Computer Graphics I, Fall 2008

Topics and things to know about them:

Part I The Basic Algorithm. Principles of Photon Mapping. A two-pass global illumination method Pass I Computing the photon map

Ray Tracing. Kjetil Babington

Shading. Brian Curless CSE 557 Autumn 2017

Global Rendering. Ingela Nyström 1. Effects needed for realism. The Rendering Equation. Local vs global rendering. Light-material interaction

Light. Properties of light. What is light? Today What is light? How do we measure it? How does light propagate? How does light interact with matter?

Luxo Jr. (Pixar, 1986) Last Time. Real Cameras and Ray Tracing. Standard Rasterization. Lights, Cameras, Surfaces. Now Playing:

So far, we have considered only local models of illumination; they only account for incident light coming directly from the light sources.

CS6670: Computer Vision

Photoshop PSD Export. Basic Tab. Click here to expand Table of Contents... Basic Tab Additional Shading Tab Material Tab Motion Tab Geometry Tab

COMP environment mapping Mar. 12, r = 2n(n v) v

Computer Graphics. - Introduction to Ray Tracing - Philipp Slusallek

CS4670/5760: Computer Vision

Ray Tracing: Special Topics CSCI 4239/5239 Advanced Computer Graphics Spring 2018

Texture. Detail Representation

A Brief Overview of. Global Illumination. Thomas Larsson, Afshin Ameri Mälardalen University

Photon Mapping. Due: 3/24/05, 11:59 PM

Image Synthesis. Global Illumination. Why Global Illumination? Achieve more photorealistic images

Comp 410/510 Computer Graphics. Spring Shading

Computer Graphics. - Ray Tracing I - Marcus Magnor Philipp Slusallek. Computer Graphics WS05/06 Ray Tracing I

Introduction to Computer Vision. Week 8, Fall 2010 Instructor: Prof. Ko Nishino

SAMPLING AND NOISE. Increasing the number of samples per pixel gives an anti-aliased image which better represents the actual scene.

Global Illumination. Why Global Illumination. Pros/Cons and Applications. What s Global Illumination

Announcements. Written Assignment 2 out (due March 8) Computer Graphics

CS-184: Computer Graphics. Administrative

Image Formation: Light and Shading. Introduction to Computer Vision CSE 152 Lecture 3

Announcements. Radiometry and Sources, Shadows, and Shading

Lecture 4: Reflection Models

Recap of Previous Lecture

Chapter 5 Mirror and Lenses

Chapter 9- Ray-Tracing

Chapter 11 Global Illumination. Part 1 Ray Tracing. Reading: Angel s Interactive Computer Graphics (6 th ed.) Sections 11.1, 11.2, 11.

CMSC427 Shading Intro. Credit: slides from Dr. Zwicker

Global Illumination. CSCI 420 Computer Graphics Lecture 18. BRDFs Raytracing and Radiosity Subsurface Scattering Photon Mapping [Ch

Lighting. To do. Course Outline. This Lecture. Continue to work on ray programming assignment Start thinking about final project

Ray Tracing. Local Illumination. Object Space: Global Illumination. Image Space: Backward Ray Tracing. First idea: Forward Ray Tracing

CENG 477 Introduction to Computer Graphics. Ray Tracing: Shading

INFOGR Computer Graphics. J. Bikker - April-July Lecture 10: Shading Models. Welcome!

Real-Time Image Based Lighting in Software Using HDR Panoramas

Sung-Eui Yoon ( 윤성의 )

Global Illumination. Global Illumination. Direct Illumination vs. Global Illumination. Indirect Illumination. Soft Shadows.

Shading, lighting, & BRDF Theory. Cliff Lindsay, PHD

Interactive Methods in Scientific Visualization

Lecture 22: Basic Image Formation CAP 5415

Lighting and Shading

Global Illumination The Game of Light Transport. Jian Huang

Ray Optics. Lecture 23. Chapter 34. Physics II. Course website:

Lighting. Figure 10.1

Ray Optics. Physics 11. Sources of Light Rays: Self-Luminous Objects. The Ray Model of Light

The Shading Probe: Fast Appearance Acquisition for Mobile AR

Photorealism: Ray Tracing

Review. Stephen J. Guy

Computer Vision. The image formation process

Lights, Surfaces, and Cameras. Light sources emit photons Surfaces reflect & absorb photons Cameras measure photons

Computer Graphics. Lecture 14 Bump-mapping, Global Illumination (1)

Image Based Rendering. D.A. Forsyth, with slides from John Hart

Lecture 17: Recursive Ray Tracing. Where is the way where light dwelleth? Job 38:19

Computer Graphics Lecture 11

Introduction to Computer Graphics 7. Shading

Rendering Part I (Basics & Ray tracing) Lecture 25 December 1, 2015

CS5670: Computer Vision

CS201 Computer Vision Lect 4 - Image Formation

CIS 536/636 Introduction to Computer Graphics. Kansas State University. CIS 536/636 Introduction to Computer Graphics

Radiometry and reflectance

Announcements. Image Formation: Light and Shading. Photometric image formation. Geometric image formation

Global Illumination. Global Illumination. Direct Illumination vs. Global Illumination. Indirect Illumination. Soft Shadows.

Transcription:

Image-based Lighting 10/17/15 T2 Computational Photography Derek Hoiem, University of Illinois Many slides from Debevec, some from Efros

Next week Derek away for ICCV (Venice) Zhizhong and Aditya will teach and hold office hours, etc. Joe is away this week and next

Next two classes Today Start on ray tracing, environment maps, and relighting 3D objects (project 4 topics) Thursday More HDR, light probes, etc.

Project 4

How to render an object inserted into an image? What s wrong with the teapot?

Relighting is important! http://smashinghub.com/8-of-the-most-epicgovernment-photoshop-fails-ever.htm http://petapixel.com/2013/10/13/anothernorth-korean-photoshop-fail/

How to render an object inserted into an image? Traditional graphics way Manually model BRDFs of all room surfaces Manually model radiance of lights Do ray tracing to relight object, shadows, etc.

How to render an object inserted into an image? Image-based lighting Capture incoming light with a light probe Model local scene Ray trace, but replace distant scene with info from light probe Debevec SIGGRAPH 1998

Key ideas for Image-based Lighting Environment maps: tell what light is entering at each angle within some shell +

Key ideas for Image-based Lighting Light probes: a way of capturing environment maps in real scenes

Key ideas for Image-based Lighting Capturing HDR images: needed so that light probes capture full range of radiance

Key ideas for Image-based Lighting Relighting: environment map acts as light source, substituting for distant scene

Today Ray tracing Capturing environment maps

A photon s life choices Absorption Diffusion Reflection Transparency Refraction Fluorescence Subsurface scattering Phosphorescence Interreflection? λ light source

A photon s life choices Absorption Diffusion Reflection Transparency Refraction Fluorescence Subsurface scattering Phosphorescence Interreflection λ light source

A photon s life choices Absorption Diffuse Reflection Reflection Transparency Refraction Fluorescence Subsurface scattering Phosphorescence Interreflection λ light source

A photon s life choices Absorption Diffusion Specular Reflection Transparency Refraction Fluorescence Subsurface scattering Phosphorescence Interreflection λ light source

A photon s life choices Absorption Diffusion Reflection Transparency Refraction Fluorescence Subsurface scattering Phosphorescence Interreflection λ light source

A photon s life choices Absorption Diffusion Reflection Transparency Refraction Fluorescence Subsurface scattering Phosphorescence Interreflection λ light source

A photon s life choices Absorption Diffusion Reflection Transparency Refraction Fluorescence Subsurface scattering Phosphorescence Interreflection λ 2 λ 1 light source

A photon s life choices Absorption Diffusion Reflection Transparency Refraction Fluorescence Subsurface scattering Phosphorescence Interreflection λ light source

A photon s life choices Absorption Diffusion Reflection Transparency Refraction Fluorescence Subsurface scattering Phosphorescence Interreflection t=n t=1 light source

A photon s life choices Absorption Diffusion Reflection Transparency Refraction Fluorescence Subsurface scattering Phosphorescence Interreflection (Specular Interreflection) λ light source

Where are the light sources are in this room? http://www.flickr.com/photos/chrisdonbavand/493707413/sizes/z/in/photostream/

Rendering Equation Outgoing light Generated light Total reflected light BRDF Incoming Light Incident angle

Rendering a scene with ray tracing http://en.wikipedia.org/wiki/file:glasses_800_edit.png

Ray tracing: basics camera center image plane λ light source

Ray casting Store colors of surfaces, cast out rays, see what colors each ray hits Wolfenstein 3D (1992)

Ray tracing: fast approximation Upon hitting a surface Cast reflection/refraction ray to determine reflected or refracted surface Cast shadow ray: go towards light and see if an object is in the way http://en.wikipedia.org/wiki/file:ray_trace_diagram.svg

Ray tracing: interreflections Reflect light N times before heading to light source N=2 N=16 http://en.wikipedia.org/wiki/ray_tracing_(graphics)#mediaviewer/file:ray-traced_steel_balls.jpg

Ray tracing Conceptually simple but hard to do fast Full solution requires tracing millions of rays for many inter-reflections Design choices Ray paths: Light to camera vs. camera to light? How many samples per pixel (avoid aliasing)? How to sample diffuse reflections? How many inter-reflections to allow? Deal with subsurface scattering, etc?

Environment Maps The 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

Cubic Map Example

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

Spherical Map Example

Sphere mapping Map lives on a sphere To generate the map: Render a spherical panorama from the designed center point Rendering with environment map: Use the orientation of the R ray to index directly into the sphere

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 (based on the environment map)

Rendering with environment maps and local models image plane camera center

Storing spherical environment maps

Equirectangular (latitude-longitude) projection

Equirectangular (latitude-longitude) projection

How to capture light in real scenes? From Flight of the Navigator

How to capture light in real scenes? from Terminator 2

Real environment maps We can use photographs to capture environment maps The first use of panoramic mosaics Fisheye lens Mirrored balls (light probes)

Mirrored Sphere

Mirror balls for image-based lighting

Mirror balls for image-based lighting

Mirror balls for image-based lighting

0.34 => 59% Reflective Calibrating Mirrored Sphere Reflectivity 0.58

Spherical map domain transformations Many rendering programs only accept one format (mirror ball, equirectangular, cube map, etc) E.g. Blender only accepts equirectangular maps How to convert mirror ball to equirectangular?

Mirror ball -> equirectangular

Mirror ball -> equirectangular Spherical coordinates Convert the light directions incident to the ball into spherical coordinates (phi, theta) Map from mirror ball phi, theta to equirectangular phi, theta for i=1:d F = TriScatteredInterp(phi_ball, theta_ball, mirrorball(:,:,i)); latlon(:,:,i) = F(phi_latlon, theta_latlon); end

Mirror ball -> equirectangular Mirror ball Normals Reflection vectors Phi/theta of reflection vecs Equirectangular Phi/theta equirectangular domain

One small snag How do we deal with light sources? Sun, lights, etc? They are much, much brighter than the rest of the environment 46. 1907. 15116. 1. 18.

Problem: Dynamic Range

Problem: Dynamic Range 1 1500 The real world is high dynamic range. 25,000 400,000 2,000,000,000

Long Exposure Real world 10-6 High dynamic range 10 6 Picture 10-6 10 6 0 to 255

Short Exposure Real world 10-6 High dynamic range 10 6 Picture 10-6 10 6 0 to 255

Varying Exposure

Camera is not a photometer! Limited dynamic range Perhaps use multiple exposures? Unknown, nonlinear response Not possible to convert pixel values to radiance Solution: Recover response curve from multiple exposures, then reconstruct the radiance map

Next class How to capture HDR image using bracketing How to relight an object from an environment map