Announcement

Collapse
No announcement yet.

Fog problems with direct light

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

  • Fog problems with direct light

    Hi,
    we were trying to create the shader for a river, and for more realism the fog was a great parameter to play with for the water, but then, when rendering the shallow parts, we realized that the objects underneath the water were not casting shadows on the riverbed.
    We found out two things: the plane used for the water was casting shadows (no idea why, we disabled the cast shadow render stat in the shape, even though raytracing was supposed to get rid of that), and then we realized that the fog made the direct light completely disappear under the water, even in the shallow parts. We tried different values. High and low value in color, high and low in saturation, high and really low in the fog multiplier and in the bias. If we have fog there's no direct light. The only thing we saw was that if we used a really saturated color, then the direct light would appear in the render with that color, independent of the depth underneath the water.
    We would want a water shader that gets foggier depending on the depth of the riverbed underneath, so having the shallow parts cristal clear, and with the objects underneath casting shadows.
    For the fog, is the affect all channels the way to go? or color only?
    Probably we are using the parameters in the wrong way or expecting results that don't work with that parameters.

    Any ideas?

    Thanks!
    Gianluca

  • #2
    Hello,

    Based on your explanation I did a simple scene, does this work for your case? And in your case where did you connect the environment fog?

    Thank you,
    Georgi Zhekov
    Attached Files
    Georgi Zhekov
    Phoenix Product Manager
    Chaos

    Comment


    • #3
      thanks for your answer,
      We are not using the environment fog, we just used the fog parameter in the VrayMtl.
      Is that the problem? We just assumed that the fog in the refractions of the material would do the trick. Is that the issue? I'm opening your scene, but keeps getting me some errors, maybe because we're using the nightly builds.
      Do you think you could explain to me the procedure to get the fog in the water depending on the depth of the riverbed?

      thank you!

      Gianluca

      Comment


      • #4
        What I did in my scene was to use a displaced plane with VrayMtl and refraction all the way up - for the water surface.
        For the actual water I used a modified cube with assigned VrayMtl - opacity to 0 and Environment Fog plugged into the Volume slot for the shading group. For the riverbed I used simple plane with standard VrayMtl. In the attached files you can check the setup.
        Is this the result you are after?

        Thank you,
        Georgi Zhekov

        Click image for larger version

Name:	Fog_topView.JPG
Views:	1
Size:	182.0 KB
ID:	851310Click image for larger version

Name:	Fog_envFog.JPG
Views:	1
Size:	137.1 KB
ID:	851311Click image for larger version

Name:	Fog_refractiveMtl.JPG
Views:	1
Size:	129.2 KB
ID:	851312Click image for larger version

Name:	Fog_sideView.JPG
Views:	1
Size:	159.4 KB
ID:	851313
        Georgi Zhekov
        Phoenix Product Manager
        Chaos

        Comment


        • #5
          Yeah, that seems to work! The only problem seems to be the box were the fog is, for our scenes is a little difficult to create it. And also the fog seems to be really heavy on render. But that's actually more or less what we were looking for. The question still remains though. Why the fog color on the material is not working by itself. It needs an environment fog always to work as we expected?

          Thanks for the answer!!

          Comment


          • #6
            The Fog inside of VrayMtl allows to simulate the fact that thick objects look less transparent than thin objects. Still in your case I would stick to the environment fog as this would help you achieve the result you are after.

            Thank you,
            Georgi Zhekov
            Georgi Zhekov
            Phoenix Product Manager
            Chaos

            Comment

            Working...
            X