Linear Workflow Checkbox Information

Hello,

We are currently writing a tool to “undo” what the linear workflow checkbox affects, so we can begin the process of not being reliant on it, and update older assets that were using it. Is there a list of the shader input names that are currently getting the gamma correction? This would help our development team with the tool. If you have the names in a way that they are labeled in python that would be even better. Thank you for the help.

Here is the list of parameters affected by the ‘Linear workflow’ option:

VRayMtl:
    “diffuse”/“texmap_diffuse”
    “reflection”/“texmap_reflection”
    “refraction”/“texmap_refraction”
    “translucency_color”/“texmap_translucent”

Physical Material:
    “base_color”/“base_color_map”

The names are actually used for the plugin parameters in 3ds Max - they are automatically exported both in MAXScript and Python object wrappers.

Additionally, here is a sample script that inspects all nodes’ materials in the scene’s nodes:

import MaxPlus

def outputNode(n, indent = ""):
    nMtl = n.Material
    if nMtl:
        print indent + nMtl.GetName()
        for p in nMtl.ParameterBlock.Parameters:
            print indent + "==" + p.Name + ": " + str(p.Value)
    for c in n.Children:
        outputNode(c, indent + "--")

if __name__ == "__main__":
    outputNode(MaxPlus.Core.GetRootNode())

It would be interesting to know how will you approach this. In Maya directly or in Standalone without going through Maya?

Thank you Aleksander.

Can you also list the attributes for Vray Fast SSS, Skin, Hair 3, Hair Next, and car paint?

As we will be doing this in Maya, do you have the Maya attribute names rather than Max?

We are expecting to do this inside Maya directly just so the artists can double check the render of the assets. It is a bit of a difficult situation as we have many vendors using older assets that do utilize the checkbox, but we want new assets going forward to abandon it. There will be a tool that lighters can run in their file to upgrade an old assets, and then we will most likely be doing a new publish of our current shipping assets to get them upgraded.

Since the assets continue year to year it is hard for us to have the idea of a “show” where can simply have a new set of assets, as each asset tends to continue to be used for years down the line. We are hoping the combination of the new publishes and a tool a lighter can run to upgrade will suffice while the old assets are phased out.

Any other ideas you can share would be very helpful as well.

Hi Aleksander, did you have any update on the above question regarding the way the other materials react with the linear workflow checkbox? Thank you for the help

The Linear Workflow option checks if the gamma parameter is different than 1.0 and inverse correct colors with the gamma value.
For SSS2 only, there’s a linearWorkflow attribute to the VRayFastSSS2Mtl node, and both attributes (the one on the SSS2 material and the one in the Color Mapping options) need to be enabled to correct the colors.

Since this option never accounted for Maya’s Color Management system, the input colors and textures may be incorrectly transformed, and will likely be double-corrected. Migrating your old assets might mean that they will render as they did before, but keep an eye out for cases where by accident Maya’s Color management was enabled along with V-Ray’s Linear Workflow option.

Here’s a list of attributes to consider when migrating your assets:

Maya Node
Parameter (Maya UI label)
Maya Attribute Name

VRayCarPaintMtl
Base Color
color

VRayMtl
Diffuse Color
color

VRayMtl
Reflection Color
reflectionColor

VRayMtl
Refraction Color
refractionColor

VRayMtl
Translucency Color
translucencyColor

BRDFToonMtl
Diffuse Color
diffuseColor

BRDFToonMtl
Reflection Color
reflectionColor

BRDFToonMtl
Refraction Color
refractionColor

BRDFToonMtl
Translucency Color
translucencyColor

VRayFastSSS2Mtl
Overall color
overallTex

VRayFastSSS2Mtl
Sub-surface Color
subsurfaceColor

VRayFastSSS2Mtl
Scatter Color
scatterRadiusColor

VRayFastSSS2Mtl
Scatter radius (cm)
scatterRadiusMult

VRayFastSSS2Mtl
Diffuse Color
diffuseTex

VRayFastSSS2Mtl
Specular color
reflection

VRaySkinMtl
Shallow Color
shallowColor

VRaySkinMtl
Medium Color
mediumColor

VRaySkinMtl
Deep Color
deepColor

VRaySkinMtl
Diffuse Color
diffuseColor

VRaySkinMtl
Pr. Reflection Color
primaryReflectonColor

VRaySkinMtl
Sec. Reflection Color
secondaryReflectonColor

