Announcement

Collapse
No announcement yet.

Problem with shadows

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

  • Problem with shadows

    Hi guys,

    I'm having some difficulties solving a shadows problem. Hope someone can help me out.

    It seems the shadows are the cause of some "stepping" problem on the mesh receiving the light. The first image below shows my simple test scene (here's the file itself: Test 01.zip)

    [ATTACH]601[/ATTACH]
    Three standard target spots (of which one is disabled because I didn't really needed it for this test) with VRayShadow. One VRayLight in Dome mode with a HDRI texture map. Nothing special.

    At first, in the image below, everything seems to be okay.

    [ATTACH]602[/ATTACH]
    but when I disable the VRay Dome light the image below is the result. There some obvious "stepping" going on in the dark area on the sphere, linked to the detail in the geometry.

    [ATTACH]603[/ATTACH]
    If I turn off the shadows on all lights, the image below is the result. The problem is apparently linked to the shadows.

    [ATTACH]604[/ATTACH]

    I have tested this with Target Spot light (with VRayShadow) and VRay IES and both seem to have the same issue. With a VRayShadowMap in a Target Spot light it doesn't seem to be a problem.

    Also, the issue seems to "go away" with higher amounts of geometry. The sphere in my test file has 24 segments and a turbosmooth modifier. If I increase the number of segments in the sphere to 100 (without a turbosmooth) the issue is still there, albeit a lot less visible.


    Any ideas? Am I missing something really obvious?


    I'm using Max2008 x64 and VRay x64 SP2 but the problem is also present in VRay SP1 / Max2009 / x64 / x32. Tested rendering the scene on all of them.
    Attached Files

  • #2
    Checking "Smooth Surface Shadows" in the shadow controls should clean that up.
    Eric Boer
    Dev

    Comment


    • #3
      Hi RErender, thanks for the quick reply!

      Yeah, I thought that would solve it too but unfortunately it doesn't. I have tried that. And VRay IES lights do not have properties to control shadows so I can't enable that for them.

      I have tried so many combinations of settings I really don't know where to look anymore, searched the forum for similar problems, searched the internet, help files, etc. I really tried finding a solution but I'm blinded by looking at it too long I'm afraid

      Anything else that you think might work? I'm ready to try anything

      Thanks again!

      Comment


      • #4
        Some progress. I've been able to narrow the issue down to one setting.

        I've done some tests with VRay IES lights and it only happens when I set the Shadow Bias in the VRay IES Light to something lower than the default 0.2cm. See examples below.

        The same is true for the Bias setting in VRayShadow params for other light types. At a value of 0.2 there is no problem but when setting a lower value the issue becomes more visible the more you near the 0.0 setting.

        It seems more like a bug. Not misconfiguration on my part?

        Click image for larger version

Name:	ShadowBias Issue.jpg
Views:	1
Size:	44.1 KB
ID:	841701

        Comment


        • #5
          its not a bug. Shadow bias is "shadow ray precision". If you set the shadow ray precision to be that low, then your model should accomodate that, otherwise you will get this result. Since the smoothing of the surface is baing faked by the normal smooth angle, eventually its going to break apart.
          Solution, do not set shadow ray biasing to a very low value.
          Dmitry Vinnik
          Silhouette Images Inc.
          ShowReel:
          https://www.youtube.com/watch?v=qxSJlvSwAhA
          https://www.linkedin.com/in/dmitry-v...-identity-name

          Comment


          • #6
            Originally posted by Morbid Angel View Post
            its not a bug. Shadow bias is "shadow ray precision". If you set the shadow ray precision to be that low, then your model should accomodate that, otherwise you will get this result. Since the smoothing of the surface is baing faked by the normal smooth angle, eventually its going to break apart.
            Thanks for the explanation, Morbid Angel. I appreciate that!

            I have done some reading up on this based on your answer and I now understand (some of) the theory behind it. Self shadowing faces that cause the artifacts. So it makes sense in a way I guess.

            However, then why doesn't the VRayShadowMap (or the other shadow methods) suffer from the same issue? Because I am able to set bias to 0 for VRayShadowMap without getting artifacts.

            And while I can (now) understand the geometry has to support this, I am often dealing with fairly low poly geometry (characters for instance) where this is not an option. I mean a 1cm radius sphere with 150 segments (even at 100 segments there are still artifacts) to accomodate zero bias shadows isn't exactly low poly I wouldn't even consider that amount of faces acceptable for any situation.


            Originally posted by Morbid Angel View Post
            Solution, do not set shadow ray biasing to a very low value.
            Yes, alright, obviously lol

            But this also makes the shadow inaccurate / physically incorrect. Bias offsets the shadow. And while this (offset of 2mm) may not be a big deal on larger objects. It does make a huge difference on details / small objects. I mean, an object of 2cm where the shadow has an offset of 0.2cm (about the lowest range where no artifacts appear) is quite visible and looks just wrong (of course). In the example below a sphere with a radius of 1cm and bias @ 0.0cm and 0.2cm.

            Click image for larger version

Name:	ShadowBias - small object.jpg
Views:	1
Size:	21.6 KB
ID:	841703

            Of course you could then suggest not to use VRayShadow and use VRayShadowMap instead. Sure. But I'd rather use VrayShadow because I just like it better and is more efficient and again, why IS VrayShadowMap able to do this without artifacts and why isn't VrayShadow?

            And in a VRayLight and VRayIESLight I am not able to use VRayShadowMap (or any other shadowing method) while they both suffer from the same artifact "issue". Hence I can never use unbiased shadows with those lights for low poly and small sized objects / small detail in larger objects. That's a real shame...


            Maybe I'm just looking at all of this the wrong way? If so, please correct me. I really just want to learn and know I'm doing this correctly

            Comment


            • #7
              correct me if im wrong, but vray shadow map is a form of depth mapped shadow. Its not raytraced hance its not relying on the same principals.
              Dmitry Vinnik
              Silhouette Images Inc.
              ShowReel:
              https://www.youtube.com/watch?v=qxSJlvSwAhA
              https://www.linkedin.com/in/dmitry-v...-identity-name

              Comment


              • #8
                Yes, you're probably right. Sounds logical. I don't really know to be honest

                I have also tried using Advanced Ray Traced in standard Max lights, set to Shadow Bias 0 (default is 0.25) and that has no artifacts and perfectly correct shadows. I would gather VRay should at least be able to do the same?

                So I do have some alternate options for Max Standard lights.. but not for VRay lights / VRayIES lights (since you can't change the applied shadowing method in them).

                Comment


                • #9
                  Originally posted by JohnVK View Post
                  Yes, you're probably right. Sounds logical. I don't really know to be honest

                  I have also tried using Advanced Ray Traced in standard Max lights, set to Shadow Bias 0 (default is 0.25) and that has no artifacts and perfectly correct shadows. I would gather VRay should at least be able to do the same?

                  So I do have some alternate options for Max Standard lights.. but not for VRay lights / VRayIES lights (since you can't change the applied shadowing method in them).
                  this is because max standart lights are pinhole lights. Vray lights however are true area lights. So the same methodology cant be applied.
                  Dmitry Vinnik
                  Silhouette Images Inc.
                  ShowReel:
                  https://www.youtube.com/watch?v=qxSJlvSwAhA
                  https://www.linkedin.com/in/dmitry-v...-identity-name

                  Comment


                  • #10
                    Originally posted by Morbid Angel View Post
                    this is because max standart lights are pinhole lights. Vray lights however are true area lights. So the same methodology cant be applied.
                    Yes, that's right. Standard lights are not Vray lights so I understand one can't use the same methods because the principles for both are totally different.

                    But what I meant to say is, in a standard light if I use Adv. Ray Traced - bias 0 there are no artifacts but if I use VrayShadow - bias 0 in the same light there are artifacts. That's within the boundaries of the same type of light source. The same rules apply. But in this case VrayShadow fails. That's what sort of surprised me

                    And in VRay / Vray IES Lights I have no alternative shadowing methods available. so I'm "stuck" with the one method included in those lights. Which won't work for me when rendering small detailed objects because I would have to choose between either incorrect shadows (i.e., bias 0.2cm) or correct shadows but I would get artifacts. Neither will do of course.

                    It would have been nice if I could have actually used the VRay lights for this instead of having to resort to standard Max lights and shadows...


                    Anyway, thanks for bearing with me. Appreciate it very much! Learned some things too but I think it's probably something I'm going to have to accept. So I'll try to work my way around the problem. Not exactly what I had hoped for of course.. but anyway..


                    Thanks Morbid Angel

                    Comment

                    Working...
                    X