Linear workflow, Vray, and Maya


Righty-ho chaps, some advice if you’d be so kind :slight_smile:

I see in the Vray manual ( it is stated that the ‘linear workflow’ checkbox in vray’s Color Mapping tab is apparently NOT intended as a replacement for “proper linear workflow”, which I take to mean applying a gamma curve node of .454 to all your textures?

I had just been checking ‘Linear workflow’ in the Color Mapping tab, and then setting the Gamma in the same tab to 2.2 and firing away (note this is for saving images straight from the VFB render window)

Should I instead be doing things the old-fashioned way? And where does ‘Affect swatches’ fit into all this? Is it a replacement for adding .454 nodes to each texture?


I regard the line you are referring to as a kind of disclaimer.I would reword it as “checking this box will not solve all your linear workflow issues”. However it solves most of the common ones though. I think you’ll find people that leave it checked and others who don’t. I’m one of the ones who leave the box unchecked.

So my color mapping settings are:
linear multiply, gamma 2.2, affect background ON, subpixel mapping ON, Dont affect colors ON, linear workflow OFF, clamp output OFF, affect swatches ON.
Render to exr 16-bit (half float).
Use the sRGB lut in the VFB
Check “convert image to sRGB for RenderView”, and copy images to RenderView for saving in 8-bit formats.

You dont need the old gamma correct node for fileTextures because you can add the vray “bitmap input gamma” attributes to the fileTexture node. The defaults are correct for linear workflow on a sRGB monitor.

“Affect Swatches” changes the display of the swatch in the attribute editor for vray materials so that they show the effect of your color mapping choices.



Hey, David,

I am curious why you opt for subpixel mapping ON and linear workflow OFF?

Regarding the subpixel mapping, there are some discussions on the Chaos forum, but I haven’t investigated it enough. Just did a test last night. Rendering with subpixel mapping ON, it will cut the render time quite a lot for the test scene. Though I found that the specular reflections are much dimmer. This might affect post glare IMHO.

Regarding the linear workflow OFF (using Vray bitmap input gamma instead), is it for finer or localized control?



I’m actually curious as well…Thank you for the Vray bitmap tip, I couldn’t figure out why my images still looked washed out yet I had checked the linear workflow checkbox before I set up my scene. So far Vray has been a pleasure to work with, the render elements are a real treat.


the defaults are 2.2 , this is correct? dont you want to degama it to .455


Yes. It simply means “this image is sRGB”. It save you having to do the math and figure out how to degamma it.

subpixel mapping ON to avoid aliassing artifacts, especially on thin overbright highlights and edges. This might also explain why your reflections looked a bit dimmer.

linear workflow OFF so that I can decide what needs correction and what does not (as you suspected). I think that vray actually does a good job of guessing when you have this ON (especially if you use vray materials), but since I have a good understanding of linear workflow, I think it is safer to control this manually and leave it OFF- which is easier in vray than mray I think.



Thanks for the explanation, David. I’ll dig deeper to learn further the impact of subpixel mapping.
BTW, great new post on your blog. Looking forward to seeing more Vray and Nuke stuff coming. :slight_smile:


Thanks a lot David, only one question; what exactly is the vray “bitmap input gamma” attribute and how should it be used? In conjunction with the settings you described in the prior paragraph?


Select any node in maya and open the attribute editor and depending on what node it is you can add extra vray attributes (using the drop-down attributes|vray menu). If you select the fileTexture node you’ll be able to add a pair of attributes by selecting “bitmap input gamma”. The first is just a check box to enable/disable the gamma correction, the other lets you specify the gamma value of the image. The default value is 2.2 since almost all 8-bit images are in sRGB space. If “Enable input bitmap gamma” is checked (default) then the image will be gamma corrected to be in linear space. (So in the default case a gamma of 0.455 will be applied for you - and it saves you doing the math to figure that out).

If you had set Linear Workflow ON in render settings, then you would not need to add the fileTexture attributes. Some people prefer to work that way. I just like the extra control I get by doing it on a per file basis.



thanks for the heads up.


I haven’t had a problem so far with those settings but I would like to have the option of controlling it myself like I did previously in MR. I can’t seem to access that attribute in the filetexture node David hmm, under vray there aren’t any attributes for me to add?

Just to be confident with these settings in vray I did a quick test:
Vray for Maya gamma test


You should have a menu in the attribute editor like this one. (this snapshot is from 1.5 sp1)



I was wondering if you would use the gamma correction on spec maps, bump maps etc for Vray for Maya.

Also when using the Vray gamma correction attribute should you use SRGB or Gamma under the Extra Vray Attributes tab?



I was wondering if you would use the gamma correction on spec maps, bump maps etc for Vray for Maya.

No. You only ever want to gamma correct Color values, not float/vector.


The default gamma=2.2, which is close enough to sRGB that you probably wont notice any difference. From this point of view sRGB is probably the logical choice (although this is a more recently added option, so some people will not be seeing it). On the other hand you would use gamma if your image is not sRGB, but some other colorspace. This is less common of you are using simple 8-bit formats, but may be useful depending on where you images came from.

If you are not sure, its a good bet to go with gamma=2.2 or sRGB.



I made a LWFMe button for V-Ray Tuner to make the proper switches for LWF:

It also warns that you have to turn on sRGB in the VFB but it’s done by the script for hte Maya render view. Obviously you should understand these things before just looking for a one click thing but I find it handy for new scenes. The optimize button also sets core and bucket size for your machine:

global proc lwfMe()
setAttr vraySettings.cmap_linearworkflow 1;
setAttr vraySettings.cmap_adaptationOnly 1;
setAttr vraySettings.giOn 1;
setAttr vraySettings.cmap_gamma 2.2;
setAttr vraySettings.sRGBOn 1;
//Dave's personal settings 
setAttr "vraySettings.cmap_affectBackground" 0;
warning "The Maya Render view is now corrected for Linear Workflow. Enable sRGB in the VFB to see it properly there too.";


Thanks for the reply.

I have the settings set to what should be a linear workflow but I feel I might be doing something wrong.

If someone could take a look at the colour mapping settings I have and tell me what I am screwing up it would be greatly appreciated.

I have tried the renders with the convert image to sRGB for render view off and on and I get the same results as evidenced by the darker render of the car on the bottom. And above it is the same renders with the sRGB button in the render view pressed.

The bottom render is way too dark, I can not make out details at all and when I turn up the brightness of the lights i just get blown out highlights and no further detail comes through in the darker areas. :banghead:


Well I think I figured it out. I tend not to use the sRGB button in the vray frame buffer and having dont affect colours checked kinda forces you to have sRGB on in the VFB…its always the simplest things that cause the biggest headaches!

I don’t want to do any post work so I guess leaving dont affect colours checked off would give me the desired outcome right out of the VFB without any fiddling after the fact.

Would my assumption be correct?


Turn on Linear Workflow and enable sRGB in the VFB. You will probably need to tweak your lighting after since you weren’t rendering with this rendering intent before. Also, if you’re using a sun/sky system, exposure is usually controlled via the physical camera attribute added to the camera.

I only enable subpixel mapping only if i notice artifacts around lights like black aliased halos.


So I should check the linear workflow box or no?

My original intent was to render linearly but clearly I was screwing something up. I have the textures gamma corrected, and what not, so wouldn’t enabling sRGB in addition to checking the linear workflow button in the Vray colour mapping just screw everything up?

As of right now I have the following settings.

affect background
don’t affect colours are both checked on under colour mapping

gamma is @ 2.2
dark and bright multi are at 1
affect swatches is checked on

And in Vray common
convert image to sRGB is checked on as well

and the sRGB button is also turned on inside the VFB.

I get the same result if I have the dont affect colours checked off and the VFB sRGB button off as well. I assume this way the linear workflow is baked into the image?

I want to clarify and understand this as best as I can.


Since you are managing LWF yourself, you should leave the “linear workflow” button unchecked. This is the recommended way of working.

You should also leave sRGB checked in the VFB, and render to exr. You can then convert to any colorspace (eg sRGB) in post.