AR AMBIENT LIGHT ESTIMATION with AR Foundation and Unity3d - Displaying values in the canvas

  Рет қаралды 14,400

Dilmer Valecillos

Dilmer Valecillos

5 жыл бұрын

In this video we go through creating a Light Estimation script which uses the AR Camera Manager events to get the ambient light estimation received from the ambient in the augmented reality experience. We also go through connecting UI components to show the raw values coming from the AR Camera Manager.
** Support me by Subscribing to the channel as it will help me in bringing a lot more content **
bit.ly/2NmnFMu
** EQUIPMENT USED TO RECORD THIS VIDEO **
- Photography Photo Portrait Studio 600W Day Light Umbrella - amzn.to/2WwI0Tc
- 1350W Photography Lighting Softbox Lighting Kit - amzn.to/2MgvV0r
- LimoStudio 6 x 9 ft. Green Muslin Backdrop with Ring Metal Holding Clips - amzn.to/30NofpT
- AmazonBasics 60-Inch Lightweight Tripod with Bag - amzn.to/2Wd8utF
- Canon EOS Rebel T6 Digital SLR Camera Kit - amzn.to/2WcnRlV
Download or Clone a copy of the source code shown in this video in the link below and don't forget to support me in Patreon at:
/ dilmerv
Supporters in Patreon help me and show your appreciation for all the content and source code provided thanks!
github.com/dilmerv/UnityARFou...
Support me in Patreon so I can keep doing stuff like this for free!
/ dilmerv
Get realtime indie development tips from me in Twitter
/ dilmerv
Subscribe to my indie development videos & game releases newsletter
www.dilmergames.com
Blog about Indie development and startup
www.dilmergames.com/blog

