Announcement

Collapse
No announcement yet.

Fog Bias

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

  • Fog Bias

    Hi Guys
    I know that in the new V-Ray 5.2 we have Fog Color depth, which is like the Fog color multiplier. But how do I get the effect of fog bias? is there are a way to accentuate the thicker or the thinner part as before?
    I'm missing that option already.

    Best,

  • #2
    Hi Guys
    Any answer here?

    Comment


    • #3
      Hello javierrentas

      Apologies for the delayed reply!

      As you have noticed, the Fog Color Multiplier has now been replaced by the Depth (cm) parameter.
      However, what I believe you're looking for is the following: Under the Fog Color and Depth (cm), you'll see the Translucency parameter, which is set to "None". Switch it to SSS and this will replace the Fog Color and Depth (cm) with Scatter Radius and Scale (cm). If I'm understanding you correctly, this should now allow you to achieve the desired result with the appropriate values.

      Nevertheless, if you're not getting the desired results, please provide us with a more detailed description (and if possible with screenshots) to illustrate your goals better and we'll do our best to provide you with more accurate instructions.
      Zahari Ivanov | chaos.com
      Chaos Support Representative | contact us

      Comment


      • #4
        Hi,

        A company wide decision was made for the fog bias parameter to be removed from the UI.

        You can still show the parameter for any specific material using a script.
        Here's how you do it:
        1. Copy the name of the material you'd like to show the bias for
        2. Replace the materialName substring with yourMaterialName in the following script:
          Code:
          	import rhVRay as vray
          	vray.Scene.Plugin("/[B]materialName[/B]/VRay Mtl").fog_bias = 0.5
          	vray.RefreshUI()
          If your material is called Generic for example you should change the script to:
          Code:
          	import rhVRay as vray
          	vray.Scene.Plugin("/Generic/VRay Mtl").fog_bias = 0.5
          	vray.RefreshUI()
        3. Run the script in the Rhino Python Editor - the fog bias parameter will show up in the UI.
        Note that if you set its value to 0 it'll once again disappear.

        Hope that helps,
        Konstantin

        Comment


        • #5
          I tried to run the script and it said there is a syntax error. I want to run it in a Generic material name.

          Comment


          • #6
            I'm getting the following error. Any idea? My material name is "Generic"
            Click image for larger version

Name:	error.png
Views:	162
Size:	40.8 KB
ID:	1135321

            Comment


            • #7
              Hi,

              you have extra leading tabs in your last two lines. That is not valid python syntax, since "import" is not a keyword that opens a new scope

              Comment


              • #8
                That worked! Thank you!

                Comment


                • #9
                  The tabs seem to be automatically added here in the forum (caused by the numbering somehow).
                  Here's the clean code:

                  Replace the materialName substring with yourMaterialName in the following script:
                  Code:
                  import rhVRay as vray
                  vray.Scene.Plugin("/[B]materialName[/B]/VRay Mtl").fog_bias = 0.5
                  vray.RefreshUI()
                  If your material is called Generic for example you should change the script to:
                  Code:
                  import rhVRay as vray
                  vray.Scene.Plugin("/Generic/VRay Mtl").fog_bias = 0.5
                  vray.RefreshUI()
                  Konstantin

                  Comment


                  • #10
                    Hi Kotse
                    Thank you for the help! The script worked perfectly!

                    Comment

                    Working...
                    X