Directional Light Gone in Mobile Build?

Can’t wrap my head around this one, our Directional Light has disappeared in our Deployed game despite being just fine in Mobile Preview. Any reason this would happen? The light is Stationary, though there are no static objects in the scene.

Additionally, only the Earth object is being lit, but there’s a horrible solid line transition between light and dark. Here’s a screenshot directly from the device. Mobile HDR is enabled.

Hi James,

I know you’re looking for help from the community as well, but can you also make sure to post this in the AnswerHub’s Bug Report section. We’ll gladly help look into this and see if we can reproduce.

Also include the list of devices you’ve tested on that may be causing the issue. We can at least see if we have something comparable to test on.

Is this on 4.9 or the recently released 4.10? If it’s on 4.10, did the issue happen in 4.9 as well?

Thank you!

Tim

P.S.

Glad to see this project coming along. :slight_smile:

Thanks Tim, Sure thing I’ll post on Answerhub as well with some more diagnostic info.

This is occurring in both 4.9 and 4.10. I have since solved the mystery of the Satellite not receiving lighting, but there is still the visual artifact with shadowing, and some of the shaders not working for whatever reason (without any indication in the editor or looking incorrect in mobile preview).

If you have an account I can send the project to in confidence of it staying within Epic’s walls, I can send it over as a test case for debugging!

If you want you can send a link to me in a private message. Pending the details in the AnswerHub post you make I can see if I can replicate in anyway in a blank project as well.

Once you have a AnswerHub post up let me know the link and I’ll assign myself so we can take it from there.

Thanks, James!

PM sent Tim!

Here’s a link to the Answerhub post should anybody want to view it: Mobile Lighting Artefacts / Device Rendering Issues - Rendering - Unreal Engine Forums

Hey Tim, any updates at all?

None yet. I was out for our Thanksgiving holiday through the weekend. I’ll look into the Material issue during this week and update the AnswerHub when I have a chance.

I have had this thread going on Answerhub for a few months now and still haven’t heard anything official. However, I have finally discovered the source of the problem with the shaders.

The problem appears to be related to a precision issue on Android Devices within the Shader itself. My phone uses much lower precision it seems than the Shield device, and therefore certain nodes and techniques are very badly affected. The harsh lighting in the images shown is because the surface normals are not based off of the vertex normal, but instead use the Normalized Absolute World Position.

The sun disappears because of the tiny value used with the sphere mask to make it the size that it is (0.0003 units). The only way to get around this is to accept the artefacts that are caused when using a low-polygon mesh for the Earth object (and atmosphere object), and using a plane mesh for the sun instead and rendering it like a sprite in the distance. Using larger values or using values that aren’t too huge (in the case of World Position) seems to be a hacky fix for all these problems.

However, there is clearly an underlying issue here. The devices I deploy to (other than a shield) all use ridiculously low-precision math for the shaders. There must surely be a way to force them to use a higher-precision float? Otherwise certain shaders are quite literally impossible on mobile!