Gamma

General基本信息

Gamma correction (also known as 「color correction」) adjusts the colors of the final image so that they match the typical response of computer monitors. Due to legacy reasons, a computer monitor displays colors on a 2.2 gamma curve. What this means is that the color gray (0.5, 0.5, 0.5) actually shows up as (0.22, 0.22, 0.22), i.e. a darker shade of gray instead of a shade that is exactly between black (0.0, 0.0, 0.0) and white (1.0, 1.0, 1.0) – as one would expect.

Gamma校正也叫Color Correction(色彩校正)用於對最終圖片進行校正,使之適應常見計算機顯示器的輸出。處於歷史原因,計算機顯示器都使用2.2Gamma曲線顯示顏色。這就意味著,灰色(0.5,0.5,0.5)在顯示器實際輸出時是(0.22,0.22,0.22),也就是說我們可以想像它實際顯示出來的顏色要比黑(0,0,0,)和白(1,1,1)正中的中間值更深。

Gamma correction remedies that inaccuracy. Gamma校正可以修正這個問題

Gamma 1.0 (off)

Gamma 2.2

Sometimes users prefer that the renderer produces a 「linear」 (gamma 1.0) image so that they can manually perform gamma correction, color curves and other final adjustments using an external editing program. For this reason, Redshift provides separate gamma controls for what is shown in the 3D modeling package (「Display Gamma」) and the final image file (「File Output Gamma」). This allows the user to preview with gamma correction while saving out linear (gamma 1.0) images.

有時,用戶更願意讓渲染器生成一張「Linear」(Gamma為1.0)的圖片,這樣他們就能使用外部編輯程序手動進行Gamma校正、顏色曲線以及其它方式對圖片進行最終調整,所以,Redshift為3D建模軟體(Redshift提供「Display Gamma」命令)和最終圖片文件(Redshift提供「File Output Gamma」命令)分別提供了Gamma控制的功能。這兩個允許用戶一方面預覽經過Gamma修改的圖片效果,同時輸出保存了線性圖片(Gamma為1.0)。

The 「Automatic」 setting in the 「File Output」 gamma works as follows: if the final image file is using an 8-bit format (such as TGA or PNG), the 「Display Gamma」 value will be applied to it. If the file is using a higher color precision image format (such as OpenEXR), no gamma correction will be applied to it. This is in line with composition packages like Nuke which, by default, assume high color precision images being linear and 8-bit images using an sRGB or Gamma 2.2 color space.

將File Output(文件輸出)Gamma設為「Automatic」(自動)的意思是:如果最終圖片文件使用的是8點陣圖片格式(如TGA或者PNG),將對文件應用Display Gamma校正值。如果最終圖片文件使用的圖片格式顏色精度更高(如OpenEXR),就不會對文件進行Gamma校正。這一點與合成製作軟體,如NUKE,是一致的。默認情況,高顏色精度使用線性輸出,而8點陣圖片則採用sRGB格式或Gamma2.2的色彩空間輸出。

Gamma Correction And Adaptive Sampling 伽馬校正與自適應採樣

Redshift』s adaptive sampling algorithms are gamma-aware as gamma correction can significantly shift the image intensities and, therefore, the relative 『visual importance』 of a pixel. All the adaptive sampling algorithms use the 「Sampling Gamma」 value. We strongly recommend that the 「Sampling gamma」 value matches your final 「intent」 with regards to gamma. I.e. if you are planning on either gamma-correcting the image externally or having Redshift correct it for you, please set the sampling gamma to the same value.

由於Gamma Correction能極大改變色彩強度,並與每像素的相對「視覺權重」有關係。因此Redshift的採樣演算法是受Gamma影響的。所有自適應採樣演算法都使用「Sampling Gamma」的設定。我們強烈推薦「Sampling Gamma」與最終輸出的Gamma 匹配。舉例說,如果你計劃在外部軟體中進行Gamma校正,或者希望Redshift為你修正輸出,請將採樣Gamma設為相同數值。

In the majority of cases, leaving this setting to its default 「same as display gamma」 setting will be sufficient.

