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: )
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.
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.
If I turn off the shadows on all lights, the image below is the result. The problem is apparently linked to the shadows.
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. Test 01.zip (17 KB)
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
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 default0.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?
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.
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.
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.
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
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).
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..