Real-time Dynamic HDR Based Lighting in a Static Environment

Download Report

Transcript Real-time Dynamic HDR Based Lighting in a Static Environment

Real-time Dynamic
HDR Based Lighting
in a Static
Environment
Marcus Hennix
Daniel Johansson
Gunnar Johansson
Martin Wassborn
The problem?
Lighting an object using HDR maps
require the object to be fixed
 Light information only valid in the
vicinity of the light probe

Proposed solution
Using standard morphing techniques
with modern real-time HDR lighting
 Combining multiple light probes at
different locations
 Must have correct occlusion of light

Related work
All Debevec papers
 Lucia Darsa – “Navigating Static
Environments”
 View morphing papers

Method
Generating images with depth info
 Loading data (HDR)
 Triangulation
 Render to cube map
 Multiple rendering passes for visual
effects

Images
Triangulation
Depth maps
Cube Map
Rendering
Frame
Buffer
Method (1 - Scene)
Render a Cube Map with high
dynamic range in 3dsmax/Brazil
 Fake real depth information by using
standard environment fog
 Create an exporter script in 3dsmax to
export dynamic lit objects

Images
Triangulation
Depth maps
Cube Map
Rendering
Frame
Buffer
HDR Image + depth
Method (2 – Loading files)
HDR file format
 The file format used in labs doesn’t
encode RLE (used in HDR shop)
 Performs gamma correction to
approximate camera curve

Images
Triangulation
Depth maps
Cube Map
Rendering
Frame
Buffer
Method (3 – Extracting depth)
Depth buffer image generated by
3dsmax
 Need to handle perspective projection
 Near & far clip plane, field of view…
 Fog!

Images
Triangulation
Depth maps
Cube Map
Rendering
Frame
Buffer
Method (4 – Triangulation)
Triangulation possible using depth
maps
 Performs an inverse projection into
view space
 Recursive, very simple solution
 Yields geometry and texture
coordinates

Images
Triangulation
Depth maps
Cube Map
Rendering
Frame
Buffer
Method (5 – Rendering)
Render geometry to Cube Map
 Render Cube Map & Synthetic objects
 Cg Shaders (bloom, materials etc.)
 Pixel Buffers

Images
Triangulation
Depth maps
Cube Map
Rendering
Frame
Buffer
Method (6 – Rendering)
Final image rendered
 Auto exposure

Images
Triangulation
Depth maps
Cube Map
Rendering
Frame
Buffer
Implementation
~5000 lines of C code
 OpenGL
 Cg Shading Language
 ARB Vertex & Fragment shaders
 MS Visual Studio .NET
 ATI Radeon 9500 at least
 Possibly geForce FX

Demo
Future Work
Combining multiple light probes not
yet implemented – hard problem
 Applying real life photographs with
depth info

Questions?