r/unrealengine 4h ago

Screen Space Shadow in UE ????

I recently discovered a new technique called "Screen Space Shadow" (SSS), and I find it extremely interesting. It seems like this method could be crucial for improving both optimization and shadow quality in games. However, I couldn’t find much discussion about implementing Screen Space Shadows in Unreal Engine.

My questions are:

  1. Is it possible to use Screen Space Shadows in Unreal Engine?
  2. If so, how can this be implemented?
  3. Are there any resources or detailed explanations on how to set up or adapt this technique in Unreal?

Here is the link where I originally learned about this technology: https://www.bendstudio.com/blog/inside-bend-screen-space-shadows/

0 Upvotes

u/Typical-Interest-543 1h ago

Threat Interactive is a quack..my fave part of his recent video was when he explained LOD's as if its some lost technology 🤣

Theres a reason screen space shadows arent a big thing, but also, there are other, better, and more modern ways to optimize your environment.

The issue is not every process is a "one size fits all" solution. Shadows are going to hit performance though unless you're baking lighting. A few things you can do is reduce amount of cast shadow lights and/or reduce attenuation radius. If foliage is your problem, turn off cast dynamic light in foliage editor, set foliage to static

u/Affectionate_Sea9311 4h ago

First thing - Stop wasting your time watching that moron on YT. Seriously while there is some information he has no idea why some things are not used anymore or not become mainstream or die due to many reasons.

As for screen space - There are contact shadows for cheap close up details. But for the overall image quality UE has VSM shadows which provide the best in class shadows..

u/MyUserNameIsSkave 3h ago

The dude is talking about optimization and you propose him VSM as a solution.

u/GameDev_Architect 1h ago

Op mentioned shadow quality as well and so did the comment you’re replying to.

u/MyUserNameIsSkave 1h ago

It is fair, but as I understand the post. He want a balanced solution that looks good for how cheap it would run.

u/Affectionate_Sea9311 54m ago

It is not about optimization, it is about source of the delusion.. Who is basically Andrew Tate of game dev world.. There are solutions in engine.. Want something for low spec targets use Unity.. or learn how to use existing tech. Contact shadows and DF shadows are quite performant if you for some reason trying to avoid using current tech.. Sure will be some quality limitations, but without Nanite+Lumen will run like a charm.

But for something like Open World Nanite solves one of the worst problem of popping/dither fading LOD's and distanced shadows ( VSM). Problem of 90% of all those indie project performance is that people don't understand basics, how to produce content efficiently, how to optimize drawing distances, HLOD's, textures compression and sizes, materials complexity, overdraw, drawcalls, virtual textures, RVT, how light sources are working and how to optimize them, instancing, etc. But instead learning and understanding those, they are looking for magical solution and listen to some demagogue without any actual experience.. You can't solve performance with using one magic bullet if everything else is fucked up..

And again Optimization is different from project to project.. There are some basics rules and similarities, but you not asking about specifically made tech from old game without showing what you trying to solve, and engine maybe already has a better solution without needs for some hacks and external code which most probably will be only partly compatible with existing tech

u/XxXlolgamerXxX 3h ago edited 3h ago

Unreal have contact shadows and is not new, have a lot of artifact and only works on some cases. VSM have a better quality that contact shadows and is not screen space so it still works even outside the view. But if you goal is to have better performance and increase in smaller details then yeah, go for it.

u/hooohooho 1h ago

For OP's clarity contact shadows and screen space shadows are basically the same thing. The idea is to raymarch in screen space towards each light source until you're blocked by the depth buffer (meaning you're shadowed).

If you want to try implementing them for learning purposes you could check out this tutorial which is written in HLSL. You'd likely be writing it as a post process material. https://panoskarabelas.com/posts/screen_space_shadows/

This looks straightforward to set up for a sun but more complex and slow for multiple light sources.