Dynamic shadows artifacts

it isn’t barely noticeable. asphalt or landscape textures in general, the issue cannot be unseen.

might be pointless for really really specific features. but shadow mapping? that’s as basic as shading or texture mapping. something as basic as that cannot be so sub-par.

actually yes. time, experience and final outcome performance are all stopping me from doing it. I’m trying to make a game here, not develop an engine. And so I’m using a third-party engine -and paying 5% of all income- for a reason, this isn’t free software.
And it’s not like we’re asking for rocket science. Simplifying Maximum-Dev’s analogy, we’re not pimping our perfectly functional car - we just want the wheels to turn properly.

playing around with the exponent just moves the issues to a different place / zoom level. doesn’t make it any more acceptable.

I wonder if there is any way we could attract an Epic employee to respond at least something.

I mentioned it to Chance a few weeks ago, no idea if it went anywhere.

We already know what the cause is. Unreal doesn’t use slope bias, which is a standard feature in every other engine, even the ones people make as their hobby. If you read this topic you’d know that.

Yes, I’m fully aware of it being a biasing issue, but there are ways you can get around it by playing with the number of cascades(at three, it’s almost non-existent), exponent and max distance. Even though UE isn’t using slope biasing, it is still using some kind of biasing/filtering.

After doing some research on CSMs, I see PCF and VSM coming up a lot, but nothing about them using slope biasing; with CSMs. I think slope biasing is only used for regular shadow mapping. It might boil down to a CPU vs GPU computing issue or it might be a forward vs deferred issue.

Regular shadow mapping mentions slope scale depth biasing:
https://msdn.microsoft.com/en-us/library/windows/desktop/ee416324(v=vs.85).aspx

On that same page(the first link), there is a link to another article about CSMing says nothing about SSDB and only mentions PCF/VSM: https://msdn.microsoft.com/en-us/library/windows/desktop/ee416307(v=vs.85).aspx

Also, this brings up some of the issues with trying to use slope biasing in screen space: https://mynameismjp.wordpress.com/2013/09/10/shadow-maps/

I’ll keep doing more research on it all, but I’m pretty sure that the Unreal devs know all the tricks and standards for something like shadow mapping.

3 cascades still causes the issue, you just get less resolution (and so, more blurry shadows)
even 1 cascade causes it.

I can also claim that your analogies are bad because X and Y, it’s just different point of views.
I’m not asking for infinite worlds or a realtime raytrace renderer or MMO architecture. I’m asking for a feature as basic as shadows (which you’d expect in any game engine, you’ll agree) to play well together with one of the features they advertise (“Create large, open world environments with the Landscape system, which paves the way for terrains that are orders of magnitude larger than what has been previously possible”)

it’s been reported by several members of my team. and we’re here in this thread after all aren’t we?

I know how much it used to cost. Epic changed their business model looking for a broader audience. it was their decision and so it’s their consequences. so using the “engines used to cost millions” excuse isn’t fitting in this context.

as I said, it doesn’t work. it just makes the shadows more blurry.

UE3 used CSMs and the issues weren’t nearly as bad.

I don’t think the topic is whether CSM are good or not. The point is really that this right here is ugly.

That’s just wrong and it’s a super annoying issue.

So whatever the fix is, as long as it’s a reasonable one, I’ll take it.

1 Like

Yea, the problem affects all shadow mapped shadows, not just cascaded ones from directional lights.

Few days ago someone mentioned on Discord about this issue being a problem when trying to shadow a planet in a space game using CSM.
It might be possible to cure it to some degree using vertex normal offset:

[SPOILER]

https://image.prntscr.com/image/psSR4OfhS3m3j5eNBGY_6A.png

[/SPOILER]

Actually, it is also possible to implement slope bias the way Kalle_H did, but unlike for mobiles, one would need to additionally ensure normal and light dir accessibility in corresponding section of shadow depth shader and that required shader is actually bound.
Sad part is that it would appreciably affect performance. (At least for ordinary opaque materials without WPO, which constitute majority of shadowcasting materials anyway).

By the way, I posted a question regarding this that will hopefully be answered during next week’s 4.17 preview stream: 4.17 Preview - July 13th - Live from Epic HQ - Events - Unreal Engine Forums

I’ve cleaned up this thread from the flame-posts and non-constructive argument going on. Any issues with this, PM me or another mod - don’t post here.

If you feel like one of your posts had valuable information to the thread in it, then feel free to post again with that information. I’d just like to say that this thread has perfectly valid feedback and criticism, and even offers ideas for a solution - that’s just the kind of thing everyone likes to see around here. I’m hereby offering 100 internet-points to the person who submits a pull request with a fix.

Keep it civil and on-topic folks, otherwise we’ll have to lock the thread.

PS: I’ve brought up this thread with Epic Staff in the mod groups, but remember it’s not always possible or even a good idea to come back with a definitive answer - no matter how many times you tag them!

And another week passes…

I think you can imagine how enraging their complete non-responsiveness is?

4.17 preview has lots of improvements: Unreal Engine 4.17 Preview - Announcements - Epic Developer Community Forums

Now the acne is pretty much gone, and the only thing that bothers me is that a slowly rotating directional will cause some aliasing artifacts along shadow edges (shadow texels popping black and white every now and then). It’s not a big deal though. Praise whoever made the changes to the shadow rendering code.

I just tested 4.17 and there was literally zero change to artifacts with directional lights.

This is with bias 0.5 in one of the default example projects.

Did you use the console variable r.shadow.filteringmethod 1 ?

No, doesn’t that enable the more expensive soft shadows?

The soft shadows do indeed look way better, but a 400% increase in shadow render time is not an acceptable solution for missing slope bias…

The bug with grass tool is already killing our performance so much we can’t even afford to have 4 shadow cascades and with 3 cascades it’s all blurred out. Problem solved. You can’t really have any tools working properly in this engine lol.
@jonimake said in the other thread that the issue is worked on in 4.17 and looks ok without using PCSS. Anyone can post screens?