How do I make sure lighting works on mobile when having a randomly generated map

For a learning project, I’m using the rolling ball template.

I have modified the level so that every time it loads it randomly generates a maze. Due to this, it’s impossible to bake the lighting, and the generated meshes in the maze are all set to movable. At the moment this whole setup is light up using a directional light attached to the player character (rolling ball). The issue is when I try to run this in mobile preview (since this would be a great mobile game), all I get is a black screen. Now from what I understand, UE4 doesn’t support dynamic lighting on mobile, so I was wondering if anyone had a suggestion how I would go about solving this problem.

Thanks in advance.

Currently only static lighting is supported for mobile platforms

One thing you could do is fake your own lighting, by making unlit materials, and doing your own N dot L in the Emissive. The main problem you will run into is that there are no shadows. With an abstract art style it could be done this way, especially for 2d games with lighting baked into the sprites.

Hey ,

thanks a lot for the info. Yeah as I assumed I can’t really do exactly what I wanted on mobile. Are there any plans to bring dynamic lighting support to mobile at any time?

I don’t really need shadows in a top-down maze solver, so should be fine. Also are there any good resources I should look into for lighting faking? I tried playing with the unlit materials before, but have never managed to get it to appear on mobile.

I’m assuming that with this approach I could use the full dynamic lighting for the pc/console version of the game and then switch to unlit materials when detecting that the game is running on mobile. Is this correct?

Ok, so I actually applied the unlit materials to all my static meshes, only to get a completely black geometry again (oddly enough the rolling template player physics ball is being rendered normally). The only difference is that my level geometry is made up from instanced static meshes, which no matter what seem to not be lighting up properly at all on mobile (whilst working perfectly fine on pc). If I go back to my older generator script which uses static meshes instead of the instanced ones, it works just fine. Is it possible that this is a bug in the engine?