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"

Is it possible to have a movable actor receive shadows from other actors?

alt text

The level only has the ground mesh, the directional light, the occluder (7 shape - 2 static meshes), the tall movable cube, and a small static cube for reference)

  • All Engine Scalability Settings are set to 'EPIC'

  • Directional light is set to: Stationary, Affects World, Cast Shadows, Cast Static Shadows, Cast Dynamic Shadows, and Dynamic Indirect Lighting.

  • The occluder is set to Static, Cast shadow, Affect Dynamic Indirect Lighting, Affect Distance Field Lighting, Dynamic Shadow, and Static Shadow.

  • The movable actor is set Movable, and the rest are the same as the occluder. The occluder is set to move 500cm side-to-side (x axis as indicated by my red arrows), in and out of the occluder's shadow.

  • After any change I hit the Build button.

I simply want the movable actor to receive the shadow from the occluder while it's behind it.

Eventually I want to have a character running around from bright areas to shadowed areas and have shadows affect him.

If I set the light to Movable, the occluder no longer casts a shadow.

If I set the directional Cascaded Shadow Maps->Dynamic Shadow Distance StationaryLight to cover the area, the occluder no longer casts a shadow.

If I set the movable actor to "Light as if Static" it'll start with the correct shadow, but when it moves into the light, it doesn't change (keeps looking shadowed).

Ideally a solution would work for other lights as well, like point lights and spotlights.

Product Version: UE 4.9
Tags:
shadowtest.png (185.6 kB)
more ▼

asked Dec 03 '15 at 06:18 AM in Using UE4

avatar image

rantrod
1.6k 49 48 218

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

1 answer: sort voted first

Hi Rantrod,

There are a couple of things to check.

Looking at your image it looks like your scalability settings are not set to EPIC. I do see you mention you've checked this, but the image looks like there that Temporal AA anti-aliasing is not being used, which is an indication of lower scalability setting when using basic scenes. Also, shadow casting is more limited when lower scalability settings are set. This is partly speculation base on your image though.

If I set the directional Cascaded Shadow Maps->Dynamic Shadow Distance StationaryLight to cover the area, the occluder no longer casts a shadow.

So, with this, are you saying that if you set the Dynamic Shadow Distance Stationary to any value other than 0 the shadows stop working? If so, that's a pretty clear indication for Scalability settings. The reason being that A stationary dynamic light will bake a shadow for any static objects. If the Dynamic shadow distance is left at 0 it will only use the baked lighting. If you change this, anything within that range will be dynamic shadows.If the scalaibilty is set too low for the Shadow option this can cause shadows to disappear. Make sense?

If I set the movable actor to "Light as if Static" it'll start with the correct shadow, but when it moves into the light, it doesn't change (keeps looking shadowed).

This is to be expected. You're baking a light/shadow texture onto your movable object. Even moving it will keep the same lighting/shadowing baked into it.

Let me know what you find with the scalability. If it's persistent in this project, start a new blank project and see if the problem follows.

Tim

more ▼

answered Dec 03 '15 at 09:31 PM

avatar image

Tim Hobson ♦♦ STAFF
48.7k 888 103 880

avatar image rantrod Dec 03 '15 at 10:48 PM

Everything was set to 'Epic', however, I decided to close Unreal, close VS, opened them again, and then they worked as expected. grrrr.

Thank you.

How about with Pointlights and Spotlights?

(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