x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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.

Product Version: UE 4.16
Tags:
more ▼

asked Sep 04 '18 at 03:59 PM in Blueprint Scripting

avatar image

Gibospartan
12 3 5 8

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

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:

https://docs.unrealengine.com/en-us/Resources/ContentExamples/Decals

https://docs.unrealengine.com/en-us/Engine/Actors/DecalActor

Lots of stuff on YT, too.

more ▼

answered Sep 05 '18 at 08:08 AM

avatar image

Everynone
14.8k 77 25 62

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Additionally to what @Everynone said, you can project your decal on the ground using Line Trace.alt text
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. alt text

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.

decal.png (193.9 kB)
decal2.gif (3.5 MB)
more ▼

answered Sep 05 '18 at 10:22 AM

avatar image

Tuerer
1.8k 12 7 8

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question