Dynamic shadows cast pure black on ios platforms. 4.5

I have been trying out the new dynamic shadows for mobile on a group of static meshes in engine release 4.5 and the shadows that are cast are jet black. Usually the environment color would change the color of the shadow. When you add a dynamic shadow casting light to the scene, all other forms of lighting are ignored.
This happens on the mobile device as well as the mobile previewer.

Cheers.
Team Kingdom

The first shot is from the PC. Lit with 1 dynamic direct light and a dark blue environment color.
The second shot is from the mobile previewer which looks the same as the ios version.

No response to this question yet but I see someone else has the same problem.

https://answers.unrealengine.com/questions/110655/45-preview-shadow-issue-on-mobile.html

Seems like the indirect/ambient component of the scene lighting is working on android but not on ios.

Perhaps I should have put this in the bug report section but Im not sure how to change my original answer.

Switched this to bug report.

Having the same issues on Android. The mobile preview doesn’t even show shadows.

I figured out what was causing problems for me. I posted the answer in a different thread but I will repost it here too.

The solution for me in the end was to uncheck the “Metal” checkbox in the IOS project settings and check the “Open GLES”.

That’s fixed it and it matches the mobile previewer display.

This scene contains,

  • One directional, movable light.
  • One stationary skylight (Which is odd because the documentation says that only static skylights work on mobile. However, using a static skylight doesn’t work and you get black shadows)
  • A sky dome with a simple emissive material.
  • Metal API disabled

Hope that works for you.

Hi SONB,
If you cant get shadows in the preview then are you using engine version 4.5? Dynamic shadows weren’t enabled for mobile before that.

Also, make sure you bake your lighting. Its easy to forget because you are trying to dynamically light the scene.

Try to set up a simple scene like I did below, I left the light, skylight and world settings on the default values, nothing fancy.

Hey TeamKingdom, thanks a lot for your help! Now I finally can see my shadows in the preview, and they are not pure black anymore!
Now there’s another problem: I still can’t see dynamic shadows on my landscape. They are shown on my device but not in the preview. Any ideas?

I have the same problem and there is another thread about it as well so it seems like it’s just a bug with the preview mode. I can see shadows on the landscape on the itself but not on the pc mobile preview.

The stationary skylight is a workaround as it doesn’t work properly.

Howdy TeamKingdom,

Thank you for the workaround on the issue. I was previously working with you on another similar issue involving skylights and have placed that issue into our bug database. Here is the similar issue: https://answers.unrealengine.com/questions/123554/reflection-captures-dont-work-with-moveable-direct.html . Though it is not exactly what this issue is seeing, the main issue is the directional light.

I just wanted to check in with you and see if this issue could be resolved for tracking purposes. If the issue still occurs in later releases, please feel free to re-open this issue. As of this minute, the issue is still open in our database and a timetable for a fix is uncertain.

Thanks and have a great day!

This now works as designed in 4.7. Mobile settings for skylight should be set to static and the metal API settings for mobile do not need to be disabled.

We’re using 4.6 and this still doesn’t seem to be the case on our end.

We have:

  • 1 directional light set to movable
  • 1 skylight set to static
  • Default skysphere
  • Metal is enabled
  • HDR is enabled

Result: Shadows are black in mobile preview and on device. We have never been able to get correctly lit (non-black) shadows or indirect lighting on device while dynamic shadows are enabled, using the suggested setup.

If we set the skylight to stationary or moveable as suggested by TeamKingdom as a workaround, then shadows are rendered correctly in the mobile preview, but appear as fully black on device ().

Our game levels are dynamically rendered, so we need to use dynamic lighting and cannot bake anything.

I’m at a loss at this stage. TeamKingdom you seem to have found a solution, but I can’t replicate it on our end. There are so many suggestions, workarounds, and apparently semi-fixed bugs related to dynamic shadows on mobile that the status of this feature seems very unclear.

What would be great from the folks at Epic would be a simple example scene with the “correct” lighting setup, demonstrated to run properly on device.

Epic, what do you suggest we can do to get correctly rendered, non-black shadows on device?

I have followed various bugs on the dynamic lighting on mobile and I can currently run a dynamically lit and shadowed scene on the air. I haven’t tested any other devices and dynamic shadows are reportedly not working on android.

First of all dynamic shadows and light source do not work on 4.6, they are working in the 4.7 preview. At the time of writing I am testing on preview number 6 but the versions are currently up to preview 8.

The setup I use is pretty much as documented. A static skylight, one directional light set to dynamic ( this is my sun ), and a sphere environment capture. This will light static meshes with some indirect to fill in the shadows. It will light moveable, static meshes ( e.g moving platforms ) if their “light as static” checkbox is toggled. It will also light skeletal meshes and self shadow if needed. I haven’t experimented with more sophisticated lighting setups yet but this one definitely works.

Cheers,
TeamKingdom

Thanks for the reply and the clarification about shadows working as designed in 4.7, rather than 4.6 (I believe your previous comment had a typo mentioning shadows working in 4.6?). I appreciate the time you put into investigating this previously - it’s been very helpful.

Ok, we’ll either have to make do with an unshadowed scene for now or grab the preview.