Announcement

Collapse
No announcement yet.

Directional or Uniform for thin leaves?

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

  • Directional or Uniform for thin leaves?

    Hey everyone,​

    Which mode is best for thin leaves, Directional or Uniform?​ Thanks

  • #2
    Uniform will likely be (much) quicker for leaves, and as their mesh isn't very deep, it's likely to also give you a better overall look.
    Switching between modes will change look with unchanged settings, so you may need to tweak.
    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


    • #3
      Lele, would it be possible to get a best practise explainer for vegetation materials? I have followed your previous discussions on this and have found them very useful. Also possibly a script to change existing leaf materials to these settings?

      Comment


      • #4
        https://docs.chaos.com/display/VMAX/How+to+Make+Leaves
        The new method (VrayMtl + Thin-walled + SSS) is more convenient​. What kind of script do you need?​

        Comment


        • #5
          Originally posted by response View Post
          Also possibly a script to change existing leaf materials to these settings?
          It's difficult to imagine a script without seeing how stuff is built.
          I suppose it could be done for coherent pipelines where some metadata was provided on how the shader was built (f.e. naming materials and maps with a convention) that could be leveraged to help the script logic.
          In theory, it should be enough to change the materials once, though, and then you should be able to reuse the assets.

          I'm open to suggestions, however: what did you have in mind?
          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 Lele, I'll try to explain, please ignore my ignorance on how scripts are made and what's possible. My previous leaf materials used a Vray2SidedMtl as described in the link provided by Nikita above. I'm finding I'm now achieving nicer results using the VrayMtl approach with Thin-Walled and SSS. Could a script do the following?

            - convert an existing Vray2SidedMtl to a simple VrayMtl, utilising the Front VrayMtl.
            - unlock and set the Fresnel IOR to 1.3
            - check Thin-walled.
            - set Translucency to SSS and amount to 0.2.
            - link the diffuse texture in a colorcorrection map to the SSS color, and set the Gamma/Contrast to 1.5.

            The items above are what I'm doing to my existing tree materials and I'm finding it to be quite time intensive. A leaf preset in the VrayMtl with the setting above would be great too.

            Comment


            • #7
              You can do 1/2 of these operations simply with VMC
              James Burrell www.objektiv-j.com
              Visit my Patreon patreon.com/JamesBurrell

              Comment


              • #8
                - convert an existing Vray2SidedMtl to a simple VrayMtl, utilising the Front VrayMtl.
                - unlock and set the Fresnel IOR to 1.3
                - check Thin-walled.
                - set Translucency to SSS and amount to 0.2.
                - link the diffuse texture in a colorcorrection map to the SSS color, and set the Gamma/Contrast to 1.5.​
                Hi response, I complete the script for you. Can you explain the last point?

                Comment


                • #9
                  sorry mate, missed a step on the last comment. I then want to link this new node into the translucent slot of the material. Does that make sense?

                  Comment


                  • #10
                    I then want to link this new node into the translucent slot of the material.
                    If translucentMap is not in FrontMtl, then translucentMap (Vray2SidedMtl) can be assigned to translucentMap (VRayMtl). Are you talking about this? Sorry for my English​

                    Comment


                    • #11
                      Test the script. What wishes?​
                      Code:
                      try(destroyDialog VRay2SidedMtl_Replace)catch()
                      rollout VRay2SidedMtl_Replace "Replace" width:216 height:30
                      (
                          button btn_Replace "VRay2SidedMtl Replace to FrontMaterial" pos:[3,5] width:210 height:20
                          
                          on btn_Replace pressed do
                          (
                              for vr in (getclassinstances VRay2SidedMtl) where vr.frontMtl != undefined and iskindof (fm = vr.frontMtl) Material do
                              (
                                  if fm.texmap_translucent != undefined do
                                  (
                                      replaceinstances vr fm
                                      fm.refraction_thinWalled = on
                                      fm.translucency_on = 6    -- SSS
                                      fm.translucency_amount = 0.2
                                      fm.reflection_lockIOR = false
                                      fm.reflection_ior = 1.3
                                      fm.refraction = color 0 0 0
                                      fm.translucency_surfaceLighting = 1    -- Uniform
                                  )
                              )
                          )
                      )
                      createDialog VRay2SidedMtl_Replace​

                      Comment


                      • #12
                        - link the diffuse texture in a colorcorrection map to the SSS color, and set the Gamma/Contrast to 1.5.​
                        Explain to me more details​

                        Comment


                        • #13
                          thanks mate, testing now!. Screenshot attached in regards to the diffuse map being plugged into color correction, then the Translucent slot.

                          Comment


                          • #14
                            Hi response, did you receive my message?​

                            Comment

                            Working...
                            X