Using Gamma 2.2

This is a detailed description of the work with Gamma 2.2. If you are only interested in exact instructions of how to use Gamma please look at "Gamma 2.2 Tip" in the Tips‘n‘Tricks section.

Many artists, especially those who faced the rendering of the interiors noticed that with physically correct formulation of the lights there is an overall dark-fetched result in illumination. That is noticeable in the corners and on the shadow side of objects especially.

Everyone tried to deal with this issue in different ways. Beginners immediately tried to correct this by simply increasing the brightness of lights.

This approach brings some results increasing the overall illumination. However, it also led to no less unlikely overbrights made by these light sources. This does not alter the situation with unrealistic image. One bug of darkness (in the hard-to-reach for light places) is replaced by another bug of overbrights (near the light sources).

Someone used more complex ways to "solve" the problem by adding extra lights, and making them not visible to the camera so dark places were simply illuminated. However, with this way no physical accuracy and realism of the image could not be considered. Along with lighting of the dark places, shadows disappeared and was the impression that the scene objects are flying in the air.

All of the above ways of dealing with implausible darkness rather more literate than subtle :)

The heart of the problem of dark renders is in that the image and monitor gamma values are different.

Gamma is the degree of nonlinearity of the color gradient from dark to bright values. In mathematical point of view the linear gamma value is 1.0 and this is why software such as Max, V-Ray by default performs calculations in the gamma 1.0. But the gamma 1.0 value is consistent only with the «perfect» monitor, which has a linear dependence of the display from white to black. Because there is no such monitors, the actual gamma of devices is nonlinear.

The gamma value for the video standard NTSC is 2.2. For computer displays the gamma value is typically between 1.5 and 2.0. But for convenience the nonlinearity of the color gradient on all screens is considered as 2.2.

When the monitor with gamma 2.2 shows an image with a gamma 1.0 we get dark gamma 1.0 colors instead of needed gamma 2.2 bright ones. So the middle-range colors (Zone 2) become dark when viewing the gamma 1.0 image with the gamma 2.2 output device. However, in range of dark tones (Zone 1), gamma 1.0 and 2.2 representation is quite similar, what lets to display the shadows and black colors properly.

In the areas of light tones (Zone 3) there also are the great similarities. Therefore, bright gamma 1.0 image is also quite correctly displayed on the gamma 2.2 monitor.

And so, in order to get at the appropriate output in Gamma 2.2 the source image gamma should be modified. Surely this can be done in Photoshop, simply by adjusting gamma there. But each time to change the image settings, saving them to your hard disk, and editing in raster editor can hardly be called convenient. Because of that we will not consider this option, and in addition this method provides an even more significant deficiencies. Modern renderers, such as V-Ray, calculate the image adaptively, so the calculation accuracy depends on many parameters, including the light brightness in the area. Therefore, in the shadow areas image is calculated less accurately and become noisy. And in the bright and visible areas the calculation passes with more accuracy and with minimal artifacts. This allows faster renders due to the saving time on a slightly visible areas. By raising the output image gamma in Photoshop you change the brightness of those parts, which renderer considered as a less significant and reduced the quality of a calculation. Thus, all unwanted artifacts become prominent, and the picture will look awful, but more bright than before :) In addition the gamma of textures also will change and they will look pale and discolored.

The only correct way out of this situation is the changing the gamma value in which the renderer is working. That way you will get an acceptable brightness in the midtones and there will no obvious artifacts, as when changing gamma in raster editor.

We will show you how this is done in V-Ray renderer and 3ds Max.

To change the gamma in which the renderer will work with it‘s enough to find drop-down tab named "V-Rray: Color mapping" in the "V-Ray" tab on the "Render Scene:" (F10) window, and set the value "Gamma:" to 2.2.

A feature of V-Ray renderer is that the color mapping gamma correction works in the V-Ray Frame buffer only, so if you want to see the results of your manipulation with gamma it is necessary to turn on frame buffer on "V-Ray: Frame buffer" in the "V-Ray" tab.

After this the resulting rendered image will be with needed gamma 2.2, with a normal lit midtones. Yet another disadvantage is that the textures which are used in the scene will be lighter and will look discolored and faded.

