Profile Picture

1 - PBR Linear Workflow

Posted By Miranda (RL) 8 Years Ago
Rated 5 stars based on 1 vote.
Author
Message
Miranda (RL)
Miranda (RL)
Posted 8 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (68.7K reputation)Distinguished Member (68.7K reputation)Distinguished Member (68.7K reputation)Distinguished Member (68.7K reputation)Distinguished Member (68.7K reputation)Distinguished Member (68.7K reputation)Distinguished Member (68.7K reputation)Distinguished Member (68.7K reputation)Distinguished Member (68.7K reputation)

Group: Administrators
Last Active: 2 Years Ago
Posts: 1.8K, Visits: 11.2K
The goal of Linear Workflow is use linear color space for textures so that Character Creator can calculate the light source with suitable information.

Let's say that in the real world, the colors we perceive are all in linear color space.  In order for the monitor to mimic the real world, it needs to also display in linear fashion.
Due to the limitations of the monitor hardware and image optimization requirements, images are processed and saved with Gamma correction.

Gamma

Due to limitations of old CRT monitor technology, images can only be displayed via gamma 2.2 color correction.
Even though modern monitors can directly display linear images, gamma 2.2 has become something of a standard convention.

When a camera snaps an image, an 8 bit image is saved for monitor compatibility and file optimization via sRGB Gamma 0.45 processing.
32 bit images can be used to save linear space data via Gamma 1.0 processing.

* Real World → Gamma 1
* sRGB Image (8 bit) → Gamma 0.45
* Float Image (32 bit) → Gamma 1
* Monitor → Gamma 2.2




System Gamma

System gamma takes an linear image and saves it with gamma correction of 0.45 which is then displayed via a monitor with gamma correction of 2.2 resulting to an output of gamma 1.0.
When an image is processed with gamma correction 0.45, it will brighten.  Once it goes through the monitor's gamma 2.2, it will darken but the result will balance out to gamma 1.0 with the correct brightness level.

* sRGB Image Gamma 0.45 + Monitor Gamma 2.2 = Final Display Gamma 1  




Image Gamma & Monitor Gamma

Image and monitor gamma values may not be compatible.  Such is the way with images that are saved in linear color space in 32 bit image formats like .hdr, .exe, etc.
No matter the gamma value the image is saved in, the monitor will indiscriminately process it under a gamma 2.2 color corrected space. 


Physically Based Rendering (PBR)

Due to the physically accurate nature of PBR, all images sourced by this shading/rendering system needs to be in linear space.
Since most images are saved in sRGB gamma correction of 0.45, our software must preprocess sRGB images to linear gamma 1.0.

Linear pre-processing can be achieved in 2 ways: 
1) Use an image processing software to compensate for the lost linear data by applying a gamma correction of 2.2.
2) Use a 3D tool that can preprocess sRGB images with automatic or manual linearization methods.

* There is no need to linearize floating point image formats such as .hdr and .exr (32 bit) which are already in gamma space 1.0.

Once the image is linearized it can thus be processed under the PBR environment.
However another gamma correction step must be applied by the 3D tool again to compensate for the monitor's gamma correction of 2.2.
A linear image processed under gamma correction 2.2 will come out too dark, therefore a post-process of gamma correction 0.45 is applied to the final output.

The process thus mentioned can be summarized with the following formula:
  1. sRGB Image Gamma 0.45 + Linearize sRGB Gamma 2.2 = Linear Image Gamma 1
  2. Linear Image Gamma 1 + Monitor Gamma 2.2 = Final Display in Linear Gamma 2.2
  3. Final Display in Linear Gamma 2.2 + sRGB LUT Gamma 0.45 = Final Display in sRGB Gamma 1



If an image is pre-processed to gamma space 1.0 in an image editing software then it can skip software linearization in the latter stages.

*Left side: Linear image (Use sRGB is off)
*Right side: sRGB image (Use sRGB is on)






Reading This Topic