Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

light estimtion #5524

Open
Fatima-mnsuam opened this issue May 28, 2024 · 3 comments
Open

light estimtion #5524

Fatima-mnsuam opened this issue May 28, 2024 · 3 comments

Comments

@Fatima-mnsuam
Copy link

Hi,
Is there any method to estimate light of the real environment? Actually, I want to add light depending upon lighting condition of real user environment.

@mrxz
Copy link
Contributor

mrxz commented May 28, 2024

The built-in reflection component uses light estimation data to adjust the lighting in the scene for AR. This requires the WebXR Lighting Estimation API, so it will only work on devices that support it (AFAIK, only Android smartphones).

You can always use the API directly if you need. If you do need light estimation on a different device, then I'm afraid there's no easy solution.

@Fatima-mnsuam
Copy link
Author

Hi, Thank you for your comment. But I don't understand how reflection is working. My goal is to estimate the lighting conditions of the real environment and then dynamically project fake light if the light is low or stop projecting fake light if there's enough light, to enhance the realism of the AR experience. And I only want to do it for Android and IOS smartphones.

@vincentfretin
Copy link
Contributor

@Fatima-mnsuam Please stop spamming all the possible repositories
hiukim/mind-ar-js#531 (this lib doesn't use WebXR)
immersive-web/lighting-estimation#61 (this is is not a support repo, that for the specs)
@mrxz gave you an excellent answer here. Light estimation is only available in an immersive-ar WebXR session on Chrome Android. You can read the code in https://github.com/aframevr/aframe/blob/master/src/components/scene/reflection.js to know how A-Frame is using the Light Estimation API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants