Search code examples
androidiosaugmented-realityarkitarcore

Convert ARCore LightEstimate to ARKit ARLightEstimate


I'm trying to find some middle ground between those two SDK in terms of lighting as read from the current-frame of the camera.

Is there a way to convert one to another, or convert them both into another metric that will help me accurately assume lighting conditions either taken from Android or iOS?

Specifically I'm interested on Ambient color and temperature so (iOS to me is closer to the desired).


Solution

  • Seems that this is as close as we can get to translating ambient light estimate to lumens:

    In general, though, lumens will range from 0-2000, so a rough estimate would be to multiply the brightness (ranging from 0..1) by 2000.

    So if we want to convert from ARCore to ARKit we can do lightEstimation * 2000 (ARCore lightEstimation is 0..1)

    If we want to convert lumens to relative brightness: ambientIntensity/2000 (ARKit returns values from 0 - 2000 in lumens)