Download

No lighting in my game

I built a simply car game that goes down a straight road. When I build the game for the PC I get the lighting I need:

c8542851d8ca491fe2c29c7217ae91ec253b91cf.jpeg

On iOS, it looks like completely dark, as if my lighting isn’t working:

IMG_3213.jpg

I’m not sure what I changed or did to cause this to happen. I tried using a static and stationary directional light but neither of those work. It’s as if the objects in my world are not allow light to be reflected off of it. Any help would be greatly appreciated.

I’ve had the same problem before, only static lights, with basic parameters seem to work on mobile at the moment.

Would a directional static light work? Can you elaborate on the basic parameters you use? Are these simply default settings?

You an check out the performance tiers for mobile here.

With Full HDR you do get one per-pixel directional light. Other than that all lighting is static. Make sure you’ve thoroughly looked through the mobile examples (like the temple) to see how you should set things up for mobile. If you really need dynamic lights you can use an Unlit material and fake per-vertex lighting through custom UVs–I made a short post about it somewhere on the forums.

Thanks for the link. I looked it over and I seem to be following the basic lighting tier. I randomly tried to set my road to static and that seemed to the the trick. I’m working on a game that will have you drive down a somewhat straight road. I setup trigger volumes on these roads so that I move one road in front of my that was once behind me. I did this thinking it would actually be better for performance and so that it can kind drive ‘forever’ on a straight road. I guess this isnt the right solution for mobile.

Hey farazk4, what iOS version & device are you testing? Also can you try the mobile preview in editor (Launch->Mobile), to see if it has the same issues? And finally what engine version are you on?

Yes, if you build full dynamic lights for iOS (OGLS2 or metal) it results in black materials, no idea is it a bug or feature :).

Side note, we will support one full dynamic directional light on 4.5 for mobile and also a sky light for indirect lighting.

Hey RCaloca, do you have any more information on this and when it will be available for use? I can’t seem to find it in the UE4 Roadmap on Trello. Thanks.

This is good news. The GPU workload should be very similar to the directional stationary lighting so it didn’t make any sense to not support it.

Missed your post! There’s some info here: https://www.unrealengine.com/blog/unreal-engine-45-preview-notes
DYNAMIC SHADOWS ON MOBILE

Dynamic shadows for movable directional lights are now supported on mobile platforms! Shadows are rendered using cascaded shadow maps with up to two cascades.