Please note that since V-Ray Next, the VRaySkinMtl is no longer available and we recommend using the VRayAlSurface material instead. VRaySkinMtl will still load from old scenes and render, but will be represented as a BRDFSkinComplex node, whose attribute names will differ like so:

Maya Node
Maya Attribute Name

BRDFSkinComplex
shallow_color

BRDFSkinComplex
medium_color

BRDFSkinComplex
deep_color

BRDFSkinComplex
diffuse_color

BRDFSkinComplex
primary_reflection_color

BRDFSkinComplex
secondary_reflection_color

As for Hair 3 and HairNext - no parameters were ever corrected.

Thank you Alex, this is helpful.

Hi Alex. I have been helping Stephen figure out the best ways to convert our current linear checkbox 'On" assets converted to work with the checkbox off. For the most part we have just been able to insert gamma correct nodes (of 0.454) in front of the correct inputs, using the ones you have listed in your post.
Everything seems to work as expected except for FastSSS2. On FastSSS I am not quite sure how to properly correct ‘Overall Color’ and ‘Diffuse Color’. Using the normal correction methods doesn’t seem to be working for me. I tried using a correction of 0.227 on the Diffuse since it seemed like it might have been doubling up on the Overall Color value, but just wanted to ask to see if you could provide any more insight into how we can properly correct for it.

I attached an example scene. The scene has two render layers setup (legacy render layers) that have the linear checkbox enabled/disabled. We are testing inserting Gamma correct nodes into the basic shader setup to get them matching between render layers. As you can see the FastSSS2 setup isn’t quite matching. I am guessing there is just some additional math that is going on that we need to be accounting for.

Thanks.
linearTesting_AH_v002_forChaosGroup.ma.zip (45.5 KB)

Hi,

I haven’t had the chance to confirm this with the devs, but yes, it seems that there is some doubling up on the diffuse color. Following your logic, though, I was able to get a visually identical result with a doubled up gamma correction (0.454*0.454=0.206116), in essence gamma correcting the gamma correct.

Is there a reason why you can’t use the Maya color management for this? I suppose you’re trying to perfectly match your assets, but I get the feeling that in this way you are going to get wrong results wherever the linear workflow option would produce wrong results. For example, the maya color swatch should already be providing the correct result in the correct color space, but LWF would correct it regardless.

Thanks Alex I will test that out. And yeah this is to maintain the look of older assets that were built with the LW checkbox and now will be used without the LW checkbox. Going forward on fully color managed assets gamma corrections shouldn’t be needed.

Thanks for the help.

That’s good to hear. In the meantime, I’ll update the thread should I find anything else. Looking forward to hearing how tests go.

Hey Alex, could you clarify exactly what you did with the FastSSS2 to get a match? Having trouble replicating it.

I just added an extra gamma to the diffuse texture and kept all gamma nodes at 0.454
It turns out that FastSSS2 has an extra Linear Workflow attribute, enabled by default.


Perfect thanks for the help on this!

Hi there,

We are still grinding away on this, preparing to convert our whole asset library. I noticed today that the diffuse, reflection, and refraction amounts are all needing a gamma correction of .454 on Vray Materials. Chaosgroup, can you verify this? I was surprised as these are scalar values and I would not have expected they would be getting touched by the linear workflow checkbox. But, the only way to make these channels sync up is having a .454 going into them.

Thank you!

The amounts are multiplied by the input and then corrected. We take the input, pass it through a multiply/divide where the multiplier is taken from the amount value/input, then passed through a gamma node and plugged in the color. Then the amount needs to be set to 1.0 in the scene.
Will you need to use this in the builds from version Next?
We will include a conversion with V-Ray 5. We’re actually almost ready with it and we handle the amounts there too.

We were getting prepped and were intended to have old assets ready to go before the release of 5. I think the amounts were the last piece of the puzzle I think. Do you all have a rough idea of when vray 5 is going to release?

Is your tool working enough that you could pass it over for us to use on some tests?

We are polishing up a final few things on our tool. It is built-in V-Ray 5. I’ll look into sharing the code, it uses the OpenMaya python module.
Yes, the amounts are the last piece of the puzzle. We aim at releasing V-Ray 5 in the upcoming weeks.

What version of V-Ray would you test this on ?

We would most likely test on vray 4.12.02 with “use legacy materials” checked off.

We also have 4.30.xx versions installed if we need to use that. Is there any key differences?