Hello,
Since there seem to be lots of confusion about the whole linear workflow and gamma settings things, here is a more complete description.
The source of the problem is that computer displays (CRT and recently LCD monitors) do not display colors in a linear fashion. That means that if you input a color like medium grey (RGB 128, 128, 12, when displayed on the screen it will *not* be twice as dark as pure white (RGB 255, 255, 255).
The result is that the renderings that you see on your monitor do not correspond to the actual colors in your images. To compensate for this effect, the images must be color-corrected so that you see the actual colors.
Since each monitor alters colors differently, there must be a way to calibrate different monitors to a common standard so that you can be sure that when you view your images on another monitor, they will look the same. This standard is known as 2.2 Gamma or sRGB color space. It was chosen because CRT monitors on average apply a 2.2-gamma transformation on the input colors. Therefore, correcting for 2.2 gamma requires only a little change in the displayed colors to fit them into the 2.2 curve.
Note that for LCD monitors, things are somewhat different. The LCD output is a lot closer to linear. That means that calibrating an LCD monitor for 2.2 gamma output requires very large modification to the displayed colors. When combined with the fact that some LCD monitors still have less than 24-bit color resolution, it means that lots of color resolution is lost during this transformation. Therefore, it is often better to calibrate an LCD monitor to display linear colors, instead of trying to fit it into the 2.2 gamma framework.
There are three main workflows that you can follow to work properly with digital images. Those are outlined below.
I. Working in gamma space /w gamma display
For this method, your monitor is calibrated to 2.2 gamma space, and your images have the corresponding inverse gamma corection baked into them.
Your images don't need correction when viewed directly on the monitor, since they already have the correction baked into them. However, when you use images for other purposes (e.g. as textures, or when printing), you need to remove the correction. Also, when creating images, you need to bake the correction into them before saving the images to disk.
For this method, you need to make sure that all your images have color correction applied. If this is not the case, and those images have been created with method II or III, you will need to correct them.
Note also that this method is not suitable for compositing purposes. In order to get correct results, compositing must take place in linear space - e.g. 50% gray plus 50% grey must equal pure white. This is not the case if the 50% grey have been already gamma-corrected.
In the old days of slow machines, CRT monitors and 8-bit image file formats, this was the preferred workflow, as it ensured that colors are stored with maximum precision and the most frequent operation on images - displaying them - is fast. With the advent of faster computers, LCD displays and 16-bit/floating point image formats, the situation is now different. All in all, this workflow is now obsolete and is not recommended.
The only situation where you would still use this workflow, is when creating content that you know will be displayed on a CRT device - e.g. animation that will be played on a television screen. Even in this case, it is better to use one of the other workflows internally, and only bake the gamma transformation into the final result.
II. Working in linear space /w gamma display
For this method, your monitor is calibrated to 2.2 gamma space, but your images are stored in linear space. The corresponding inverse gamma correction is applied on the fly when viewing the images.
You need to make sure that your applications can display the images with the inverse 2.2 gamma transformation, while keeping the actual image in linear space.
Also, you need to make sure that all images you acquire from other sources (textures etc) are also in linear space. If this is not the case, and those images have been created with method I, you will need to first un-correct them. There is no need to correct or un-correct images that you make yourself, since these are already in linear space. There is also no need to correct or un-correct images created with method III, as they are also stored in linear space.
If you are working with a CRT monitor, this is the preferred workflow. Calibrating a CRT monitor to 2.2 gamma requires only slight modification of its output. Further on, 16-bit and floating point image format ensure that the color display correction does not lose color precision.
To use 3dsmax/V-Ray with this workflow:
(*) Calibrate your monitor for 2.2 gamma output.
(*) In the 3dsmax Customize/Preferences/Gamma dialog:
- enable gamma correction;
- set the gamma to 2.2;
- check the Affect Color Selectors and Affect Material Editor options.
- Leave input and output bitmap gamma to 1.0;
(*) If a bitmap texture is created with method I and has gamma baked into it, you need to specify this gamma when loading the bitmap in 3dsmax, so that the correction can be removed.
(*) Do not apply gamma correction to your rendered result.
The only situation where you would break this and you can apply gamma correction to a rendering is if you know that it will be displayed on a CRT device that has no color correction - e.g. a television screen. Even in this case, it is recommended that you only apply the correction as a post-process and not bake it in the rendering itself.
III. Working in linear space /w linear display
For this method, your monitor is calibrated for linear output, and your images are stored in linear space. No color correction is necessary when working with the images, with the exception when you are using images (e.g. textures) created with method I. In that case, you will need to un-correct them before usage.
If you are using an LCD monitor, this may be the preferred workflow. In that case, no color transformations are necessary, except if you use images produced by method I.
Note that it may be tricky to use this method, as monitor calibrating software is usually designed to calibrate for 2.2 gamma. However, we need to calibrate for linear output (1.0 gamma).
To use this method with 3dsmax and V-Ray:
(*) Calibrate your monitor for linear output;
(*) Disable gamma correction in 3dsmax;
(*) Make sure all your textures are not gamma corrected. If a texture has some gamma correction baked into it, that needs to be removed first.
(*) Do not apply gamma correction to your rendered result.
The only situation where you would break this and you can apply gamma correction to a rendering is if you know that it will be displayed on a CRT device that has no color correction - e.g. a television screen. Even in this case, it is recommended that you only apply the correction as a post-process and not bake it in the rendering itself.
-----------
All in all, it doesn't matter which method you choose - but when you choose one, you need to stick to it.
Best regards,
Vlado
Since there seem to be lots of confusion about the whole linear workflow and gamma settings things, here is a more complete description.
The source of the problem is that computer displays (CRT and recently LCD monitors) do not display colors in a linear fashion. That means that if you input a color like medium grey (RGB 128, 128, 12, when displayed on the screen it will *not* be twice as dark as pure white (RGB 255, 255, 255).
The result is that the renderings that you see on your monitor do not correspond to the actual colors in your images. To compensate for this effect, the images must be color-corrected so that you see the actual colors.
Since each monitor alters colors differently, there must be a way to calibrate different monitors to a common standard so that you can be sure that when you view your images on another monitor, they will look the same. This standard is known as 2.2 Gamma or sRGB color space. It was chosen because CRT monitors on average apply a 2.2-gamma transformation on the input colors. Therefore, correcting for 2.2 gamma requires only a little change in the displayed colors to fit them into the 2.2 curve.
Note that for LCD monitors, things are somewhat different. The LCD output is a lot closer to linear. That means that calibrating an LCD monitor for 2.2 gamma output requires very large modification to the displayed colors. When combined with the fact that some LCD monitors still have less than 24-bit color resolution, it means that lots of color resolution is lost during this transformation. Therefore, it is often better to calibrate an LCD monitor to display linear colors, instead of trying to fit it into the 2.2 gamma framework.
There are three main workflows that you can follow to work properly with digital images. Those are outlined below.
I. Working in gamma space /w gamma display
For this method, your monitor is calibrated to 2.2 gamma space, and your images have the corresponding inverse gamma corection baked into them.
Your images don't need correction when viewed directly on the monitor, since they already have the correction baked into them. However, when you use images for other purposes (e.g. as textures, or when printing), you need to remove the correction. Also, when creating images, you need to bake the correction into them before saving the images to disk.
For this method, you need to make sure that all your images have color correction applied. If this is not the case, and those images have been created with method II or III, you will need to correct them.
Note also that this method is not suitable for compositing purposes. In order to get correct results, compositing must take place in linear space - e.g. 50% gray plus 50% grey must equal pure white. This is not the case if the 50% grey have been already gamma-corrected.
In the old days of slow machines, CRT monitors and 8-bit image file formats, this was the preferred workflow, as it ensured that colors are stored with maximum precision and the most frequent operation on images - displaying them - is fast. With the advent of faster computers, LCD displays and 16-bit/floating point image formats, the situation is now different. All in all, this workflow is now obsolete and is not recommended.
The only situation where you would still use this workflow, is when creating content that you know will be displayed on a CRT device - e.g. animation that will be played on a television screen. Even in this case, it is better to use one of the other workflows internally, and only bake the gamma transformation into the final result.
II. Working in linear space /w gamma display
For this method, your monitor is calibrated to 2.2 gamma space, but your images are stored in linear space. The corresponding inverse gamma correction is applied on the fly when viewing the images.
You need to make sure that your applications can display the images with the inverse 2.2 gamma transformation, while keeping the actual image in linear space.
Also, you need to make sure that all images you acquire from other sources (textures etc) are also in linear space. If this is not the case, and those images have been created with method I, you will need to first un-correct them. There is no need to correct or un-correct images that you make yourself, since these are already in linear space. There is also no need to correct or un-correct images created with method III, as they are also stored in linear space.
If you are working with a CRT monitor, this is the preferred workflow. Calibrating a CRT monitor to 2.2 gamma requires only slight modification of its output. Further on, 16-bit and floating point image format ensure that the color display correction does not lose color precision.
To use 3dsmax/V-Ray with this workflow:
(*) Calibrate your monitor for 2.2 gamma output.
(*) In the 3dsmax Customize/Preferences/Gamma dialog:
- enable gamma correction;
- set the gamma to 2.2;
- check the Affect Color Selectors and Affect Material Editor options.
- Leave input and output bitmap gamma to 1.0;
(*) If a bitmap texture is created with method I and has gamma baked into it, you need to specify this gamma when loading the bitmap in 3dsmax, so that the correction can be removed.
(*) Do not apply gamma correction to your rendered result.
The only situation where you would break this and you can apply gamma correction to a rendering is if you know that it will be displayed on a CRT device that has no color correction - e.g. a television screen. Even in this case, it is recommended that you only apply the correction as a post-process and not bake it in the rendering itself.
III. Working in linear space /w linear display
For this method, your monitor is calibrated for linear output, and your images are stored in linear space. No color correction is necessary when working with the images, with the exception when you are using images (e.g. textures) created with method I. In that case, you will need to un-correct them before usage.
If you are using an LCD monitor, this may be the preferred workflow. In that case, no color transformations are necessary, except if you use images produced by method I.
Note that it may be tricky to use this method, as monitor calibrating software is usually designed to calibrate for 2.2 gamma. However, we need to calibrate for linear output (1.0 gamma).
To use this method with 3dsmax and V-Ray:
(*) Calibrate your monitor for linear output;
(*) Disable gamma correction in 3dsmax;
(*) Make sure all your textures are not gamma corrected. If a texture has some gamma correction baked into it, that needs to be removed first.
(*) Do not apply gamma correction to your rendered result.
The only situation where you would break this and you can apply gamma correction to a rendering is if you know that it will be displayed on a CRT device that has no color correction - e.g. a television screen. Even in this case, it is recommended that you only apply the correction as a post-process and not bake it in the rendering itself.
-----------
All in all, it doesn't matter which method you choose - but when you choose one, you need to stick to it.
Best regards,
Vlado
Comment