Announcement

Collapse
No announcement yet.

Getting the reflection, spec etc from a MtlSelect render element.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Getting the reflection, spec etc from a MtlSelect render element.

    Hi all

    I have a car paint which I want to have total control over in nuke. Its a Vray blend with about 4 shaders, the top one being the gloss coat which contains specular and reflection information.

    Is there a way in nuke that I could get the specular information and the reflection information independent from each other from the gloss coat mtlselect element?

  • #2
    Unfortunately there is not way to separate different components of the material extracted with VrayMaterialSelect Render Element.
    This render element contains all the information - including Reflection and Specular.
    Probably the most appropriate workflow would be to to render a separate pass for each component of the Blend Material - then you will have them separated by Vray and then you can compose them in Nuke.

    I have also found one more workaround without multiple passes which I couldn't guarantee that it will work in any case but you could try it and decide for yourself.

    Since with VrayMaterialSelect Render Element we couldn't separate material layers what we can do is to prepare a blend-shader with one layer per material.
    Instead of adding a single material with Diffuse / Reflection Glossiness / Highlight Glossiness - we could add all these properties on separated materials and then extract each of them with VrayMaterialSelect.

    Let say that we have a scene with a Blend-Material with 3 Sub-materials - Base / Green / Red.
    Base Material contains only diffuse color:
    Green and Red one have diffuse and Reflection with different properties for Glossiness.

    In order to extract all these components on separate layers I need to put every layer (Reflection / Diffuse and etc) on a separate shader.
    So for Green(Red) material I added one material for Diffuse - which will hold only diffuse color, another one for Reflection which will store the full Reflection + Glossiness , and one last for Reflection used for keeping only Reflection information without Glossiness (Highlight Glossiness is set to 1). Two Reflection materials are needed because I would like to separate the Reflection Glossiness from Highlight Glossiness in order to control them independently in Nuke.
    Then each of these materials are connected to separated VrayMaterialSelect elements - and separate images will be saved for each sub-material.

    Click image for larger version

Name:	screen_01.JPG
Views:	1
Size:	269.2 KB
ID:	847721


    Now is the tricky part - how to combine these elements in such way that we could control everything independently in Nuke.
    We already have a Diffuse of each material separated - it is not actually a pure diffuse it contains information about GI and Lighting but it could be used to change material color on post, and from other side we are most concerned now how to control the reflections and specular.
    Since the Glossy component contains Specular information in it I have to subtract it with the help of the Reflection component. I have found that if I do that straight forward I lose some information and my final comp isn't match the Beauty pass - so I have added the Grade nodes with multipliers 2 and 3 and I got almost perfect separation of the Secular and Reflection Layers - yes it is not 100% correct but it is 99.99 which is totally fine for me.

    With this workflow now I am able to control each of the materials parameters independently from each other - Reflection , Diffuse , Specular , and my composition matches almost perfectly the beauty pass - you can see that in difference node at the bottom everything is black , the only way to find out that there is a mistake is to point with the mouse over the black part of the image and you will see that there are some extremely low values.

    I have added some colors to Nuke-nodes : green means > input file , red > control over specific layer.

    Click image for larger version

Name:	screen_02.JPG
Views:	1
Size:	162.7 KB
ID:	847722

    I am not sure if this is going to work in every situation , but in this case works perfectly.
    3DSMax and Nuke files >> 367_RenderElements.zip
    Svetlozar Draganov | Senior Manager 3D Support | contact us
    Chaos & Enscape & Cylindo are now one!

    Comment

    Working...
    X