Deathrey
(DeathreyCG)
March 3, 2018, 8:25pm
349
Could the 0.5 be multplier because after perspective projection coordinates are in clip space (-1 to 1) but we need radius to be at texture space(0 to 1). I am not sure about this at all.
Ps. Ligthmass reference says that even after removing 0.5 scale, dynamic shadows were bit too sharp.
Search radius is intended to be used as in shadow space, but shader gets source radius as is , from the light, correct me if i’m wrong.
Also, what happens when source radius is 0 ? Projecteded source radius is also 0, and all the softenss comes just from PCF.
Me thinks that Light Source Radius needs to be adjusted to be in shadow space before being used.
Search radius is intended to be used as in shadow space, but shader gets source radius as is , from the light, correct me if i’m wrong.
Also, what happens when source radius is 0 ? Projecteded source radius is also 0, and all the softenss comes just from PCF.
Me thinks that Light Source Radius needs to be adjusted to be in shadow space before being used.
When radius is 0 the projected value is clamped to one texel.
Source radius is projected from world space to shadow clip space:
radius * (1 / tan(fov/2)) / ShadowSpaceDepth
Deathrey
(DeathreyCG)
March 4, 2018, 12:10pm
351
0.5 there seems to be correct visually. Lightmass difference can be attributed to exposure, biasing, sharpening and filter radius clamping.
Lightmass:
PCSS:
PCSS low exposure:
PCSS high exposure:
As to why is it there, needs in depth look. I don’t have source accessible at the moment, will check in a few days.
I will make more lightmass testing. If the multiplier is indeed correct I will remove my PR.
Deathrey
(DeathreyCG)
March 5, 2018, 12:43pm
354
Returning to my previous post, is spotlight projection adjusted for source radius? I believe it is not and it is root of all problems.
CotanOuterCone variable is the adjustment.
Deathrey
(DeathreyCG)
March 5, 2018, 2:59pm
356
What I was asking, aren’t you supposed to shift whole shadow projection behind, so that source is at spotlight’s near clip plane? That is… at distance zero, your source raidus will be radius, not zero.
I haven’t implemented PCSS for spot and omni lights myself, so bear with me.
In case, that above is a brainfart, what is happening with PCSSParameters.y ?
Deathrey
(DeathreyCG)
March 5, 2018, 3:08pm
357
Red Color: Expected
Green Color: Expected Penumbra
Blue Color: Received at defaults
default:
0.5 replaced with 1.0,
and max kernel size inflated:
What I was asking, aren’t you supposed to shift whole shadow projection behind, so that source is at spotlight’s near clip plane? That is… at distance zero, your source raidus will be radius, not zero.
I haven’t implemented PCSS for spot and omni lights myself, so bear with me.
In case, that above is a brainfart, what is happening with PCSSParameters.y ?
I don’t know about that shifting. There is only division by projected distance. Near plane distance isn’t factored at all. Not sure about should it.
PCSSParameters.y = MaxKernelSize / float(ShadowInfo->ResolutionX). So this should be correctly adjusted.
: Have you this PR integrated when you do testing? https://github.com/EpicGames/UnrealEngine/pull/4507
Bumping this to increase the chance for Epic to enter this thread.
I can confirm that this problem still exists in version 4.19, nothing has changed yet.
IOchair
(IOchair)
July 23, 2018, 9:09am
363
4.20 seems to be different. 4.20.0 has a different type dynamic shadows artifact:confused:
Can you take a screenshot of this? I still have the same artifact in 4.20 that I had in all the previous versions. Nothing has been fixed it seems.
aviator801
(aviator801)
August 9, 2018, 2:23am
365
Hi, I have a dynamic low poly landscape with a directional light, and any time I turn on shadows, I get horrible shadow acne at certain angles. The bias is already at 0.3, and increasing it doesn’t do much (until it’s like 1, and then the shadows look detached). In Unity, I’m used to some shadow acne when the light source is almost perpendicular to the face of the shadowed triangle, but this seems pretty extreme. Most of the triangles affected have fairly different face directions. Is there anything that can be done? I saw there were some pull requests months ago, but I’m not sure if they help with this problem. (I’m using 4.20)
I’ve attached an example (TAA turned off to show it more accurately).
cazetta
(cazetta)
August 28, 2018, 2:27pm
366
So…not even an official statement about this?
Envieous
(Envieous)
September 3, 2018, 2:14am
367
Yeah this is really bad, even with full shadow biasing there’s still errors, in addition to the shadows accuracy going down the drain.
spacegojira
(spacegojira)
September 5, 2018, 4:17pm
368
Hm seems like Epic is still trying to ignore it’s indie gamedev users and their problems…
It totally messes up my procedually generated voxel landscape, it’s just super immersion breaking.