Download ApproxGI

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Photoelectric effect wikipedia , lookup

Grow light wikipedia , lookup

Photopolymer wikipedia , lookup

Doctor Light (Kimiyo Hoshi) wikipedia , lookup

Doctor Light (Arthur Light) wikipedia , lookup

Bioluminescence wikipedia , lookup

Bicycle lighting wikipedia , lookup

Light pollution wikipedia , lookup

Daylighting wikipedia , lookup

Lighting wikipedia , lookup

Architectural lighting design wikipedia , lookup

Stage lighting wikipedia , lookup

Transcript
An Approximate Global
Illumination System for
Computer Generated Films
presented by: Yu-Jen Chen
The main idea of this paper
• Lighting models used in the production of CG
feature animation have to be flexible, easy to
control, and efficient to compute.
• Global illumination techniques do not lend these.
• Approximate global illumination system
- indirect illumination (only one bounce)
- micro-polygon based scan line renderer
- modified irradiance gradient caching technique
=> enhance caching coherence
- approximate lighting model
Outline
•
•
•
•
Introduction
Previous Work
System Overview
Approximations and Optimizations
- Path Length
- Surface Properties
- Ray Tracing Simplified Geometry
- Radiosity maps
- Irradiance Caching Coherence
- Approximate Lighting Model
• Tool Description
• Results
Introduction(1/5)
• Very little animation work utilizes global
illumination effects in its visuals.
• Generally, simpler direct lighting models
are used to render very complex and
highly detailed scenes.
=> important light interactions between
the elements of a scene are missing.
Introduction(2/5)
direct and indirect lighting
direct lighting only
Introduction(3/5)
• Programmable shaders - implement
customized lighting and shading models.
• Extend to offer global illumination.
Introduction(4/5)
• To use global illumination in CG animation
image making process, the render times
have to be minimized, and tools must be
provided to enable flexible art direction
with a very short feedback loop.
• Developed an indirect illumination tool
- workflow efficiency
- controllability
Introduction(5/5)
• Only consider a coarse geometric tessellation
of the geometry during ray tracing.
• Radiant exitance texture maps are used to
accelerate final gathering and to help reduce
the noise of final renders.
• Using irradiance caching and enhance its
efficiency and applicability to non-diffuse
surfaces, by using it in conjunction with an
approximate lighting model.
Previous Work(1/5)
• [1986 Kajiya] – Monte Carlo path tracing was
first used by Kajiya to slove the rendering
equation.
• Although very general and simple to implement,
this technique is very slow.
• [1994 Dutre and Willems] – light tracing =>
the number of possible paths is also very large
towards the camera. (high variance)
• [1994 Veach and Guibas] – Bidirectional path
tracing combines paths from the camera and
from the light, statistically weighting each paired
path contribution to the final image.
Previous Work(2/5)
• [1996 Lafortune] – Variance reduction
techniques (Bias), improve rendering
performance.
• [1997 Veach and Guibas] – Metropolis light
transport, which applies mutations to previously
explored paths.
• [1996 Pharr and Hanrahan] – Geometrycaching framework that allows a ray tracing
engine to handle scenes that do not fit entirely in
the computer’s memory.
Previous Work(3/5)
• [1997 Pharr] – Further enhance this
technique by reordering the operations
of the rendering algorithm, so as to
maximize caching coherence.
- orthogonal research directions have explored
caching strategies to avoid recomputing similar
quantities that can be extrapolated without
significantly affecting the final image.
Previous Work(4/5)
• [1996, 2002 Jensen] – Photon mapping,
the photon map acts as a cache of all the
light paths throughout the scene, and
using it appropriately significantly
improves performance over previous
algorithms.
Previous Work(5/5)
• [1992 Ward and Heckbert] – take
advantage of spatial coherence, as well as
the characteristic of the irradiance function
over ideally diffuse surfaces, to apply
sparse sampling of the indirect illumination
throughout the scene. (irradiance caching)
• Complex BRDFs => does not apply well
and loses its benefit
System Overview
Only the irradiance cache is used to derive indirect illumination.
Approximations and Optimizations
• Much of the research in the field of global
illumination has been focused on efficiently
solving the rendering equation.
• When mostly complex light paths contribute to
the final image or when simulating indirect light
cast by surfaces with complex BRDFs, the
efficiency of simple algorithms degrades rapidly,
even sophisticated algorithms do, too.
- Path Length
• Only indirect light paths containing a
single bounce are simulated, by using a
non-recursive light gathering algorithm.
- Surface Properties
• Treating only diffuse surface.
• Caustics and glossy reflections are
exceptions to this rule, which we leave for
more specific algorithms to solve efficiency.
Ray Tracing Simplified Geometry(1/4)
• Ray tracing coarsely tessellated geometry.
• Traditional biasing techniques that ignore
intersections near the ray origin cannot be
applied here, since they would create significant
light or shadow leak problems.
(only one bounce)
Ray Tracing Simplified Geometry(2/4)
• Ray offsetting algorithm
• Geometric micro-displacement
To ray trace simplified geometry, we adjust the ray origin.
Ray Tracing Simplified Geometry(3/4)
• Since we are ray tracing approximate
geometry, diffuse self-interreflections
cast by geometric micro-displacements
might not be captured accurately.
• This is often visually of small importance.
Ray Tracing Simplified Geometry(4/4)
Radiosity maps(1/2)
• Texture maps – offer a constant time query.
• During a pre-processing state, we
compute and store radiance values for
each texel. Since we simulate a single
bounce of indirect light, our radiosity maps
contain only direct illumination
contributions.
Radiosity maps(2/2)
• Inverting the texture coordinates of the
four corners of the four corners of the texel
and obtain a corresponding quadrilateral
on the surface.
• No perceptible noise.
Irradiance Caching Coherence(1/5)
• Every irradiance sample is saved in a
cache along with corresponding geometric
information and irradiance gradient vectors.
• This information is used to smoothly
extrapolate irradiance values for
neighboring positions.
Irradiance Caching Coherence(2/5)
• To enhance caching coherence for scenes
containing high geometric detail and
complex surface properties.
• To compute the error of using a sample i
at any position x, we use the following
function instead:
Irradiance Caching Coherence(3/5)
• K: accuracy, set to 1 in most cases.
• α+: hard-coded to 10 degrees.
• Ri: closest distance to the intersected surfaces during the evaluation
of the irradiance sample i.
• R+: 10 times the square root of the projected pixel area.
• R-: 1.5 times the square root of the projected pixel area.
Irradiance Caching Coherence(4/5)
• To avoid sampling the irradiance, we loop over
candidate cached samples with positive weight
and compute the weighted average of their
extrapolated contribution.
• To avoid sampling patterns that are too spars or
too dense.
• The error function presented above avoids oversampling the irradiance in corner areas.
Irradiance Caching Coherence(5/5)
irradiance sampling frequency
using the original error function
Approximate Lighting Model(1/5)
• Enable the irradiance caching coherence, while
perserving some of the properties of complex
BRDFs.
• By converting the irradiance to corresponding
approximate incoming field radiance.
=> choose a dominant incoming light
direction
Approximate Lighting Model(2/5)
• We compute the radiance as follows:
• Where E(x,n) is the extrapolated
irradiance at position x.
Approximate Lighting Model(3/5)
• We derive a dominant incoming light direction wi '
using the weighted average of the ray directions
used in sampling the hemisphere.
Approximate Lighting Model(4/5)
• We choose three dominant incoming light directions
instead.
Li
•
Li
is computed using equation (6) and
using equation (7).
w'
Approximate Lighting Model(5/5)
(c) closeup of a complex BRDF
(d) irradiance sampling frequency
Tool Description
• The rendering workflow is presented as
well as a description of the many
controls available to the user.
Shader Integration
• Light shader and surface shader can be
written independently.
• Light shader: provide incoming light
directions and colors.
• Some rendering systems require the
surface shader to explicitly invoke
indirect lighting samples.
Workflow
• Getting quick visual feedback which
speeds up interactive lighting turnaround.
• Each new frame will compute light
gathering only in regions of the image
that have not been covered in previous
frames.
Art Direction
• Even though a physically based algorithm
is used to compute indirect illumination, its
result might differ from the artist’s
aesthetic goal.
• The user can control which objects in the
scene will receive indirect illumination and
define the list of all the geometries that
need to be ray-traced when gathering light.
Results(1/3)
• This tool was used extensively by artists
during the production of the computer
animated feature film “Shrek 2”.
Results(2/3)
using a single bounce of indirect light
using multiple bounces of indirect light
Result(3/3)
Only a rough tessellation of the character skin is ray traced.