AR Foundation 5 - Light Estimation - Do I need Directional Light?

When using ALL Light Estimation, do I need the Directional Light or that will just be another light on top of the light estimation?

You don’t need it but the digital light may not look correct as you move the device around. Light estimation is supposed to be applied to a virtual light, including the direction so virtual content can look as if it’s being lit be a real world light source.

I think I may not have been clear in my question @davidmo_unity
I meant, do light estimation add its own light into the scene, or does it merely adjust the properties of my existing single directional light?

IE, if I delete the directional light, will light estimation fail to work, or in ALL cases, light estimation adds its own lights into the scene regardless if I have a directional light in the scene or not?

I’m asking, since the light estimation doesnt appear to work. I have the default directional light in the scene, with it set to realtime

I’m indoors, and there’s very soft indoor lighting, ie soft shadows. However my directional light seems fixed horizontally like I set it, with hard shadows.

8736186--1182834--upload_2023-1-17_14-36-42.png

8736186--1182837--upload_2023-1-17_14-37-34.png

My mistake. You do need a directional light and you need to apply the light estimation to that light as we can’t make executive decisions on which light to manipulate in your project.

How do you mean @davidmo_unity ? How do I APPLY it to the only directional light in my scene?
I thought all I need to do is to choose a setting for Light Estimation in the AR Camera Manager Script, which is what I’ve done. Is there more to it?

From the docs: https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@5.0/manual/features/camera.html
That 1st table on that page makes me believe all I have to do is choose one of the options. In my case I chose the Everything option.

Your reply seems to suggest I then need to somehow apply this chosen setting to the light.

Take a look at the AR Foundation Light Estimation Sample. This should give you some idea on how to apply the light estimation to a Unity directional light GitHub - Unity-Technologies/arfoundation-samples: Example content for Unity projects based on AR Foundation

2 Likes

Ah yes, I was using this as a template actually but missed the script attached to the directional light.

Thanks

1 Like