How can you make a drop shadow?

I’m trying to create a drop shadow for my character. Basically, I want to add a shadow beneath my character so when they jump you can see exactly what point on the ground is below them.

While trying to find a solution I read that it could be done with decals but it didn’t mention how to do it, nor can I find anything useful in the UE4 documentation regarding decals.

Any help would be greatly appreciated.

Decal is like a projection and should work fine for this.

  • add a decal component to the character
  • rotate it -90Y so it points towards the ground, adjust for size and position
  • exclude the character from receiving decals (search for it in the character mesh)
  • create a material
  • Material Domain - Deferred Decal
  • Blend Mode - Translucent
  • Decal Blend Mode - Translucent
  • from the Texture sample you will need to plug in Emissive or Base Color and Opacity

I hope I did not mix anything up.

edit:

nor can I find anything useful in the
UE4 documentation regarding decals.

For all your decal needs:

Lots of stuff on YT, too.

2 Likes

Additionally to what @Everynone said, you can project your decal on the ground using Line Trace.


In my case, I added 16 to Impact Point Z because my Decal size Z is 32, and that way the decal will be the most intense.

There's one issue with the visual part, however. When you stand on the edge and move back and forth a bit, your shadow will jump up and down.

252818-decal2.gif




But otherwise everything works fine. Except for my decal image itself of course, I didn’t put much effort into that.


Additionally, you can add some conditions to that, e.g. only show the shadow when the character is not on the ground, or maybe adjust the shadow intensity depending on the character height over the ground, etc.

2 Likes