AR Lighting and Shadows

Is there any documentation out there, that I may be missing, that talks about how to handle lighting in the latest ARKit? I think by default it comes in with a stationary skylight and directional light. I know there is also some sort of plan that receives shadows, but I can’t seem to get any good results. I think I’ve seen demos where the object casts shadows based on the real world lighting, but maybe I’m mistaken. My model usually looks really dark and flat, and if I add a directional light, the shadows are whatever I bake them at, and aren’t based off the real world scene around the object.

Hi!
Read the official docs about mobile development.
If you want virtual objects cast shadows then search for “Modulated shadows”. As an example Getting Started With ARKit In Unreal Engine 4 - YouTube, but it uses older engine version. Current 4.19 is not compatible with it. So you will have to improvise :slight_smile:
Also there is a little bug related to screen coords calculations in mobile platforms in 4.19 (https://forums.unrealengine.com/deve…than-bg-camera).

I finally got light-estimation somehow working in 4.19 but what’s the correct way using it ?
I just use the ambient-lumens-intensity and pipe it into my directional-light intensity and also into the intensity of the skylight.

But as the output is lumens my lights are way to bright, so i just hackished “divided” the value to decrease the intensity.
How f.e. can i use the ambient-color in my scene, right now i use it in the directional-light, but should´nd it be used in the skylight ?

Can we change the directional-light to lumens ? The point-light f.e. has an option for it.

Hi @andyxor, did you find a solution ? I am at your same point. I take the light estimate and pump it in my movable point light in form of intensity color and temperature. but it is way too bright.
By the way, do you confirm that it only works if the lights are “movable” ? I tried with static and stationary but no changes.
It would also be nice if Modulated Shadows worked with 4.19, any news about that? What does @plastik21 means with improvise?

unreal light intensity = arkit light intensity / 1000.0f

Thx @arclee, strange enough I found out the same value empirically , but I think it is still too bright wrt to the real light! I even use color and temperature to make it more believable but the brightness is just too much. What do you think?

Maybe we use it in wrong way.

ARkit doc says:

ARKit give us “lumens” = “lm” , but Unreal SkyLight intensity use “cd/m^2”, DirectionalLight use “lux” . I don’t know how to convert they.

P.S. iOS native SceneKit SCNLight intensity use “lumens”.