ARKit - Lighting Issues on Device

Hi All,

Is anybody experiencing lighting issues with the ARKit plugin? More specifically, all assets show up either grey or bloomed-out white.

Since I couldn’t get ARSample to build on my setup I started with an empty project with a custom PlayerPawn that has an ARCamera and a CameraSphere with the AR material and mesh applied to it. Everything rendered fine on device until I added the AR camera and sphere. The camera sphere is working as expected (showing the live camera feed) and the ARCamera is updating its position as expected. Rendering looks fine in the iOS Metal preview.

I tried rebuilding lighting, recooking everything, tinkering with the directional light shadow settings, and the sphere’s shadow settings - all with no luck. Any ideas how I could fix this or at least how I can debug the issue?

Thanks!

Are you using the ARGameMode from the sample? That does a lot of the magic sauce for setting up the arkit. Also the WorldAlignment actor does a bunch with handling touch and setup.

We also have a directional light and a skylight in our scene.

Hi ,

I’m not using ARGameMode - for now I wanted to keep things simple and not worry about alignment (it seemed to me like that’s all it was helping with). When my game launches, the assets are placed in front of the camera and the tracking works fine from that point on.
I’ll add ARGameMode to my project when I get a chance to see if it makes any difference, but I have a feeling it may not help in my case.

I do have a directional light and skylight (configured similar to those in the ARSample). Also, I’m testing on an iPhone 7.

Sorry then. Basically same setup on iPhone 7 gets lighting for us. I will try without ARGameMode when I get a chance.

Thanks .
Out of curiosity, are you deploying from a with an ? I’ve had issues compiling and running dev-ar-kit due to a known issue compiling shaders on NVidia cards. I’m wondering if this is a related problem.

Macbook Pro (newish) I think has a radeon.

Hi,

I just wanted to add a screenshot to this to better illustrate the issue. Things are much more stable with the 17.1 update, but I’m still experience the lighting issues. Here you can see what the scene looks like in editor and then what it looks like on device (I’m holding the phone up in front of my monitor). The lighting is incorrect and the materials seem to be completely ignored.

I have tried using the ARSample textures and materials as well as creating my own material as Same issue with both approaches.

The issue with the lighting as seen above is still present today with engine version 4.26 and AR Core

Edit: I was able to resolve the issue on my end. As it turned out you should not have any black values on the AO texture at all or it will render completely black if not directly lit. Hope that helps someone else too.

1 Like