RealTime Rendering Digital Image Synthesis YungYu Chuang 01032006

  • Slides: 43
Download presentation
Real-Time Rendering Digital Image Synthesis Yung-Yu Chuang 01/03/2006 with slides by Ravi Ramamoorthi and

Real-Time Rendering Digital Image Synthesis Yung-Yu Chuang 01/03/2006 with slides by Ravi Ramamoorthi and Robin Green

Realistic rendering • So far, we have talked photorealistic rendering including complex materials, complex

Realistic rendering • So far, we have talked photorealistic rendering including complex materials, complex geometry and complex lighting. They are slow.

Real-time rendering • Goal is to achieve interactive rendering with reasonable quality. It’s important

Real-time rendering • Goal is to achieve interactive rendering with reasonable quality. It’s important in many applications such as games, visualization, computer-aided design, …

Basic themes • • Interactive ray-tracing Programmable graphics hardware Image-based rendering Precomputation-based methods

Basic themes • • Interactive ray-tracing Programmable graphics hardware Image-based rendering Precomputation-based methods

Natural illumination People perceive materials more easily under natural illumination than simplified illumination. Images

Natural illumination People perceive materials more easily under natural illumination than simplified illumination. Images courtesy Ron Dror and Ted Adelson

Natural illumination Classically, rendering with natural illumination is very expensive compared to using simplified

Natural illumination Classically, rendering with natural illumination is very expensive compared to using simplified illumination directional source natural illumination

Reflection maps Blinn and Newell, 1976

Reflection maps Blinn and Newell, 1976

Environment maps Miller and Hoffman, 1984

Environment maps Miller and Hoffman, 1984

HDR lighting

HDR lighting

Examples

Examples

Examples

Examples

Examples

Examples

Complex illumination

Complex illumination

Basis functions • Basis Functions are pieces of signal that can be used to

Basis functions • Basis Functions are pieces of signal that can be used to produce approximations to a function

Basis functions • We can then use these coefficients to reconstruct an approximation to

Basis functions • We can then use these coefficients to reconstruct an approximation to the original signal

Basis functions • We can then use these coefficients to reconstruct an approximation to

Basis functions • We can then use these coefficients to reconstruct an approximation to the original signal

Orthogonal basis functions • Orthogonal Basis Functions – These are families of functions with

Orthogonal basis functions • Orthogonal Basis Functions – These are families of functions with special properties – Intuitively, it’s like functions don’t overlap each other’s footprint • A bit like the way a Fourier transform breaks a functions into component sine waves

Basis functions • Transform data to a space in which we can capture the

Basis functions • Transform data to a space in which we can capture the essence of the data better • Here, we use spherical harmonics, similar to Fourier transform in spherical domain

Real spherical harmonics • A system of signed, orthogonal functions over the sphere •

Real spherical harmonics • A system of signed, orthogonal functions over the sphere • Represented in spherical coordinates by the function where l is the band m is the index within the band

Real spherical harmonics

Real spherical harmonics

Reading SH diagrams This direction – Not this direction +

Reading SH diagrams This direction – Not this direction +

Reading SH diagrams This direction – Not this direction +

Reading SH diagrams This direction – Not this direction +

The SH functions

The SH functions

The SH functions

The SH functions

Spherical harmonics

Spherical harmonics

Spherical harmonics m 0 l 1 2 -2 -1 0 1 2

Spherical harmonics m 0 l 1 2 -2 -1 0 1 2

SH projection • First we define a strict order for SH functions • Project

SH projection • First we define a strict order for SH functions • Project a spherical function into a vector of SH coefficients

SH reconstruction • To reconstruct the approximation to a function • We truncate the

SH reconstruction • To reconstruct the approximation to a function • We truncate the infinite series of SH functions to give a low frequency approximation

Examples of reconstruction

Examples of reconstruction

An example • Take a function comprised of two area light sources – SH

An example • Take a function comprised of two area light sources – SH project them into 4 bands = 16 coefficients

Low frequency light source • We reconstruct the signal – Using only these coefficients

Low frequency light source • We reconstruct the signal – Using only these coefficients to find a low frequency approximation to the original light source

SH lighting for diffuse objects • An Efficient Representation for Irradiance Environment Maps, Ravi

SH lighting for diffuse objects • An Efficient Representation for Irradiance Environment Maps, Ravi Ramamoorthi and Pat Hanrahan, SIGGRAPH 2001 • Assumptions – Diffuse surfaces – Distant illumination – No shadowing, interreflection irradiance is a function of surface normal

Diffuse reflection reflectance (albedo/texture) radiosity (image intensity) = irradiance (incoming light) × quake light

Diffuse reflection reflectance (albedo/texture) radiosity (image intensity) = irradiance (incoming light) × quake light map

Irradiance environment maps L Illumination Environment Map n Irradiance Environment Map

Irradiance environment maps L Illumination Environment Map n Irradiance Environment Map

Spherical harmonic expansion Expand lighting (L), irradiance (E) in basis functions =. 67 +.

Spherical harmonic expansion Expand lighting (L), irradiance (E) in basis functions =. 67 +. 36 + …

Analytic irradiance formula Lambertian surface acts like low-pass filter 0 cosine term 0 1

Analytic irradiance formula Lambertian surface acts like low-pass filter 0 cosine term 0 1 2

9 parameter approximation Order 0 1 term Exact image m RMS error = 25

9 parameter approximation Order 0 1 term Exact image m RMS error = 25 % 0 l 1 2 -2 -1 0 1 2

9 Parameter Approximation Order 1 4 terms Exact image m RMS Error = 8%

9 Parameter Approximation Order 1 4 terms Exact image m RMS Error = 8% 0 l 1 2 -2 -1 0 1 2

9 Parameter Approximation Order 2 9 terms Exact image m RMS Error = 1%

9 Parameter Approximation Order 2 9 terms Exact image m RMS Error = 1% For any illumination, average error < 3% [Basri Jacobs 01] 0 l 1 2 -2 -1 0 1 2

Comparison Incident illumination 300 x 300 Irradiance map Texture: 256 x 256 Hemispherical Integration

Comparison Incident illumination 300 x 300 Irradiance map Texture: 256 x 256 Hemispherical Integration 2 Hrs Irradiance map Texture: 256 x 256 Spherical Harmonic Coefficients 1 sec

Rendering Irradiance approximated by quadratic polynomial 4 x 4 matrix (depends linearly on coefficients

Rendering Irradiance approximated by quadratic polynomial 4 x 4 matrix (depends linearly on coefficients Llm) Surface Normal vector column 4 -vector

Complex geometry Assume no shadowing: Simply use surface normal

Complex geometry Assume no shadowing: Simply use surface normal

Video

Video