Unity AR Foundation - How To Apply Shadows To Transparent AR Planes For More Realistic AR?

  Рет қаралды 18,041

Dilmer Valecillos

Dilmer Valecillos

Күн бұрын

Today I use AR Foundation and show you how to apply shadows to generated AR planes that cast even when AR Planes are completely transparent.
The source code to this video is now available below:
github.com/dilmerv/ARFoundati...
Credits to *bgolus* who posted the URP AR Shadow Receiver in following Unity forums post:
forum.unity.com/threads/water...
** Support me by Subscribing to the channel as it will help me in bringing a lot more content **
bit.ly/2NmnFMu
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

Пікірлер: 63
@jeeteshsingh209
@jeeteshsingh209 4 жыл бұрын
Thank You Dilmer!!! I was hoping that there was a tutorial on this for AR foundation earlier this day.. And here you came up with this.. Keep making these amazing tutorials for AR Foundation. Kudos!!!
@dilmerv
@dilmerv 4 жыл бұрын
That’s cool man and I think few people mentioned this and I even needed for one of my projects :) cheers and best to you my friend !
@HeadPack
@HeadPack 3 жыл бұрын
Dilmer, you are awesome. Perhaps worth mentioning that this shader only supports 1 cascade. As soon as one adds more, the shadows disappear. Can otherwise confirm this still works in 2021.1.14f1 URP 11. Would be wonderful if someone would create a more fully featured AR shadow plane solution, as one cascade can be insufficient in some cases.
@techlightdev
@techlightdev 3 жыл бұрын
Thank you very much again Dilmer.
@farahzehra8952
@farahzehra8952 3 жыл бұрын
Thank you once again for this wonderful video that made my life so much easier! If you could tell me one thing that is really puzzling me. I can't find 'sky and fog volume' in my Volume menu in URP projects. Can you tell me what I might be missing?
@sethmakesxr6103
@sethmakesxr6103 4 жыл бұрын
Hey love your videos, how did you get a hololens? Did you purchase it or did you receive it as a developer kit?? Thank you please let me know! Looking to get my hands on one!
@dilmerv
@dilmerv 4 жыл бұрын
Hey Seth thanks for your question, the company “Enklu” lend me a pair while I male development videos for the community. Here is their website www.enklu.com
@suneki7204
@suneki7204 4 жыл бұрын
Can you make a tutorial of how to create a load screen? I'm saying this 'cause I've seen that sometimes it takes to long to open the camera and meanwhile the screen is in black. So I want the load screen to initialize the app once the camera is already opened
@xrarchitect
@xrarchitect 4 жыл бұрын
Great tutorials!
@dilmerv
@dilmerv 4 жыл бұрын
Thank you Ian !
@saintseiyacarlos
@saintseiyacarlos 7 ай бұрын
Hello, thank you for your content, it is great but in the most current version of URP it does not work when I compile it for android, do you have any advice?
@limitlessvisuals5368
@limitlessvisuals5368 3 жыл бұрын
Hello, I have done everything that it shows even have the URP AR Shadow Receiver tot he plane, and added a material, yet IT STILL shows no shadows? PLEASE HELP
@chrisngw1477
@chrisngw1477 4 жыл бұрын
looks good ill try it out later :)
@dilmerv
@dilmerv 4 жыл бұрын
Cool Chris thanks man
@ThanksForAllMyToes
@ThanksForAllMyToes Жыл бұрын
This is great, but is there a version for a project that doesn't use URP?
@DeepaKumari-hz3jq
@DeepaKumari-hz3jq 3 жыл бұрын
Hello, I love your videos. I actually wanted to ask if you can create a video in which the ar obj faces the camera every time it is spawned.
@dilmerv
@dilmerv 3 жыл бұрын
Yes I can, I added this to my upcoming videos and thanks for your suggestion !
@trollers96
@trollers96 3 жыл бұрын
Thank you my friend
@dilmerv
@dilmerv 3 жыл бұрын
You are more than welcome 🙏
@sanky369
@sanky369 3 жыл бұрын
Hi, I tried it, it worked. But it worked only for shadows. Need to find out how to make it work for lights.
@SilvergamerTranto
@SilvergamerTranto 4 жыл бұрын
Is there a way to get the same effect with the new Lidar planes of the iPad in combination with occlusion? Right now if you do it like this, I get shadow flickering when the floor isn't completly even or the scan isn't perfectly accurate
@dilmerv
@dilmerv 4 жыл бұрын
Interesting, I haven’t tried it let me see what I can do :) thanks for the info.
@massimosarzi
@massimosarzi 2 жыл бұрын
Hi, did you find a solution to your problem? I need a good shadow with an app developed for lidar phones but the shader that Dilmer suggests flickering as you say.
@daltonsessumes2495
@daltonsessumes2495 Жыл бұрын
@@massimosarzi mine is also flickering on android and ios. Seems that it is a problem with the shadow competing with the ground plane occlusion, since they are both at y=0. I haven't found a workaround yet.
@subramanyam2699
@subramanyam2699 3 жыл бұрын
Can I use if without urp
@bartekgudowski558
@bartekgudowski558 3 жыл бұрын
Hello Dilmer! I cannot do any plane occlusion while using the URP AR Shadow Receiver? Is it supposed to work? Or can you please advise how to configure? Many thanks!
@bartekgudowski558
@bartekgudowski558 3 жыл бұрын
Sorry, forgot to mention. I have converted your project to ARKit and cannot really get the plane occlusion to work in both the Occlusion and Shadow scene. Do you have any advice as the project was made for ARCore initially? Many thanks!
@Free4Game
@Free4Game 4 жыл бұрын
Nice Tutorial Can you tell me what that window is in which your phone camera is playing?
@dilmerv
@dilmerv 4 жыл бұрын
Great question, that’s called scrcpy and I use it to display what I have on my phone right from windows, I will do a video showing how it works very soon, thanks.
@Free4Game
@Free4Game 4 жыл бұрын
@@dilmerv cool, thank you!
@officialnickname
@officialnickname 3 жыл бұрын
Thanks for the awesome script! You should put it on the Asset store
@dilmerv
@dilmerv 3 жыл бұрын
Thank you I am glad this worked for you !
@THEJABTHEJAB
@THEJABTHEJAB 3 жыл бұрын
Built this directly from your project on iOS but got the black screen with the UI overlay. I'm guessing I'm missing a simple setting probably regarding URP. Can you give me any quick fix hints?
@THEJABTHEJAB
@THEJABTHEJAB 3 жыл бұрын
Some other people are having the Black Screen problem and after a lot of wasted time I found the problem. It's as simple as select ARKIT in the Provider plugin setup. Here is the link I finally found : docs.unity3d.com/Packages/com.unity.xr.arfoundation@4.1/manual/index.html?_ga=2.234788190.1394838507.1598750753-948227097.1588240308#provider-plugin-setup
@wanglinda2212
@wanglinda2212 2 жыл бұрын
Thank You Dilmer ***** I can't find: "AR Plane Visualizer, Prefabs folder" Does anyone have the same problem as me?
@meggang9566
@meggang9566 3 жыл бұрын
Could I ask how to refresh/restart the ar camera, I get a black screen when my devices screen goes to sleep. Any suggestions for a fix?
@acwestmountain
@acwestmountain 3 жыл бұрын
Can always be a little bit of an issue if the devices goes into sleep whilst trying to keep an eye on the tracking. What I did was to just tell the phone to stay awake
@roslim0848
@roslim0848 2 жыл бұрын
i wonder how to make your ar plane transparent?, mine is yelowish transparent
@nima1303
@nima1303 4 жыл бұрын
Dear Dilmer great video thanks, How we can add light estimation in AR foundation??? I mean the direction of light in this video is not same as the direction of light in reality which makes the position of your 3D model's shadow incorrect!
@FlavioRausa
@FlavioRausa 3 жыл бұрын
I have the same question.
@dilmerv
@dilmerv 3 жыл бұрын
Take a look at this video m.kzbin.info/www/bejne/pKiZXoiVoriph7M
@dilmerv
@dilmerv 3 жыл бұрын
I will also be creating a new one for AR Foundation 4.0
@bedirhandincer3448
@bedirhandincer3448 3 жыл бұрын
@@dilmerv Thanks, for the video. I would like also to see a video about how we can implement realistic shadows based on the direction of light.
@sultan_fu
@sultan_fu Жыл бұрын
Confirmed working on 2022.1.11f1, URP 13.1.8 :D - Create Shader using the provided source code, or use the shader found in the sample project file under --\Assets\Shaders\URP AR Shadow Receiver--". - Create a material, then change the shader type and apply it to a plane. - Modify the render pipeline asset used in the project's quality settings to utilize a single shadow cascade. done!
@starcruiserstudio6590
@starcruiserstudio6590 4 ай бұрын
thanks, it worked in 2022.3.1f1
@GangstaGeekArt
@GangstaGeekArt 3 жыл бұрын
I have yet to find a solution for this with URP 10.2.2. Nothing shows up and help would be appreciated.
@HeadPack
@HeadPack 3 жыл бұрын
The shader seems to only support one shadow cascade. Got it working in URP 11.
@AscendingPilot
@AscendingPilot Жыл бұрын
Do you think this still works because I can't see any shadows except those on the statues when I try and build it in Unity!
@dilmerv
@dilmerv Жыл бұрын
I haven’t checked this code in a while, I will look into it.
@user-lr2ip7lp1i
@user-lr2ip7lp1i 2 жыл бұрын
about support unity renderpipeline build in
@Cellfan
@Cellfan 4 жыл бұрын
I have followed every step on the way, but i just can't get it to work on the phone. The material works fine in the scene editor in unity, but no shadow at all after building... :( I created a standard material, I got shadows there on the phone and I tested it in AR Foundation 3 and 4, no result... Any Ideas? tried all night :((
@Cellfan
@Cellfan 4 жыл бұрын
it works on your project, I downloaded and checked, so it needs to be some sort of Settings...
@dilmerv
@dilmerv 4 жыл бұрын
Interesting yes check your URP profile and versions inside the manifest. Thanks for the info.
@HeadPack
@HeadPack 3 жыл бұрын
Hi, this could be caused by the quality settings if you use Android. At least I saw that happen before.
@user-vg8dz1pk5x
@user-vg8dz1pk5x Жыл бұрын
[ Render Pipeline Asset ] Using URP-Balanced at least. URP-Performant will not show the shadow, which cost me much time.
@danielebenezer5159
@danielebenezer5159 2 жыл бұрын
How do i get the phone view in Unity?
@dilmerv
@dilmerv 2 жыл бұрын
Currently there is no out of the box way to get a AR Remote in unity, however there is a plug-in available which works very well assetstore.unity.com/packages/tools/utilities/ar-foundation-editor-remote-168773?aid=1101l7LXo
@roveee6992
@roveee6992 2 жыл бұрын
The shader doesn't work anymore with Unity 2020.3.26f1 LTS
@dilmerv
@dilmerv 2 жыл бұрын
Thanks for the info I will take a look.
@ZacharyAghaizu
@ZacharyAghaizu 2 жыл бұрын
@@dilmerv Thanks for this tutorial! I thought it wasn't working but with some urp shaders I made ( even when set to opaque) would not work. But others even with transparency would work. For now I just duplicate the working shader to cast shadows.
@muhammadalown4439
@muhammadalown4439 4 жыл бұрын
Hello Dilmer And thanks for the great efforts that you are putting in this channel, however there is a big problem that most of your videos are dependent on each other, and sometimes i have to watch 4 videos in order to get the idea, and maybe this is useful for you that am watching your videos, but it's not useful for me at all, actually sometimes after watching couple of videos am going to watch other channels or just search the web to find what i want to do, and this is not good for you in the long run, because you have a very smart ideas but you are pushing the people away I think you need to start build your ideas from scratch so we can learn step by step, thanks again my friend.
@dilmerv
@dilmerv 4 жыл бұрын
Thank you for your feedback my friend, I will defiantly work on making the learning process easier for everyone. This video specific is to solve a problem a lot of people had where they wanted to learn how to cast shadows transparent planes, to start for scratch I would recommend looking into my playlists as they are organize in a chronological manner. Thanks again !
@muhammadalown4439
@muhammadalown4439 4 жыл бұрын
Dear Dilmer Thanks for your reply, and by the way am not talking about this video at all, i was watching another video and it was hard for me to follow because it was based on a previous one, i really like your ideas and i really appreciate if you start building your videos from scratch, you can speed up the repetitive parts but it will be much easier for us to follow Thanks again.
Unity AR Foundation AR Occlusion AR Core Depth API !
8:10
Dilmer Valecillos
Рет қаралды 17 М.
Device Localization and Asset Anchoring in AR
0:46
Immersal
Рет қаралды 367
WHO DO I LOVE MOST?
00:22
dednahype
Рет қаралды 80 МЛН
터키아이스크림🇹🇷🍦Turkish ice cream #funny #shorts
00:26
Byungari 병아리언니
Рет қаралды 29 МЛН
OMG🤪 #tiktok #shorts #potapova_blog
00:50
Potapova_blog
Рет қаралды 18 МЛН
Immersal SDK at Gardens by the Bay
0:41
Immersal
Рет қаралды 276
How to TURN ON Lights in Unity
5:17
UGuruz
Рет қаралды 74 М.
Unity3d LiDAR - How To Use LiDAR Scanner With AR Foundation?
12:15
Dilmer Valecillos
Рет қаралды 26 М.
Creating Mixed Reality with Varjo XR-3 using Unity HDRP
15:31
Unity3d Vuforia AR Shadows tutorial
1:56
Rere Verse
Рет қаралды 24 М.
10 Minutes vs. 10 Years of Animation
19:29
Isto Inc.
Рет қаралды 280 М.