Almost all textures we use have a normal appearance on monitor. That is because of they are already adjusted by the monitor and have a range of 2.2 initially. In order the renderer to configure a gamma 2.2, and to not to set image gamma at 2,2 × 2,2 value, textures must be in the gamma 1.0. Then, after their correction by renderer their gamma will become 2.2.

You can make all textures darker, by setting their gamma from 2.2  to 1.0 in raster editor, counting on further lightening by renderer. However, that approach would be very tedious and will require time and patience to ensure that every texture in the scene are in 1.0 gamma, and secondly it will make impossible the viewing the textures in the normal gamma because they will be shaded at that time. 
To avoid this, just force them to adjust the 3ds Max input. Fortunately this 3d editor has enough settings as for the gamma. Gamma settings available from 3ds Max main menu:

Customize <=> Preferences ...<=> Gamma and LUT

The main 3ds Max gamma settings are in the "Gamma and LUT" tab. In particular, we need input texture correction setting named "Input Gamma". We should not delude ourselves that there is a default value of 1.0. This is not the adjustment value, this is an input texture gamma value. By default it is considered that all the textures is composed in a gamma 1.0, but in reality as previously mentioned they are at gamma 2.2. And that what we must specify the 2.2 instead of 1.0 default value.

Don‘t forget to enable "Enable Gamma / LUT Correction" checkbox to access the gamma settings.

Images made with that gamma settings look much better and more correct than those that were obtained by using the settings described a little earlier. They have correct midtones, there are no overbrights near the lights and no artifacts in slightly lit areas. In that way textures will also be saturated and bright.

It seems that‘s all, but finally we would like to tell about one more thing in the work with gamma. Since the renderer operates in a unusual gamma we got to set 3ds Max display mode to gamma 2.2 for "Material Editor" and "Color Selector" colors to become correct. Otherwise there may be a confusion, as the apparent tuning of materials will be produced in gamma 1.0, but actually inside the program it will be transformed into gamma 2.2.

To set the correct display of materials in the "Material Editor", you should use the settings in the "Gamma and LUT" tab. For this the 2.2 value of Gamma in "Display" segment and checkboxes "Affect Color Selectors" and "Affect Material Editor" in a "Materials and Colors" segment must be set.

Gamma 2.2 has become the standard for many 3d professionals working with 3ds Max and V-Ray. We hope that this lesson will help you to correctly configure your workflow in 3d!

NOTE

For the theoretical correctness the expressions "in gamma" or "at gamma" should be read as "for gamma". So, the expression "image in gamma 2.2" or "image at gamma 2.2" means nothing but "image for presentation by a system with a decoding value of γ equal 2.2".

Check out detailed Gamma 2.2 correction theory, clearly explained by maxattivo.

【转】http://renderstuff.com/using-gamma-2-2-cg-tutorial/

时间: 2024-10-11 00:10:03

Using Gamma 2.2的相关文章

搜索引擎倒排索引表压缩:gamma编码

当你每天打开电脑,在百度搜索框中输入你要搜索的内容,按下回车之后,你可能不会意识到,有无数台主机在飞速运转,对比了数百万条记录,经过初步结果集生成.相关度打分.结果排序.摘要生成之后,才最终在你的屏幕上打出了你想要的结果.这一切仅仅发生在几毫秒之间. 是什么保证了如此迅速的检索速度呢?良好的索引构建是其中的要素之一.通常情况下,搜索引擎内部会为每个网页或文章分配一个数字id,用这个id代表这个网页或者文章.构建索引的时候,采用分词工具将这些网页或者文章分成一个个词,并网页id存储在称为倒排索引表

opencv实现gamma灰阶检測

简单介绍 本篇解说使用opencv来測试,表示camera gamma參数的灰阶卡图片指标:YA Block.DynamicRange.Gray Scale. 详细实现 实现代码 #include <math.h> #include <string.h> #include <stdio.h> #include <stdlib.h> #include <opencv2/core/core.hpp> #include <opencv2/high

LDA-math-神奇的Gamma函数

