Announcement

Collapse
No announcement yet.

Render element : metalness and smoothness values of VrayMtl

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

  • Render element : metalness and smoothness values of VrayMtl

    Hi there,

    Do you have any plan to update the render element in 3dsMax to get the reflection roughness and the metalness values of the VrayMtl?
    For now, the reflection glossiness pass renders perfect white even if some VrayMtl are set with a roughness value of 1 (which is wrong).

    Keep up the good work!

    Marc
    Last edited by MGC_Marc; 10-12-2021, 07:19 AM.

  • #2
    Sorry, the title of the topic has an error: I meant roughness and not smoothness !

    Comment


    • #3
      Originally posted by MGC_Marc View Post
      For now, the reflection glossiness pass renders perfect white even if some VrayMtl are set with a roughness value of 1 (which is wrong).
      It's simply always representing glossiness.
      So to get roughness you only need to do 1 minus the RE, for the material in question (i.e. you'll want the material masked out, if you mix the approach.).

      As for metalness, there is no real material which has half measures: it's either a metal (metalness of 1), or it's not and is a conductor (metalness of 0).
      What would you use the RE for, in compositing?
      Lele
      Trouble Stirrer in RnD @ Chaos
      ----------------------
      emanuele.lecchi@chaos.com

      Disclaimer:
      The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

      Comment


      • #4
        Thank you for your response! I use the render elements to generate textures for real-time rendering in Unity, projected in camera space, allowing me to get a nice pre-computed render (with Vray) mixed with some realtime stuff (I export world space normals as well with the SamplerInfo pass etc...).
        I agree, the fact that the roughness is missing from RE can be easily corrected in my shader in Unity. But it becomes a mess if in the same render some materials use glossiness and others use roughness. As an example, I use some KitBash 3D models and I can't be sure every material is configured with the roughness workflow. But I can deal with that, just have to check each material...

        The metalness is more problematic for me. Some time ago, I used to work with the PBR specular workflow in Unity: this way, I could use the VrayMtlIOR, VrayMtlReflectionColor and VrayMtlReflectionGlossiness rendered with the RE to feed my realtime material. It worked well, because in Vray all my metal materials were done with the fresnel option unchecked or a very high IOR value. But now, the metallic workflow is used everywhere. As an example, Substance Sampler (ex-Alchemist) only exports a metalness map (with the Vray export preset). And most of the online material libraries deliver textures with the metallic workflow. And I've not found any way to represent the metalness values in my renders with the render element. We can get almost anything we want with the RE, but not that. It's frustrating : )

        Comment


        • #5
          Originally posted by MGC_Marc View Post
          But it becomes a mess if in the same render some materials use glossiness and others use roughness. As an example, I use some KitBash 3D models and I can't be sure every material is configured with the roughness workflow. But I can deal with that, just have to check each material...
          Indeed, you'd need to mask out which shader is rough and which is gloss, or better still, simply run a script and ensure they all use the same approach (see below.).
          Code:
          (
          /*
          Switch to Roughness
          */
          
          theMats = getclassinstances VRayMtl
          for m in theMats where not m.brdf_useRoughness do --these use glossiness
          (
          m.brdf_useRoughness = true --make it use roughness
          if m.texmap_reflectionGlossiness != undefined and m.texmap_reflectionGlossiness_on do --we have a map and its influence is active
          (
          theOutput =output map1:m.texmap_reflectionGlossiness name:(m.texmap_reflectionGlossiness.name + "_inverterMap") --create and set up the output map
          theOutput.output.invert=true --invert it
          m.texmap_reflectionGlossiness = theOutput --put the inverted map back in
          )
          m.reflection_glossiness = 1.0 - m.reflection_glossiness --always invert glossiness because a map influence may be partial
          if m.texmap_refractionGlossiness != undefined and m.texmap_refractionGlossiness_on do --we have a map and its influence is active
          (
          theOutput =output map1:m.texmap_refractionGlossiness name:(m.texmap_refractionGlossiness.name + "_inverterMap") --create and set up the output map
          theOutput.output.invert=true --invert it
          m.texmap_refractionGlossiness = theOutput --put the inverted map back in
          )
          m.refraction_glossiness = 1.0 - m.refraction_glossiness --always invert glossiness because a map influence may be partial
          )
          theMats=#() --clean up
          theOutput=undefined
          )
          The metalness is more problematic for me. Some time ago, I used to work with the PBR specular workflow in Unity: this way, I could use the VrayMtlIOR, VrayMtlReflectionColor and VrayMtlReflectionGlossiness rendered with the RE to feed my realtime material. It worked well, because in Vray all my metal materials were done with the fresnel option unchecked or a very high IOR value. But now, the metallic workflow is used everywhere. As an example, Substance Sampler (ex-Alchemist) only exports a metalness map (with the Vray export preset). And most of the online material libraries deliver textures with the metallic workflow. And I've not found any way to represent the metalness values in my renders with the render element. We can get almost anything we want with the RE, but not that. It's frustrating : )
          I see, that makes perfect sense.
          I'll ensure to poke the devs about this.
          Lele
          Trouble Stirrer in RnD @ Chaos
          ----------------------
          emanuele.lecchi@chaos.com

          Disclaimer:
          The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

          Comment


          • #6
            Hi again
            Originally posted by ^Lele^ View Post
            Code:
            (
            /*
            Switch to Roughness
            */
            )
            This is nice to you, it works perfectly! I notice these lines are repeated twice, I guess this is a copy/paste mistake?
            Code:
            if m.texmap_reflectionGlossiness != undefined and m.texmap_reflectionGlossiness_on do --we have a map and its influence is active
            (
            theOutput =output map1:m.texmap_reflectionGlossiness name:(m.texmap_reflectionGlossiness.name + "_inverterMap") --create and set up the output map
            theOutput.output.invert=true --invert it
            m.texmap_reflectionGlossiness = theOutput --put the inverted map back in
            )
            m.reflection_glossiness = 1.0 - m.reflection_glossiness --always invert glossiness because a map influence may be partial

            Originally posted by ^Lele^ View Post
            I'll ensure to poke the devs about this.
            Thanks a lot, I will look forward to this feature update

            Have a nive day!

            Marc

            Comment


            • #7
              Originally posted by MGC_Marc View Post
              This is nice to you, it works perfectly! I notice these lines are repeated twice, I guess this is a copy/paste mistake?
              No, the second part says "refraction"
              Feel free to comment it out if you don't want to execute it (include it in \* and *\)
              Lele
              Trouble Stirrer in RnD @ Chaos
              ----------------------
              emanuele.lecchi@chaos.com

              Disclaimer:
              The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

              Comment


              • #8
                Originally posted by ^Lele^ View Post
                No, the second part says "refraction"
                You're right, of course Thanks!

                Comment


                • #9
                  Originally posted by ^Lele^ View Post
                  I see, that makes perfect sense.
                  I'll ensure to poke the devs about this.
                  Hi! Any news about the possibility to output the metalness value of all VrayMtls with a Render Element someday? I found another thread about the same issue (https://forums.chaos.com/forum/chaos...e-in-vray-next), but it the case of the render element, the workaround with an ExtraTexMax can't work.

                  Comment


                  • #10
                    Originally posted by MGC_Marc View Post

                    Hi! Any news about the possibility to output the metalness value of all VrayMtls with a Render Element someday? I found another thread about the same issue (https://forums.chaos.com/forum/chaos...e-in-vray-next), but it the case of the render element, the workaround with an ExtraTexMax can't work.
                    Yep, you can try it before it gets into an official release - https://nightlies.chaos.com/main#/vr...e_5.2/20220402
                    Last edited by matanov; 04-04-2022, 07:04 AM.
                    If it was that easy, it would have already been done

                    Peter Matanov
                    Chaos

                    Comment


                    • #11
                      Originally posted by matanov View Post

                      Yep, you can try it before it gets into an official release - https://nightlies.chaos.com/main#/vr...e_5.2/20220402
                      Nice! I'm happy to see there is a roughness output as well in the Render Elements. Thank you

                      Comment


                      • #12
                        Now officially released in 5.2.3
                        If it was that easy, it would have already been done

                        Peter Matanov
                        Chaos

                        Comment

                        Working...
                        X