"We offer new support options and therefor the forums are now in read-only mode! Please check out our Support Center for more information." - Vuforia Engine Team

Light Matching

Hi!

Is there any way to link the ambient light sensor of the device with a light in Unity so virtual objects do not appear lighter or brighter that the camera video.

So, the intensity of the directional light wll be linked to the ambinet light sensor, or the overall brightness of the camera video.

Basically, its the same principle of color grading in compositing. How does Vuforia for Unity handles this?

Kind Regards.

Hi salvadorlimones

I guess it would depend on whether you can get access to this from Unity, so probably worth checking in the Unity spec/forums in the first instance.

Reporting again, when you have a solution for it. Sounds very interesting. :)

You can adjust the scene lighting programmatically in Unity, but there is currently no way to determine brightness through the Vuforia API. This sounds like a good request for the wish list - https://developer.vuforia.com/forum/general-discussion/wish-list

 

recognize

Thu, 05/02/2013 - 12:39

One method that would also work is matching the colors/brightness of the image target points to the marker points from the live video.

Not sure how helpful it is now, but here is my current light matching script. I've attached it to the AR camera and it is accessing a directional light child component. It borrows heavily from the GetCameraImage script.

I'm bumping this thread because i want to do something similar and i haven't the knowledge to update Ellio's script for Vuforia 6.

 

Basically i'm just looking for a simple solution for dynamic lighting for Vuforia and Unity! So if you have an other idea it would be great!

Hi There,

I'm attempting to get this working with the latest Vuforia and User Defined sample and I get an error of namespace 'ITrackerEventHAndler' could not be found. Were do I locate this file? 

Many thanks for posting this script :P

I would love to know how you got this set up working maximrouf.

Any chance of a tutorial at some point or a 'how to' guide?

 

Thank you,

Marc

[quote=mrmdesign]

I would love to know how you got this set up working maximrouf.

Any chance of a tutorial at some point or a 'how to' guide?

 

Thank you,

Marc

[/quote]

I'm interested in this, too!

Not sure where that file is, someone else is probably more framilar with the whole unity setup.

mrmdesign

Thu, 04/30/2015 - 14:43

I have developed a bit of a hacky solution for something similar. (Only a method for using the camera input as a sort of fake realtime reflection anyway)

1) Create a Sphere

2) Drag and drop the Background Plane Behavior Script on to object.

Sorry it has been a long time since i wrote the script. Also since i posted it. i'll take a look at the project tonight and let you know how it works!

rexraptor

Mon, 06/18/2018 - 20:27

Hi Vuforia folks, I wrote a script for getting light estimation in Vuforia. I can confirm that it works on both android and ios. It's been tested on Samsung S6, Pixel2, and iPhone 7.