You're after the Light Estimation feature This feature uses the camera's image feed to estimate the environmental lighting conditions in real-time.
To light your 3D AR models based on the real-world lighting using the Light Estimation feature, you can follow these steps:
- Enable Light Estimation on the AR Camera Manager script (found on the AR Camera) by checking the "Enable Light Estimation" option.
- Create a Directional Light object in your scene by right-clicking in
the Hierarchy window, selecting "Light," and then choosing
"Directional Light."
- Attach a "Light Estimation" script to the Directional Light object.
This script will allow the Directional Light to update its settings
based on the real-world lighting conditions detected by the AR
camera. This is something you will have to write yourself; there are plenty of tutorials that can help you with this e.g. https://youtu.be/nw6-U_mSvQQ
With these steps, your 3D models will be lit based on the real-world lighting conditions detected by the AR camera! Their shadows should be update dynamically as the real-world lighting changes.
Hope this helps! Let me know if it doesn't work