Skip to main content
Filmic Tone Mapping
Haarm-Pieter Duiker – EALA
George Borshukov – WWVG
2006/10/27
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
History of Color In Video Games
Copyright @1982 Namco Corp.
History of Color In Video Games
Copyright @1988 Nintendo of America Inc
History of Color In Video Games
Copyright @ 2003-2004 Electronic Arts Inc
History of Color In Video Games
Copyright ©2006 Epic Games, Inc
History of Color In Video Games
Copyright ©2005 Electronic Arts, Inc.
History of Color In Video Games
Copyright ©2005 Electronic Arts, Inc.
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
What Does Linear Data Look Like?
Copyright ©2004 Nvidia Corporation
What Does Linear Data Look Like?
Copyright ©2005 Electronic Arts, Inc.
What Does Linear Data Look Like?
Copyright © 20th Century Fox Film Corp.
What Does Linear Data Look Like?
Copyright ©2003 Warner Bros., Inc.
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
Contrast Range Covered by
Different Tone Mapping Options
Copyright © 20th Century Fox Film Corp.
Contrast Range Covered by
Different Tone Mapping Options
Copyright © 20th Century Fox Film Corp.
Contrast Range Covered by
Different Tone Mapping Options
Copyright © 20th Century Fox Film Corp.
Contrast Range Covered by
Different Tone Mapping Options
Copyright © 20th Century Fox Film Corp.
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
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
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
Log Color – Background
Copyright © Kodak Corp.
Log Color – Background
Copyright © Kodak Corp.
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
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.
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
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
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
Dynamic Range Coverage Comparison
A Log Ramp – Each Step = 1 Stop
- Represents wide dynamic range consistently
- Needs a LUT to prepare for display
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
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
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
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.
Filmic Tone Mapping
• What makes a LUT “Filmic”?
– Linear Middle Section
– “Shoulder” – Soft Compression of Highlights
– “Toe” – Soft Compression of Darks
Filmic Tone Mapping
Copyright © Kodak Corp.
Filmic Tone Mapping - Examples
Copyright © 20th Century Fox Film Corp.
Filmic Tone Mapping - Examples
Copyright © 20th Century Fox Film Corp.
Filmic Tone Mapping - Examples
Copyright © 20th Century Fox Film Corp.
Filmic Tone Mapping - Examples
Copyright © 20th Century Fox Film Corp.
Filmic Tone Mapping - Examples
Copyright ©2005 Electronic Arts, Inc.
Filmic Tone Mapping - Examples
Copyright ©2005 Electronic Arts, Inc.
Filmic Tone Mapping - Examples
Copyright ©2005 Electronic Arts, Inc.
Filmic Tone Mapping - Examples
Copyright ©2005 Electronic Arts, Inc.
Filmic Tone Mapping - Examples
Copyright ©2004 Nvidia Corporation
Filmic Tone Mapping - Examples
Copyright ©2004 Nvidia Corporation
Filmic Tone Mapping - Examples
Copyright ©2004 Nvidia Corporation
Filmic Tone Mapping - Examples
Copyright ©2004 Nvidia Corporation
Filmic Tone Mapping – Example
Copyright © 20th Century Fox Film Corp.
Filmic Tone Mapping - Examples
Copyright © 20th Century Fox Film Corp.
Filmic Tone Mapping - Examples
Copyright © 20th Century Fox Film Corp.
Filmic Tone Mapping - Examples
Copyright © 20th Century Fox Film Corp.
Filmic Tone Mapping - Examples
Copyright ©2004 Warner Bros., Inc.
Filmic Tone Mapping - Examples
Copyright ©2004 Warner Bros., Inc.
Filmic Tone Mapping - Examples
Copyright ©2004 Warner Bros., Inc.
Filmic Tone Mapping - Examples
Copyright ©2004 Warner Bros., Inc.
Filmic Tone Mapping - Examples
Copyright ©2005 Electronic Arts, Inc.
Filmic Tone Mapping - Examples
Copyright ©2005 Electronic Arts, Inc.
Filmic Tone Mapping - Examples
Copyright ©2005 Electronic Arts, Inc.
Filmic Tone Mapping - Examples
Copyright ©2005 Electronic Arts, Inc.
Tiger Demo
• Real time demo using Filmic Tonemapping
Thanks for Your Time
• Questions?