在大多數情況下,保留默認設置「Same as display Gamma」(與顯示器伽馬相同)就足夠了。

Gamma Correction And Textures 伽馬校正與紋理

When gamma correction is used, the color profile of your textures has to be set accordingly. Setting it to 「Automatic」 will work fine for most cases. That mode assumes that any 8-bit image format (such as TGA, BMP, etc) is set to a 2.2 gamma and that higher-color-precision images (such as OpenEXR) are already linear. In most of the cases these assumptions are right. Also please note that you only need to do that for textures that are pictures. BumpMaps, NormalMaps and other kinds of control textures should not be adjusted! The importance of properly setting the texture color profile is shown below.

當使用Gamma Correction時,那些紋理貼圖的配置必須相應設置。如果設為「Automatic」,那麼大部分情況可以被滿足。這一設置默認對8點陣圖像格式(如TGA、BMP等)使用2.2的Gamma Correction,而那些超精度色彩格式的圖片比如OpenEXR會使用線性。Bump Maps(凹凸貼圖),Normal Maps(法線貼圖)以及其他控制類的圖片或者紋理則需要使用未被調整過的Gamma的狀態。紋理色彩配置的權重屬性設置參看後文。

The first image, is the texture itself (the default Softimage XSI texture). The second and third images are both rendered with gamma 2.2.

第一張圖本身就是原紋理(是Softimage XSI默認的紋理)。第二張圖和第三張圖都用2.2的Gamma Correction渲染過了。

Original texture原貼圖

Gamma 2.2 render using an incorrect image clip color profile (「linear」). The texture looks washed out.

在這張圖中,開啟了Gamma Correction2.2時,使用了不正確的圖片顏色配置。此時紋理顯得有些曝。

Gamma 2.2 render using the correct image clip color profile (「automatic」 – 「srgb」 would work too). Texture looks like original.

在這張圖中,開啟了Gamma Correction2.2,並使用了正確地顏色匹配(Automatic),或者設為sRGB也可以,紋理看起來正常了。

In Maya, you can adjust the color profile of your File node, as shown below:

在Maya中,你可以像下面一樣,在File節點中設定顏色配置:

Gamma Correction And AOVs伽馬校正與通道

The rules for gamma correction on AOVs are the same as the main beauty pass: if 「File Output Gamma」 is set to 「Automatic」, any AOV that is using an 8-bit format will be written out using the 「Display Gamma」 value while higher color precision image formats will be written out linear (gamma 1.0).

對通道進行Gama校正的原則與對色彩通道進行Gamma校正的方式是一樣的:如果將File Output Gamma(文件輸出Gamma校正)設為Automatic(自動),那麼任何使用8位格式的通道都將使用Display Gamma(顯示器伽馬)值來進行Gamma校正,而顏色精度更高的圖片格式將使用線性輸出(Gamma1.0)。

So if your 「Display Gamma」 is set at 2.2, and open the produced AOV image files in an image viewing program, 8-bit file formats like PNG or TGA will look brighter than format like OpenEXR. This is expected behavior. As mentioned previously, most applications assuming files like OpenEXR to be linear (gamma 1.0) and files like PNG to be sRGB.

所以,如果你把Display Gamma設為2.2,並在圖片查看程序中打開通道圖片文件,就會看見8位文件格式,如PNG和TGA,比OpenEXR這樣的格式顯得更加明亮。這一現像很好理解。大多數程度將OpenEXR格式看成是線性的(Gamma1.0),而其他png之類的圖片會被看作是sRGB模式的。

We recommend users leaving the 「apply color correction」 option enabled for any AOV that allows it.

我們推薦用戶儘可能地為通道(AOV)啟用「Apply Color Correction」(應用色彩校正)選項。


推薦閱讀:

Titan V
Redshift for c4d中文說明——基礎材質面板
Redshift for C4D中文說明——無限背景的製作
Material Shaders -Material Ambient Occlusion Shader
Redshift The Irradiance Point Cloud GI Engine輻射點雲GI

TAG:redshift | gpu渲染 | 渲染 |