Search Unity

Light Estimation: Light Direction etc. unavailable

Discussion in 'AR/VR (XR) Discussion' started by reduktion, Sep 11, 2020.

  1. reduktion

    reduktion

    Joined:
    Sep 27, 2012
    Posts:
    25
    When testing the light estimation example scene from the AR Foundation Example project, I get "Unavailable" for some of the values (see screenshot).

    Not working values:
    • Main Light Direction
    • Main Light Intensity
    • Main Light Color
    • Sperical Harmonics

    In the ARCameraManager under Light Estimation everything is checked.

    I tested this on an old iPhone SE and iPad. Are there some hardware requirements for this to work?

     
  2. KyryloKuzyk

    KyryloKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    1,144
    Yes, this is a hardware limitation, the latest Light Estimation features require newer iOS devices.
     
  3. reduktion

    reduktion

    Joined:
    Sep 27, 2012
    Posts:
    25
    Okay, thanks for the answer. Is this documented somewhere? What devices support what features?
     
    Last edited: Sep 27, 2020
  4. xeye

    xeye

    Joined:
    Jun 25, 2013
    Posts:
    37
    Having this issue myself and it is driving me up the wall! I can get Main Light Direction when the User/Front Facing camera is selected, but not the rear camera (which is where it is necessary). iPhone XR w OS 14.0.1
    Is this a device model/OS issue, does anyone know?
     
    orangetech likes this.
  5. KyryloKuzyk

    KyryloKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    1,144
    Please build a development build check the console output. If the AR Foundation will detect that requested features can't be satisfied simultaneously, it will print the "Requested features not satisfied". This message means that the native underlying AR provider (ARKit in your case) can't satisfy all the requested AR features.
     
  6. DreamPower

    DreamPower

    Joined:
    Apr 2, 2017
    Posts:
    103
    Unfortunately, this is an ARKit limitation. To estimate light direction, you need a light probe. The front camera uses your face as a makeshift light probe, using how light is affecting your features to guess the light parameters in the room. The rear camera doesn't have a known surface shape ARKit can use to guess light parameters.

    Note, Android's ARCore *can* do this, because Google trained some AI to create a virtual light probe based on what the camera sees. But interestingly, ARCore *can't* figure it out looking at your face...