Announcement

Collapse
No announcement yet.

V-Ray 5.1 Shadows not coming through refracting surface

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

  • V-Ray 5.1 Shadows not coming through refracting surface

    Click image for larger version  Name:	image_63443.png Views:	4 Size:	1.03 MB ID:	1105348Click image for larger version  Name:	image_63444.png Views:	4 Size:	1.08 MB ID:	1105349Click image for larger version  Name:	image_63445.png Views:	4 Size:	1.02 MB ID:	1105350

    I made a simple pool with some water (plane). Works fine from above - shadows coming through the surface and being refracted by the water. But when I take a camera below the surface, the shadows disappear (or rather, the light disappears).
    Only way to get them to appear in under-water camera is to set IOR on water to 1.000 or delete it. Is this the expected behavior?

    Scene file - max 2021.
    vray5_pool_shadow_issue_max2021.zip
    Last edited by HenrikBC; 02-03-2021, 11:14 AM.
    http://henrikbclausen.com

  • #2
    You can turn on caustics, which you'd want in any case I guess. Then you'll have shadows and nice caustics
    https://www.behance.net/bartgelin

    Comment


    • #3
      It's a very good catch, in fact.
      I've notified the interested party, will update you as i'll know more.

      For now, as a workaround, set the depth to a high value (say, 1000), turn off "Affect Shadows", turn on Caustics, set them to progressive, and leave the options alone.
      Finally set the engine to progressive, and render away.

      This is what you'll get (after a minute on a slow CPU).

      Click image for larger version

Name:	pool.png
Views:	464
Size:	1.58 MB
ID:	1105384
      Last edited by ^Lele^; 02-03-2021, 01:05 PM.
      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
        I'd argue that this should work - with or without caustics.
        Just made a test of a house with glass windows (planes - in my test). Same issue. Looking in from the outside it looks fine. If I pop the camera inside the house - no light coming through the windows. However, if I put a shell on the window (plane) object, then it works - light coming through as it should.
        This seems like a bug or an oversight.

        Edit:
        Thanks, ^Lele^. Wrote the above before I saw your post. Looking forward to an update/info.

        Edit2:
        And I understand how to get caustics in there. I'd just like the option of good old regular light and shadow as well.
        Last edited by HenrikBC; 02-03-2021, 01:24 PM.
        http://henrikbclausen.com

        Comment


        • #5
          I'd agree with you on first sight, but by now i know better than to be sure of nigh anything. ^^
          We'll know more soon.
          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
            both water in the pool and glass need volume to work properly. otherwise ior 1.
            Marcin Piotrowski
            youtube

            Comment


            • #7
              Originally posted by piotrus3333 View Post
              both water in the pool and glass need volume to work properly. otherwise ior 1.
              That may be the case, but I think that's a bit counter intuitive in the case of my example, being below the water, inside a swimming pool, for instance.

              Click image for larger version  Name:	pool_caustics_01_flat.png Views:	0 Size:	1.25 MB ID:	1105406Click image for larger version  Name:	pool_caustics_02_thick.png Views:	0 Size:	1.25 MB ID:	1105408

              Image A: Water is shaped like a box - which we are inside - so technically a volume, but I know, the light only passes through one surface at top as we are inside of it. Caustics look like i expect - but the only way to have shadows (as far as I have tested) is by also having caustics.
              Image B: Same water box, but now it has a very thin height - so we are looking up through both the "in" and "out" surface. I don't like the look of the caustics in this one - and the water looks wrong, but I get why they look different.

              I don't see a reason shadows/light shouldn't just "work" when observed from "behind" a flat refracted surface. In the example above (because I do like splitting certain stuff into passes and not "rely" on caustics) it would mean having two unique water meshes for the separate passes - which may create unwanted artefacts in the displacement when one of the surfaces goes from being flat->displaced to thick->displaced.

              TLDR: If this is just how it is, then it is possible to work around, sure. I just prefer less working around.

              Let's see what the developers has to say.
              Attached Files
              Last edited by HenrikBC; 02-03-2021, 03:17 PM.
              http://henrikbclausen.com

              Comment


              • #8
                Thanks for the scene in the original post, looking into it.

                [Edit] The issue is due to some changes I made around the new SSS modes; I have a fix and will post here when it's available.

                Best regards,
                Vlado
                Last edited by vlado; 03-03-2021, 03:45 AM.
                I only act like I know everything, Rogers.

                Comment


                • #9
                  In the meantime you can use the old trick of enclosing the camera with a sphere with inverted normals that has the same material as the water; it should work fine.

                  Best regards,
                  Vlado
                  Attached Files
                  I only act like I know everything, Rogers.

                  Comment


                  • #10
                    vlado Thanks! Just tested the inverted sphere trick and it looks like it's working - but I guess it could create some funk when there's IOR on the water material - or more complex textures?
                    Looking forward to the update.
                    http://henrikbclausen.com

                    Comment


                    • #11
                      So this is fixed already for the hotfix, but in the meantime you can get an updated build here:
                      https://nightlies.chaosgroup.com/mai...ble/stable_5.1

                      Best regards,
                      Vlado
                      I only act like I know everything, Rogers.

                      Comment


                      • #12
                        vlado Thank you!
                        http://henrikbclausen.com

                        Comment

                        Working...
                        X