You don’t need gamma node if you’re using Vray.
Simply select your file node, open attribute editor (ctrl+A if it isn’t already opened)
choose Attributes > Vray > tick “Texture input gamma”
You don’t need gamma node if you’re using Vray.
Simply select your file node, open attribute editor (ctrl+A if it isn’t already opened)
choose Attributes > Vray > tick “Texture input gamma”
Setting the gamma to 2.2 in the Colour Mapping options* is only for when your outputting to a non-linear format such as JPG. If your rendering to EXR then you want to leave it at 1.
*Exception given to having the “don’t affect colours” option on - which doesn’t apply any colour mapping to the final image. But I don’t use that option and I don’t know enough about what it’s doing to comment on it.
If you leave the gamma at 2.2 and bring it into Nuke as a linear EXR then all you are doing is doubling up your colour transforms (which is bad for the image) and your confusing what should be a very simple workflow.
Here is a simple setup between Vray and Nuke using a constant shader set to 0.18 (mid-grey). Both the Vray and Nuke viewers are set to an sRGB lut and I’m rendering to an linear EXR. It’s simple, easy to understand and is technically correct. If you pre-linearize or add the extra attributes to your file nodes - as Panupat suggested - in order to linearize the texture during rendering then you don’t need any gamma nodes (or mention of gamma) in your scene whatsoever.