http://cos.name/2013/01/lda-math-gamma-function/ 1. 神奇的Gamma函数1.1 Gamma 函数诞生记学高等数学的时候,我们都学习过如下一个长相有点奇特的Gamma函数 Γ(x)=∫∞0tx−1e−tdt 通过分部积分的方法,可以推导出这个函数有如下的递归性质 Γ(x+1)=xΓ(x) 于是很容易证明,Γ(x) 函数可以当成是阶乘在实数集上的延拓,具有如下性质 Γ(n)=(n−1)! 学习了Gamma 函数之后,多年以来我一直有两个疑问: 这个

camera摄像原理之四:曝光和GAMMA

从最明亮到最黑暗,假设人眼能够看到一定的范围,那么胶片(或CCD 等电子感光器件)所能表现的远比人眼看到的范围小的多,而这个有限的范围就是感光宽容度. 人眼的感光宽容度比胶片要高很多,而胶片的感光宽容度要比数码相机的ccd高出很多!对于sensor来说,又是如何来判断曝光是否正确呢?很标准的做法就是在YUV空间计算当前图像的Y值的均值.调节各种曝光参数设定(自动或手动),使得该均值落在一个目标值附近的时候,就认为得到了正确的曝光. 在多数数码相机和拍照手机上都可以看到曝光级别设定的功能,如前所述

Gamma校正与线性空间

基础知识部分 为了方便理解,首先会对(Luminance)的相关概念做一个简单介绍.如果已经了解就跳到后面吧. 我们用Radiant energy(辐射能量)来描述光照的能量,单位是焦耳(J),因为光实际是以一定速度在传播的电磁波,所以把单位时间内的传播的Radiant energy(能量)称作radiant  flux(辐射通量),用来描述他的能量表现,单位瓦特(Watt). Radiant intensity(辐射强度)用来指定radiant  flux(辐射通量)的方向,正式的来说,他是用

《Gamma correct》

int ImageAdjust(IplImage* src, IplImage* dst, double low, double high, // X方向:low and high are the intensities of src double bottom, double top, // Y方向:mapped to bottom and top of dst double gamma ) { double low2 = low*255; double high2 = high*255; d

Gamma校正与线性工作流

1 Gamma校正是什么?8位亮度值x(0-1)经过x^0.45的一个提亮过程. 2 为什么需要Gamma校正 人的眼睛是以非线性方式感知亮度,在自然办中,人感觉到的一半高度其实只有全部能量的0.2,那么就是说,如果没有Gamma校正,8位亮度中,只用不到2位用来保存黑到半黑的信息,而余下8位中超过6位用来保存半黑到白的信息,这样图片中暗的细节太少,为了改善这种情况,经过Gamma校正后,原来0.2的值保存为0.5. 需要注意的是:一是现代8位的图片保存下来都是已经经过Gamma校正的.二是32

【图形学】我理解的伽马校正(Gamma Correction)

写在前面 我相信几乎所有做图像处理方面的人都听过伽马校正(Gamma Correction)这一个名词,但真正明白它是什么.为什么要有它.以及怎么用它的人其实不多.我也不例外. 最初我查过一些资料,但很多文章的说法都不一样,有些很晦涩难懂.直到我最近在看<Real Time Rendering,3rd Edition>这本书的时候,才开始慢慢对它有所理解. 本人才疏学浅,写的这篇文章很可能成为网上另一篇误导你的"伽马传说",但我尽可能把目前了解的资料和可能存在的疏漏写在这里

gamma校正原理

http://blog.csdn.net/u013286409/article/details/50239377 目录(?)[-] 图2中左图为原图,中图为gamma = 1/2.2在校正结果,原图中左半侧的灰度值较高,右半侧的灰度值较低,经过gamma = 1/2.2校正后(中图),左侧的对比度降低(见胡须),右侧在对比度提高(明显可以看清面容),同时图像在的整体灰度值提高. 右图为gamma = 2.2在校正结果,校正后,左侧的对比度提高(见胡须),右侧在对比度降低(面容更不清楚了),同时图

opencv实现gamma灰阶检测

简介 本篇讲解使用opencv来测试,表示camera gamma参数的灰阶卡图片指标:YA Block.DynamicRange.Gray Scale. 具体实现 实现代码 #include <math.h> #include <string.h> #include <stdio.h> #include <stdlib.h> #include <opencv2/core/core.hpp> #include <opencv2/highgu