How do you fake dynamic shadows? - Let's share techniques.

Aside from the method presented in what methods did you find to fake dynamic shadows?

We are experimenting with using decal projection to fake a drop shadow for a vehicle, but it is probably too expensive. Did anybody get this to work (well)?

With 4.11 you can use the new capsule shadows. They are intended for soft shadowing in indirect light, but they can work in direct light as well.

@muchcharles I think the capsule shadows aren’t something you can use with VR.
@Diaval You have the complete example for free i think, you can check in the launcher all of that.

How come? I thought that was one of the features.

Yeah but not sure if that is one of the “low cost” features.

I am also curious about the performance of capsule shadows. They should be cheaper than normal shadows, but they are still using dynamic lights. The best solution for VR would manage entirely without dynamic lights with a minimal performance hit. - I guess.

So, no one bothered to look into Showdown VR Demo and see what they did for big bad robot’s blob shadow ?! :rolleyes:

I couldn’t really understand the noodles for it in the material editor. I bet it could be much, much simpler. The core idea is the same though - using and modulated blob texture.

IS it correct that dynamic lights with shadows casting turned off shoudn’t be a problem?

Capsule shadows will work in VR but as with everything else, you need to make sure that if you enable them, it does not kill your performance. When testing this feature out, I was able to have 8 of the Mannequin’s in the scene with Capsule Shadows enabled without seeing my frame rate drop to below 90 on the Vive.

How about Gear VR and capsule shadows ?

I did not try them out on Gear VR but if I had to guess I would say they probally will not work due to the way in which they are rendered. If someone has the change to try them out on Gear VR please let me know how it goes.

I retested this with 4.11.1 just now and am still getting severe artifacting when using them, with instanced stereo on or off.

Based on this Mobile Capsule Shadows - UE4 AnswerHub capsule shadows won’t work on Gear VR.

Mmm, if capsule shadows do not work on the GearVR, you could make a capsule the same height as the player character, add it to the character blueprint, in the same place as the character, and set it to not be visible to the owning player. This should give the same effect as using a head mesh. It’s not visible to the player, but it can still cast a shadow.

The problem with using the capsule is having it reflect, not sure how to get around this at the moment. It would be nice to have a light, shadow, and reflect option of “do not cast xyz on tag”

edit: Another way: Look at the showdown demo and see how Epic cast the “fake dynamic shadow” effect. I forget what technique they used.

It won’t - capsule shadows are exclusively DX11+ rendering technique (per Epic).

Yeah, I’ve spent many evenings trying to understand that technique and I have no clue why they did what they did and how. We’ve been going back and forth about it here: - This a wealth of useful information. Thank you for sharing!

  • I am actually not working on the problem right now so I don’t have the time to fix the material. Sorry.

In 4.13 they added the whole business of letting BPs write to textures, depending your game that might be worth it, if you have those ray casts anyways. Pretty sure it’s quite expensive anyways.

where is the info? The links down! Why is every link I need with information always gone?

Try this!