My god!! So many Methods…!!
I am going to copy paste something from an other thread:-
[B]In Mental Ray -
(1) You change the setting under color management,
(2) and under texture file node (depending on what you have set as input under color management),
(3) render window for viewing properly
(4) add .454 gamma node to swatches…!!
(5) rendering in 16 bit or 32 bit exr or similar linear supported format…DONE!! (hope I didn’t miss anything)
In V-Ray-
(1) Turning on affect BG, don’t affect colors under color mapping and setting Gamma to 2.2
(2) Adding a texture and selecting the bit map input gamma under Vray extra node for 8-bit files
(3)sRGB button for V-Ray Frame Buffer
(4) Adding .454 gamma node to swatches
(5)rendering in 16 bit or 32 bit exr or similar linear supported format[/B]
So according to EarlyWorm, tthe above mentioned method’s are for jpeg and other 8bit formats…!! For .exr or .hdr we should keep it to GAMMA 1
So all this while even in Mental Ray, I was doing it wrong then.
Basically the rule of the thumb is if it’s not an hdri and a color or texture looks “correct” on your monitor. You need to ungamma it before rendertime (.454). This applys to any colors whether it’s diffuse/specular file or a swatch on a material or light.
-Dan
OH!! You have to color correct the swatch on a CG LIGHT? :surprised
There is so much I need to learn regarding the technical part of LWF :banghead:
Its simple really. If your sampler looks at the image at 1.0 and samples it accordingly - when you apply a sRGB LUT to your image in nuke or the VFB - your image will not have appropriately or sufficient sampling - espeically in darker areas. Setting color mapping to 2.2 but choosing dont affect colors makes sampling take place with a brightened picture - but still outputs an linear image.
Do note guys that sRGB and gamma 2.2 is not the same thing. Be careful of this. From an eyeballing point of view you can’t tell the diff… but sRGB has darker blacks.
Thanks, that makes some sense - I’ll give it a try. But wouldn’t you want less samples (relatively speaking) in those darker areas anyway? A little bit of sampling noise in the shadows does help mimic grain/noise.
Mmm perhaps but remember a dark value of 0.2 turns to 0.5 with a sRGB LUT. Now you have issues in your midtones.
It all really depends really too - linear can also have contrasting affects - and may result in oversampling when not needed. Sampling is intended to be adaptive in relation to our perception to achieve quality/speed where needed. The image should really be sampled in relation to as how we will see it 
EarlyWorm one more aspect of that “do not affect color,” is that if you do not turn in on then it bakes in the gamma value you have set into the image. In your method however, I reckon, turning that switch off doesn’t do anything much as you set your Gamma Value to 1.0
After doing a couple of test with different lighting scenario (1 simple rect light, dome light with a black & white ramp, HDR images, etc)…
I feel this workflow suits me better, kinda inclined to what revilo3D & majority of others suggested:- 
(1) Setting Gamma to 2.2, with do not affect color turned on
(2) Adding a texture and selecting the bit map input gamma under Vray extra node for 8-bit files & adding .454 gamma node to color swatches
(3)sRGB button for V-Ray Frame Buffer to view my images properly
(4)Rendering in 16 bit or 32 bit exr or similar linear supported format
However it does lack a lot of contrast which I am still trying to figure out, why?
In some situations I am getting good results with sRGB button turned off. So I think I will un-gamma those images with 0.454 or similar value inside Nuke to get it back. It better to do that, rather than working on non-linear and getting wrong maths.
**And I am also wondering if it is really necessary to add 0.454 gamma node to CG Light (vray light) swatches, like kanooshka suggested. If that’s what he meant, I might have understood it wrong.
Here is an image with few of my settings for LWF tests, that I think I will stick with:-
http://imageshack.us/a/img705/7158/10796679.jpg
One interesting observation I made during this test is that - WHEN I applied an HDR images to my dome light and rendered it, without adding “bitmap input gamma,” I got a renderTime of 4min on a 800 by 600 rez
by adding “bitmap input gamma,” and setting it to 1.0 I got the same result, no change whatsoever in quality or noise but the renderTime went down by 1 min, I got a 3min…
The lack of contrast gives you a lot more information to work with in the darker area. Feel free to adjust it in post to have the desire contrast. It’s way better than have an image without enough data.
Precisely Panupat!! ![]()
I thought I was doing something wrong, that’s why I was loosing contrast.
But continuous tests made me realize that its better to work on post rather than fiddling around with Maya and waiting each time for render to complete.
Interesting observation there
Will keep an eye on that. Do note - HDR is a linear file format and will not be required to be corrected. I think by applying the a correction attribute but not changing it - it’s coverting the HDR file into vrays internal format and may be more efficent. Have a look at your memory usage and see if you spot any changes there. This may also be a +1 for apply attributes rather than linear workflow checkbox option.
Never had problems with my mid-tones before. 
Interesting I would have assumed the opposite, that normalizing the values that your sampling (with a gamma of 2.2) would result in a higher number of and a more uniform distribution of samples.
As I say, I’ll try it out sometime.
revilo3D After reading your post, i did test it again and this time observed my RAM…
I think you must have already guessed it
, however When you do not use BIG(bitmap input gamma), the RAM usage is less compared to when you add BIG with a value of 1.0 to the HDR image.
It climbed up a little, so yes there is a difference.
And I think like you said, V-Ray might be optimizing it. 
EarlyWorm, you posted a picture of a cube, I thought that was little washed out though, I did not see your shader, so I can be wrong !!
You thought an unshaded grey cube was a little washed out!?
Sorry I couldn’t have come up with a prettier example.
The point was just showing that they’re matched visually and it’s a very simple test from which you’d easily spot if something was wrong between the two.
Good find with the RAM usage.
Even I was testing things with a matte grey Vray shader and getting washed out results.
I thought you were doing the same and I thought it did look a little brighter
I’m also trying to find my preferred LWF method and as such, I’m trying to understand other methods. I don’t really understand the one you described here. Newbie analysis, but here goes:
It seems to me that you’re only using V-Ray Colour Mapping to sample the image with a 2.2 gamma setting (as others have pointed out in this thread). Because of this, you’re linearizing your input textures files with the V-Ray extra attributes and the swatches with a simple Maya gamma node (but not the light colour swatch).
Is my analysis wrong? Wouldn’t it be more simple to set Colour Mapping gamma to 1.0, affecting colours AND affecting colour swatches? That way you wouldn’t need to manually apply a gamma node to every single colour swatch in Maya, leaving only colour textures to be gamma corrected, for a correct linear output render. What is your motivation to have Colour Mapping, well, affect the colours?
Also, by not setting any Colour Mapping, will V-Ray output a 1.0 gamma file? (it sure seems so, since you’re not affecting colours but are maintaining a linear output)
FranciscoSCN, what you said is something even I assumed in the beginning before doing tests. Again this is something I understood from my tests, so I can be wrong. As I haven’t seen a V-Ray proper Linear Settings from Chaos Group for Maya, though there is for 3DS Max.
The reason you gamma correct your scene(mid-tones) is to get a even lighting without blowing out areas and get details even in your darks. When you set your value to 1.0 you are not affecting anything at all. Everything is default. By adding a 2.2 gamma V-Ray understands why we do that, and affect our lighting big time.
Affect Colors check box, is merely for visual purposes.
It shows your final swatch look. Doesn’t affect render in anyways, or so I assume.
And I really do not think we need to color correct our light swatches to 0.454 gamma value like we do for shaders.
I did for a RAMP, nothing changed except the intensity of the color, thereby reducing the overall cast, which I can easily do with my slider controls and do not need an extra gamma node and it did not change my lighting much. So far I am getting a proper linear workflow with the current method. Yes I have a contrast issues, but with a simple color correction NODE in Nuke I am getting amazing results and more information in my dark region.
I do not think we need to have absolute dark anywhere (unless for some particular creative reason for a shot, for example Batman in pitch darkness, emerging out
).
here’s an image, if you haven’t seen already. - http://imageshack.us/a/img705/7158/10796679.jpg
I do not find it easier than Mental Ray like some others mentioned though, it seems the same to me, in terms of methods.
About the Affect Colours check box, I think you’ve got it mixed with the Affect Swatches one. As revilo3D said earlier (http://forums.cgsociety.org/showpost.php?p=7428040&postcount=19), the Affect Colours turned off just makes it not apply these settings to the image itself. So you’re NOT applying the 2.2 gamma that you’ve set, but using the 2.2 setting ONLY for the purpose of sample calculations. So this means VRay will still be outputting a 1.0 gamma image but sampling as if it were encoded with 2.2.