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"

4.12.5 preview shadow issue on mobile and PIE

First of all this issue has been stated by hls333555 and TeamKingdom many times on different posts (links at the bottom) and it is a known bug at 4.5. but since then it seems, problem has not solved and there is no clear answer. And staff member Sean Flint asked me to post a new question due to age of these post, I'm opening a new one. Related posts:

Question: I have shadow issue related to dynamic lights. They don't work on android builds and mobile preview. PC builds and viewport preview are fine. My scene does not contain any skylight because it's not outdoor. It's indoor a closed building, there are some dynamic movable lights that give colorful light effects to the area. If you run the scene with selected viewport it's fine.

alt text

But when you switch it to the mobile preview (PIE) it's not so nice.

alt text

Same results also can be observed in builds. PC build has the same result with image 1, and Android build is the same with image 2. They match their related images in here.

I don't know this is a bug or maybe it was a bug but solved i don't know, But i have the similar issue of these almost 2 years old posts and i haven't find any clear answer (most of them say change environment color but it doesn't help)

https://answers.unrealengine.com/questions/110655/45-preview-shadow-issue-on-mobile.html https://answers.unrealengine.com/questions/123554/reflection-captures-dont-work-with-moveable-direct.html https://answers.unrealengine.com/questions/123761/stationary-skylight-does-not-bake-ao-on-mobile-pla.html

Product Version: UE 4.12
Tags:
shadow ss 1.jpg (69.2 kB)
shadow ss2.jpg (89.3 kB)
more ▼

asked Jul 12 '16 at 08:38 AM in Rendering

avatar image

finwefeanor
1 2 5 8

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

1 answer: sort voted first

Hi finwefeanor,

Dynamic lighting on mobile does not shadow cast for point lights. So part of the issue here is that shadow casting for dynamic lights may be part of what you're seeing.

Secondly, you can only have a max of 4 overlapping dynamic point lights for each actor. This is not to say that you cannot have more than 4 for your scene though. As an example, if you have a floor mesh. You can have 4 dynamic point lights casting on the floor. The fifth or more will not cast on the floor mesh. This image below demonstrates this.

alt text

See how 5 and 5 cast on the wall, but not on the floor, which is a single static mesh. This is likely the issue you're seeing with your colored lights not working properly.

The issues in the other posts linked aren't necessarily directly related to this iss, but are more in line with limitations of their use or the mobile platform itself.

  1. Dynamic shadow casting is expensive. You should try using modulate shadows which are only supported for directional lights.

  2. Reflection captures are static. They cannot work to capture direct/dynamically lit worlds.

  3. Rolando posted the fix CL at the bottom for 4.6

For a good source of information on mobile development I would recommend our documentation here. https://docs.unrealengine.com/latest/INT/Platforms/Mobile/

I hope this helps.

Tim

more ▼

answered Jul 12 '16 at 07:16 PM

avatar image

Tim Hobson ♦♦ STAFF
48.8k 888 103 879

avatar image iRYO400 Jul 13 '16 at 05:17 PM

Hi! Tim Hobson ♦♦

I have an idea about casting shadows, but I haven't tested it yet. Currently it's only a theory.

What do you think about using black decals as shadow under player, for example there is a Character with green circle under it in TopDownTemplate. And to make it "dynamic" use it with Flipbook.

Will it work?

avatar image Tim Hobson ♦♦ STAFF Jul 13 '16 at 07:07 PM

I can't say for certain since I've not set up something like that before, but with Decals these are newer to mobile (since 4.9) and I'm not sure all devices support them, but I could be wrong on that.

You may want to see a solution that was used in the Showdown demo (available on the Epic Games Launcher in the Learn tab) that used "blob" shadows to make it look like the character had a contact shadow. I think that should work on Mobile and is used in this VR demo where performance impacts have higher cost.

avatar image finwefeanor Jul 13 '16 at 10:37 PM

Hi Tim,

thanks for quick and detail response. Let me sum up the situation on my end first:

1) Especially TeamKingdom stated this issue on other threads and staff member RCaloca also stated that it will be fixed on 4.6 (or 4.7 something like that) But interesting part is that there is no clear answer for this issue since that time like it's been fixed for good nobody complaining. But Mobile platform has this dynamic light problem, especially on android i think.

2) What you say is certain about dynamic lighting like mobile can't cast dynamic shadows ? Because i believe if i use directional light or skylight, it can cast dynamic shadows right ? This is the only way to cast shadows i suppose.

3) Related to above , In my scene ( see img1) there are couple of dynamic movable spot lights. It's a indoor scene , and the colorful lights are moving lights , think about disco lights. I'm explaining this part a bit long because you said "Dynamic lighting on mobile does not shadow cast for point lights". In img1, the colorful pink lights that you see are not point lights, they are dynamic movable spot lights that give colorful changing lights. I just wanted to clarify this part(I can upload a small video if necessary).

4) I know that it's really expensive feature. But I'm just wondering about it maybe it could be possible in very low texture. So in order to use dynamic movable changable lights and shadows in the scene for mobile, only way is to use directional light and skylight right ?

edit: here a sample video from the scene. this is in viewport preview for windows. https://sendvid.com/rsyy8gez

avatar image Tim Hobson ♦♦ STAFF Jul 14 '16 at 12:43 PM

1) Looks like TeamKingdom responded with his detailed explanation and setup.

2) I didn't say that Dynamic lighting doesn't work, just that it's expensive. Not all devices may support it.

Breakdown of lighitng on Mobile:

  • Directional Light: Needs to be set to Movable for dynamic shadow casting. An alternative method for dynamic shadow casting is Modulate Shadow casting that needs to be enabled but only works with Stationary Directional Lights.

  • Point Lights: These can be dynamic, but they do not shadow cast and any single actor in the scene can only have up to 4 dynamic point lights affecting them at a given time.

  • Spot Lights: These are not supported on mobile for dynamic lighting.

  • Skylights: This worked for me in Dynamic/Stationary/Static capacity. Dynamic Skylight does not shadow cast though.

3) Dynamic Spot Lights are not supported.

4) For shadow casting Directional Light source is the only way for dynamic shadow casting or using Modulated Shadowing with a Stationary Directional Light.

avatar image finwefeanor Jul 14 '16 at 01:33 PM

Tim thank you very much for detaily answer. Things are more clear right now, I'll read the docs for more info about them but clarifying this really helped.

and last question: future release of UE might support dynamic lighting for spot lights ? maybe when specs of mobile phones' increase to a standart/ an acceptable point.

avatar image Tim Hobson ♦♦ STAFF Jul 14 '16 at 01:43 PM

Dynamic Spotlight support I think would be a goal that is in line for the future, but would likely depend on Point Lights having shadow casting first since they are a masked version of a point light. I'm sure that limitations and variety of Android phone types plays a large role in the support of this at the moment. As phones become more powerful I would expect to see these devices be able to handle more rendering features, especially with the new Vulkan API that is supported on some mobile devices.

(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