Пікірлер: 34
@lgtwzrd
@lgtwzrd Ай бұрын
Thanks! I plan to implement this on my next AR project for sure, now that I know this capability exists in Unity.
@dilmerv
@dilmerv Ай бұрын
Great to know this helped, have fun with your project! Thanks
@yunkyungrok864
@yunkyungrok864 4 жыл бұрын
I think this channel is totally under. Your work is amazing and I really appreciate your viedos. Thank you
@liusworkshop
@liusworkshop 5 жыл бұрын
Thanks for the video. Very informative.
@dilmerv
@dilmerv 5 жыл бұрын
Cool Yang thank you for your kind feedback !
@MohanKumar-gj9th
@MohanKumar-gj9th 4 жыл бұрын
Very informative. GOD of AR foundation
@dilmerv
@dilmerv 4 жыл бұрын
Thank you for your feedback Mohan !
@hosamfathi5254
@hosamfathi5254 3 жыл бұрын
Why use Light, and where do it affect run time... Thank you for your efforts
@sergeismira8967
@sergeismira8967 3 жыл бұрын
Thanx boss!
@dilmerv
@dilmerv 3 жыл бұрын
You are very welcome !
@nickf9024
@nickf9024 3 жыл бұрын
Hi, I really like your tutorials thanks! Following along, the light estimation values were not showing up. I had to click on my AR Camera / AR Camera manager script in the inspector and change the drop down light estimation mode from disabled to ambient intensity. then it works. sorry If this was already said in the video if i missed it. edit: haha yeah you totally already had that in there. ill leave the comment anyways!
@sashanodiaart
@sashanodiaart Жыл бұрын
Great video, thank you for sharing! Any chance you could share with us what extensions you use in your VSCode? I am not getting any intellisence support on my end and it is very difficult when typing scripts. Thank you!
@raashidkhan1
@raashidkhan1 7 ай бұрын
I have a question. Is the light estimation coming from the physical camera image or is it something from the virtual camera and directional light component in the scene? I want to implement this on HoloLens. Appreciate any references. Thank you.
@dilmerv
@dilmerv 7 ай бұрын
This is all coming from the physical camera based on the lightning captured in the physical environment. If you cover up the lenses then you can see clearly how the light estimation values changed drastically. Good question 😉
@raashidkhan1
@raashidkhan1 6 ай бұрын
@@dilmerv Thanks. I also found that ARFoundation doesn't support Hololens yet and MRTK doesn't seem straightforward.
@guruprasadkamat2011
@guruprasadkamat2011 Жыл бұрын
How to render the estimated light on objects in AR?
@jasr88
@jasr88 4 жыл бұрын
hi, i followed your tutorial and everything was working just fine... but on october 2019 just stopped working. the values of the variable ARCameraFrameEventArgs are wired, specially the Color Correction values, that are too high for a RGBA form 0 to 1 and too low for a RGBA from 0 to 255. And even if I focus my camera directly to the sun the "Avg. Brightness" value is never greater than 0.6, i'm desperate, i'll appreciate any information.
@dilmerv
@dilmerv 4 жыл бұрын
Interesting, did you get a new phone ? Or did you upgrade unity or AR Foundation ?
@jasr88
@jasr88 4 жыл бұрын
@@dilmerv i update ar foundation from 2.14 to 2.20 but i already do a downgrade and is still the same result. My test devices are an android (motorola one zoom) and a iPhone 6, the app use to work on both devices
@jasr88
@jasr88 4 жыл бұрын
Turns out that Unity modify the LightEstimation Class and now you need to use the data provided by the mainLightColor property instead of colorCorrection. Thankyou very much for your tutorials by the way.
@dilmerv
@dilmerv 4 жыл бұрын
Very cool thanks for the info and I may do a new video with your findings thanks !
@mathiasklstrupmikkelsen4353
@mathiasklstrupmikkelsen4353 2 жыл бұрын
@@jasr88 I’m struggling to get the MainLightColor.. I have everything enabled for lightEstimation but the value Never shows up ?
@barreradev
@barreradev 4 жыл бұрын
Hola amigo soy de Medellin Colombia y hace algunos dias estoy haciendo cada uno de tus tutoriales de AR foundation para principiantes, el problema q tengo ahora es que no he podido leer el valor del colorCorrection y por tanto en el celular se sigue viendo [VALUE] como te sucedió a ti, a pesar de cambiar el valor del Light Estimation Mode por Ambient Intensity, aun asi no me arroja ningun valor. sabes como puedo solucionarlo? muchas gracias.
@dilmerv
@dilmerv 4 жыл бұрын
Puede ser que tu teléfono no tenga soporte a esta función, AR Foundation tiene un método en subsystems que te dice si esto está disponible o no.
@jasr88
@jasr88 4 жыл бұрын
Es posible que tengas el mismo problema que yo, lo que pasa es que Unity cambio ARFoundation y (por lo menos en android) "ColorCorrection" ya no regresa nada, intenta usar los valores de LightEstimation guardados en la propiedad mainLightColor, si tienes dudas puedes ver como se usa ahora en el repo oficial de Unity github.com/Unity-Technologies/arfoundation-samples en el ejemplo de LightEstimation.
@dilmerv
@dilmerv 4 жыл бұрын
Gracias Alejandro por responder esta pregunta saludos.
@raghulponnusamy9034
@raghulponnusamy9034 3 жыл бұрын
the event frameReceived is not firing ,any idea why?
@dilmerv
@dilmerv 3 жыл бұрын
What device are you using ? Thanks for the info.
@raghulponnusamy9034
@raghulponnusamy9034 3 жыл бұрын
@@dilmerv ipad 6th gen
@narasimhaallamsetti1408
@narasimhaallamsetti1408 5 жыл бұрын
hi bro, if u don't mind can u upload AR basic video, How to create AR ?
@dilmerv
@dilmerv 4 жыл бұрын
Take a look at my AR Foundation Beginner's PlayList :) thanks for your suggestion.
@m1dn1ghtfury
@m1dn1ghtfury 2 жыл бұрын
Also I'm using an android device and not an iOS as you have in your video tutorial.
@dilmerv
@dilmerv 2 жыл бұрын
Yes that should work fine, light estimation is supported by ARCore developers.google.com/ar/develop/unity-arf/lighting-estimation/introduction
@m1dn1ghtfury
@m1dn1ghtfury 2 жыл бұрын
@@dilmerv thanks for the reply and I was hoping if you could help me with another question that I had. Actually when I run the light estimation the color temperature value is not printed in the UI in the app. So I wrote an else condition to see if the lightestimate was reading the color temperature and turns out it wasn't and that's why it wasn't showing any color temperature value. could you help me with this please.
Me: Don't cross there's cars coming
00:16
LOL
Рет қаралды 13 МЛН
I wish I could change THIS fast! 🤣
00:33
America's Got Talent
Рет қаралды 116 МЛН
Khó thế mà cũng làm được || How did the police do that? #shorts
01:00
Realtime AR reflection test with a water orb
0:48
Lee Vermeulen
Рет қаралды 1,5 М.
Light Estimation in Augmented Reality
4:45
Grae n
Рет қаралды 566
AR Foundation with Unity3d and Adding AR Point Cloud Particle Visualizers
17:13
Making Augmented Reality in UE5 | Unreal Fest 2022
35:38
Unreal Engine
Рет қаралды 37 М.
Unity AR foundation - Get the lighting right | HDR light estimation
3:46
RedController Interactive
Рет қаралды 228
AR Object Selection with Raycasting in AR Foundation with Unity3d
8:36
Dilmer Valecillos
Рет қаралды 38 М.
Walking AR with Google Geospatial API
2:44
Designium
Рет қаралды 3,6 М.
Me: Don't cross there's cars coming
00:16
LOL
Рет қаралды 13 МЛН