This document discusses techniques for tone mapping high dynamic range (HDR) data for display on devices with lower dynamic range. It describes:
1) Converting HDR linear data to a logarithmic color space to distribute bits evenly across the dynamic range before tone mapping.
2) Applying a tone mapping operation like a 1D or 3D LUT to the logarithmic data to prepare it for display, with "filmic" LUTs having a linear middle section and soft compression of highlights and shadows.
3) Examples of filmic tone mapping LUTs and their effects on HDR images from movies and games.
2. History of Color In Video Games
• Progression of Game Graphics
– Galaga
– Super Mario
Jump forward a few years
– Bond
– Madden
– Need For Speed
– Gears of War
9. HDR and Next-gen Hardware
• What problems do new hardware
capabilities bring with them?
– Working with HDR data implies Linear color
math and workflows
– So you need to…
• Linearize your textures on read
• Compensate for the characteristics of display
devices through Tone Mapping
• Choose a Tone Mapping algorithm
14. What Does Linear Data Look Like?
• Issues
– Overly Contrasty
– The dynamic range viewable on screen is
relatively small
– Trying to work with this data in integer formats
will quickly lead to quantization artifacts
19. A Filmic Approach to Tone Mapping
• A New Option for Games
• Core Idea: Two Stages
– 1 Transform Linear Data into a Logarithmic
color space
– 2. Apply LUT to Log data
20. A Filmic Approach to Tone Mapping
• Advantages
– Distributes Bits Evenly Across Dynamic
Range – Darks and Highlights
– Encodes Relevant Broad Dynamic Range
using Integer Format
– Plays Nicely with Modern Hardware
– Provides a Broader Range of Control for Art
Direction
21. Log Color – Background
• Human Visual System
– We think of Exposure in Log Terms
– Stops are powers of 2
• Film Measurements standard
– Density is a Log measure of Intensity
– Used for Print and Negative Measurements
• Cineon Compositing System
– Visual Effects interchange standard
24. Log Color – The Math
Linear to Log
c = (log10(ln/linReference)/ld*logGamma +
logReference)/1023.f;
- Conversion is handled easily by Cg and HLSL
- Could be sped up by converting to a 16 bit LUT
25. Log Color – The Math
Log to Linear
c = pow(10, (lg*1023.f–logReference)/
(ld*logGamma))*linReference;
- Conversion is handled easily by Cg and HLSL
- Could be sped up by converting to a 8 bit LUT
• There are a few constants in that equation.
26. Dynamic Range Coverage Comparison
• Log
– Dynamic Range covered by default parameters:
• 0.002 to ~67.5
– Bits per stop using for 8 bit Log with default
parameters:
• 17 8 bit code values ~ 4 bits
– Defaults can be adjust to cover less dynamic range
thereby allocating more bits per stop of dynamic
range
27. Dynamic Range Coverage Comparison
• Gamma
– Dynamic Range covered by Gamma/Exponent
Approach:
• 0 to 1
– Bits per stop using for 8 bit Gamma 2.2
• Average : 24.4
• Max is 69 8. Min is 1.7 = ~ 1 bit.
– Decreases for Darker values, where the human
visual system is most sensitive
– Lifts Black Level
28. Dynamic Range Coverage Comparison
An Exponential Ramp – Each Step = 1 Stop
- Will appear Linear to the Human Eye
- Large range above 1 not shown here
29. Dynamic Range Coverage Comparison
A Log Ramp – Each Step = 1 Stop
- Represents wide dynamic range consistently
- Needs a LUT to prepare for display
30. Dynamic Range Coverage Comparison
An Gamma Ramp - Each Step = 1 Stop
- Will appear Linear when displayed on a monitor
- Will show banding and quantization in the darks
- Clamps values above 1
31. Log Color – On Modern Hardware
• Allows HDR data to be stored in a LDR
integer format
• Color Correction can be done quickly in
this space
• Speculation: This might work equally well
on Xenon and PS3 hardware
32. Log Color – Possible Disadvantages
• Pow and Log calls may be expensive (?)
– Log is cheap. Pow is expensive.
– Can be sped up using LUTs
• Dynamic Range is fixed, not infinite.
– Highlights beyond a certain range will be clipped
– Darks beyond a certain range will be clipped
• Gamma approach not much better at representing dark
detail - ~1 bit
• Blending Operations expect Linear data
33. Filmic Tone Mapping
• Artistry after the Log Conversion
– Starting with Log color data gets you a long
way
– Simple Authoring pipeline
– 1d vs. 3d. LUTs
• Short story: Either approach can be used.
34. Filmic Tone Mapping
• What makes a LUT “Filmic”?
– Linear Middle Section
– “Shoulder” – Soft Compression of Highlights
– “Toe” – Soft Compression of Darks