How to replicate Ruiner's shadows?


As seen on the image, the shadows are detailed, sharp, while it appears to be using dynamic spot lighting. First out of curiosity I tried replicating it and… failed.
It is a screenshot from Ruiner, a game using Unreal Engine 4 and DirectX 11 so no raytracing afaik or at least I was told you cannot raytrace on DX11 with UE4.

If I try a dynamic spotlight that can light up a pretty big room, the character’s shadows will be blurry. Then I tried using the contrast scale turning it into a sharp-ish blob while smaller objects lose all shadow because after all it is just a filter.
Tried a sharper shadow from a post process material but as it was using existing shadow data it was just as bad.

I wasn’t sure they didn’t change the engine for this but it sounds so weird that we cannot change how blurry a shadow gets with distance so I thought I might search for this topic… just to mostly find questions about low resolution static shadows most of the time. But I can always ask myself I guess?
So if anyone could help I would be really happy! Not that my happiness is important to anyone else.

EDIT: BTW, the game looks like it is in ortho but last time that completely murdered my lighting so maybe it is perspectivic but with brutal fov?

EDIT2: Played around with Outer Cone Angle and at around 37° the shadow is pretty sharp while below it blurs. Interestingly enough it blurs as we ge higher as well but it sort of resets at 53°

1 Like

What shadowing method are you using? DF shadows or standard shadowmaps may be too low-res- the game could have also used a custom solution?

Do you believe it to be a resolution problem, or a lighting problem?

I don’t have experience with that particular game, but in general, to get sharper shadows, you should make the spotlight cover a smaller area (make the cone angle smaller) and you should increase the resolution of the shadow map. As long as only one or two spotlights on screen use a high-resolution shadow map, it’s not going to be particularly expensive.

I’ve never tried dynamically changing resolution of shadow maps for spotlights, but you might want to look for the 2 closest, pointing-at-player spotlights, and set a higher-resolution shadow map for those, at runtime, and then swap back to a lower-resolution when they are not priority.

If that’s still not good enough, then if the shadow is on the ground only, you can re-render the character with a flat projection, and make it “darken” the screen. That is, however, not a physical light interaction, so the illusion can break with overlapping lights, and it also doesn’t cast the same shadow on walls.

This is mostly dynamic lighting and I also want dynamic so no built shadows. As for resolution I tried going higher and higher but no use.

So far the best results came from manipulating the cone angle, particularly around the mentioned degrees of 37 and 53. Weirdly enough in between, above and below are all worse. Not really sure why but so far I’m glad I have some result.

On the other hand, my actual goal would be completely eliminating the blurring of shadows based on distance as in sharp shadows until to the very edge of the light range but I guess that can only be done if I change the engine itself.

Are you using VSMs? If so, you can very easily get per-pixel sharp shadows by disabling SMRT, I don’t quite remember the CVar however.

Will be honest with you, VSMs seem a bit overkill and… isn’t this a UE5 thing? Tbh.my original goal was to obtain some proper control over the lights/shadows as much of the settings appear to be hidden (like many other things in blueprint, wink wink, navigation agent selection).
I might be wrong I’m used to shadows being sharp all the way on older engines and it does appear that the blur gets arbitrarily added with the distance from the light. I just want to disable that on the default lights. But I guess it’s either not the case or I need to dig the engine itself.