AR Portal Setup With Universal Rendering Pipeline And AR Foundation (Unity Stencils)

  Рет қаралды 15,071

Dilmer Valecillos

Dilmer Valecillos

Күн бұрын

In this AR Portal tutorial, you will learn how to create an augmented reality portal with the Universal Rendering Pipeline, we will be looking at rendering objects and how to apply various stencil options to mask what is visible through the portal wall.
I also want to bring Christmas by using various Christmas like decorations including 3d Christmas objects, particle snow effect, and LiDAR scanning which will be used to simulate snow.
Get access to the project shown in this video by joining "Early Access To Source Code" tier in Patreon at / dilmerv
Thanks to "Broken Ellipse" for their 3D Christmas Objects which you can also get from:
assetstore.unity.com/packages...
** Support me by Subscribing to the channel as it will help me in bringing a lot more content **
bit.ly/2NmnFMu
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

Пікірлер: 64
@LuisVazquez-ms4gz
@LuisVazquez-ms4gz 3 жыл бұрын
Grande como siempre señor Dilmer! Welcome back 🤙🏻
@dilmerv
@dilmerv 3 жыл бұрын
Muchas gracias Luis un abrazo y mucha salud 🎄
@runningyang3051
@runningyang3051 3 жыл бұрын
Thank you very much Dilmer. I'm surprised that you has made so many very valuable tutorials.
@dilmerv
@dilmerv 3 жыл бұрын
Thank you 🙏 I appreciate the feedback and many more in progress.
@haraldgundersen7303
@haraldgundersen7303 3 жыл бұрын
Glad you are on your feet, world needs your drive and enthusiasm...
@dilmerv
@dilmerv 3 жыл бұрын
Herald thank you and yes feeling like new 😊 have a wonderful new year !
@adso9889
@adso9889 3 жыл бұрын
Hope you are healthy now and doing great. Appreciate your content and consistency with such humbleness and gratitude. Inspiration for me.
@dilmerv
@dilmerv 3 жыл бұрын
Thanks a lot I appreciate it and yes feeling way better now ❤️ thanks !!! Best to you :)
@sharat.achary
@sharat.achary 2 жыл бұрын
Thank you for this tutorial ... 👍
@ErsinBactisa
@ErsinBactisa 2 жыл бұрын
Hi! I made a portal project where you can enter the portal. I'm trying to make the virtual scene lower than the portal, so when you enter, you should fall down and see the portal above you. I put a rigid body on the AR Camera, i disabled collisions between the AR Session origin and the camera, but the camera still doesn't fall. Do you know why? Thank you!
@syedhuzaifaali5322
@syedhuzaifaali5322 2 жыл бұрын
Great Tutorial. I have a question when I create a shader with ZWrite off it does work in the editor but not working in my android the portal window just shows nothing it should render the things behind it like in the editor but it isn't showing that. I am using built in render pipeline
@wanglinda2212
@wanglinda2212 2 жыл бұрын
Thanks for the amazing tutorial! The question(AR Mesh Manager scirpt ) at the end of the tutorial bothered me.... I want to know the details of the Script and in Mesh Render is a cube(Prefab),what is the purpose of..? What if I want to walk into the InsidePortal long distance....
@user-we6si4mi3x
@user-we6si4mi3x Жыл бұрын
Nice Tutorial ^^
@dilmerv
@dilmerv Жыл бұрын
Thank you !
@user-we6si4mi3x
@user-we6si4mi3x Жыл бұрын
​@@dilmerv hey hey! when I start the application, the portal is not displayed for me (this is the window through which you can see what is inside the portal), i.e. apparently the shader does not render, do not tell me what the reason can be? tell me please ^^
@GameDevHQ
@GameDevHQ 2 жыл бұрын
Hey Dilmer, did you ever upload this to your github? Can't find the repository. How do you handle the masking for the camera? If your main camera walks through the portal, all elements will be hidden.
@dilmerv
@dilmerv 2 жыл бұрын
Hey there send me an email with your GitHub username and I will grant you access, normally that repo is only available through Patreon but I know your channel so we are good to go !
@volkerku
@volkerku 2 жыл бұрын
Great tut, thx. I stumbled across an issue, where the insidePortal world has a white background which I don't know how to change. My main camera has a solid black color as background (I'm not developing for AR) but wehatever is oin the InsidePortal layer has a white background. Any idea?
@davidmarywhite
@davidmarywhite 2 жыл бұрын
do you think it's possibile to attach a stencil portal to a AR tracking image? I tried, but it doesn't track the image with that shader
@muhammadrezahaghiri
@muhammadrezahaghiri 2 жыл бұрын
Thanks for the great tutorial. I have implemented each step you mentioned, but I have a huge problem. The problem is that my portal is not working. When I change layer mask for objects, they disappear and it means everything is fine. But I don't know why my portal wall (in my case, a simple cube) isn't working.
@TheMetalFreshTiger
@TheMetalFreshTiger 2 жыл бұрын
Try with a plane
@CurlyFreak929
@CurlyFreak929 2 жыл бұрын
Hey thanks for the tutorial! Wierd problem but any idea why I can only get the masking effect to work if I change the Forward Renderer to include the render objects. If I create a custom URP Renderer like you have done in the tutorial then nothing happens Edit: So I found out the URP pipeline asset has to be set to the Rendering field in Quality Edit > Project Settings > Quality
@vigneshgovind9002
@vigneshgovind9002 2 жыл бұрын
you saved my life thank you so much :')
@maxwriter5187
@maxwriter5187 7 ай бұрын
mannnnnn, thank youuuuuuu
@ajbarry99
@ajbarry99 3 жыл бұрын
Hi Dilmer, thanks for the tutorial. I tried this with unity MARS, and it doesn't seem to work? I assigned the new forward renderers in player settings to the graphics, followed the instructions, but the mask doesn't mask out the InsidePoral layer. Any ideas?
@dilmerv
@dilmerv 3 жыл бұрын
There is really nothing specific to MARS that would make this not work. Maybe look at my blog post as it has step by step just to make sure you did all steps www.learnxr.io/members/posts/47320-ar-portal-setup-with-urp-and-ar-foundation
@grantlin7455
@grantlin7455 3 жыл бұрын
I'm curios about wht I don't have the button " add Render Feature " just like the Dilmer did at 8:03 ? I can only add one option called " NewARBaclgroundRendererFeature(AR Background)" and can't cutomize the name, event, opacue...etc. If anyone knows the reason plz tell me, thanks a lot! ps : I use unity 2020.2.6 ,Universal RP 10.3.1
@ManuelGutiRM
@ManuelGutiRM Жыл бұрын
Unfortunately, this isn't working on any of my projects. I've watched this tutorial multiple times and I don't think I'm missing anything. Is anyone else having issues?
@umutduran1784
@umutduran1784 17 күн бұрын
I made it work somehow, but when I pass through the portal, everything inside the portal disappears.
@underbelly69
@underbelly69 5 ай бұрын
Can you update this tutorial for quest3 pass through ?
@hilarytsai7415
@hilarytsai7415 6 ай бұрын
Is there a way you can apply this technique with 360 video? I was following a tutorial on 360 portal but it turned out to be outdated.
@rendermanpro
@rendermanpro 3 жыл бұрын
Hi Dilmer, quick question (while documentation is messy),if I have multiple assets in fbx, how can I import and assign materials and create prefab from it in scripted way? Tried to find and but no clear.
@dilmerv
@dilmerv 3 жыл бұрын
First you need to import them into Unity, I would say put them in a models folder, then drag them and drop the fbx into the scene view (this will create a model Unity understands) then from the scene view just drag them into a new folder (Resources/Prefabs) once you do this you can also load them in a scripted way, also once they are Prefabs you can also assign them materials or if they had materials already you can also import them into Unity at the time you drop them in Unity.
@dilmerv
@dilmerv 3 жыл бұрын
If this still doesn’t work for you let me know and I can make a video. Thanks
@rendermanpro
@rendermanpro 3 жыл бұрын
@@dilmerv Thanks for a prompt reply. I mean totally scriptable way? without manual steps. Like in Unreal I did it with Python, but with Unity it kind of very confusing. You have at least in one video that you had run Unity from command line to do something. In general would be interesting (for example you have 4 different socks models with different texture like in this video) 1. Scan folder for fbx 2.Recreate materials and assign to the model 3. Create prefab. Might be it is easy, buy I didn't find any (at least cleat) tutorials about that on youtube/google and it is very surprising.
@rendermanpro
@rendermanpro 3 жыл бұрын
@@dilmerv to be clear if I have not just few, but hundreds of assets
@Adilxec
@Adilxec 2 ай бұрын
hey there why is the camera not rendering if i go inside the portal
@nurhidayahhamri2100
@nurhidayahhamri2100 Жыл бұрын
Hi and good day, can i ask something? before we apply this ar portal, did we need to insert first the ar camera? thank you for your time
@nurhidayahhamri2100
@nurhidayahhamri2100 Жыл бұрын
Or do I need to import any sdk related with ar portal? like ar core, ar foundation and all of that Or I just need to install it from package manager?
@dilmerv
@dilmerv Жыл бұрын
Yes you will need to add AR Foundation, ARKit / ARCore plugins, and setup all the prerequisites to deploy to the mobile device. Take a look at this doc for instructions: docs.unity3d.com/Packages/com.unity.xr.arfoundation@5.1/manual/project-setup/install-arfoundation.html
@nurhidayahhamri2100
@nurhidayahhamri2100 Жыл бұрын
@@dilmerv for AR Foundation , ARkit/Arcore plugin, do I need to install it from package manager or I need to download from the outside?
@umutduran1784
@umutduran1784 17 күн бұрын
I made it work somehow, but when I pass through the portal, everything inside the portal disappears.
@charlesferry9465
@charlesferry9465 3 жыл бұрын
Thank you for reply and videos I want to something about portal I can't go in there why? If you have free time please make tutorial I new in this industry 🥺
@dilmerv
@dilmerv 3 жыл бұрын
You are welcome, the reason you can’t go in is due to the depth of the portal wall, scale it on the z axis and you should be able to. Best to you !
@roomi2222
@roomi2222 3 жыл бұрын
QUESTIONS Can we move inside the portal while walking through that portal door? Can we implement it inside the sphere with inverted normals to create an immersive experience? i.e Placing the portal foor at the center of sphere.
@dilmerv
@dilmerv 3 жыл бұрын
That’s a good video idea :) thanks let me try it out !
@brianchung9388
@brianchung9388 3 жыл бұрын
@@dilmerv i got it to work by changing all inside portal layers to default layer after triggering a collision between the camera and the portal wall. This can be very intensive as I have to recursively go through each child node to change each layer. Is there a way to change the render object settings via script?
@kalash9114
@kalash9114 11 ай бұрын
any good practice for this ? @@brianchung9388
@LeonFelipeCarrizosa
@LeonFelipeCarrizosa 2 жыл бұрын
Hi everyone. The background, inside the window renders in white when testing on Android. Is it possible to render it transparent? I mean, to see the camera image in the background? Thanks
@LucasBenders
@LucasBenders Жыл бұрын
You need to reorder the render features to make it work. The Mask need to be the first one, followed by ARBackground and InsidePortal as the last. I hope it helps someone!
@elgreeteeto
@elgreeteeto 6 ай бұрын
You just saved my bacon! I've been troubleshooting this for like six hours. @@LucasBenders
@charlesferry9465
@charlesferry9465 3 жыл бұрын
I don't have AR background renderer feature why? I do everything that you said
@dilmerv
@dilmerv 3 жыл бұрын
Hello Charles, what version of Unity and URP are you using ?
@charlesferry9465
@charlesferry9465 3 жыл бұрын
@@dilmerv my unity version is 2019.4.8f1 and I use unity hub so just choose URP btw thanks for reply
@dilmerv
@dilmerv 3 жыл бұрын
More likely the version of URP is old, go to the package manager upgrade Universal Rendering Pipeline to 7.3.1
@charlesferry9465
@charlesferry9465 3 жыл бұрын
@@dilmerv I am watching now your video that is URp AR setup btw thanks for reply
@mohammadrasoulfard-habibi3066
@mohammadrasoulfard-habibi3066 3 жыл бұрын
Merry Christmas Dilmer you sex beast. Have a cracking new year.
@dilmerv
@dilmerv 3 жыл бұрын
Thanks man hehe ! Merry Christmas
@z-time3291
@z-time3291 11 ай бұрын
if you speak spanish, please, do it in spanish and we will love you forev3er
@dilmerv
@dilmerv 11 ай бұрын
I am considering a channel specifically in Spanish, gracias por tu sugerencia!
Stencil buffer в unity за 5 минут. Как сделать маску в 3Д?
5:57
NERF WAR HEAVY: Drone Battle!
00:30
MacDannyGun
Рет қаралды 50 МЛН
1 or 2?🐄
00:12
Kan Andrey
Рет қаралды 46 МЛН
He sees meat everywhere 😄🥩
00:11
AngLova
Рет қаралды 11 МЛН
БОЛЬШОЙ ПЕТУШОК #shorts
00:21
Паша Осадчий
Рет қаралды 9 МЛН
How to Setup Unity AR Foundation 4+ in URP
12:26
Dilmer Valecillos
Рет қаралды 12 М.
Cross-Platform AR in Unity! - AR Foundation Overview
3:42
Coding Adventure: Portals
16:06
Sebastian Lague
Рет қаралды 1,3 МЛН
How To Create An Augmented Reality Game (AR Dependencies And AR Meshing)
30:13
Markerless AR explained
7:43
WeAR Studio
Рет қаралды 16 М.
These Keys Shouldn't Exist | Nostalgia Nerd
19:32
Nostalgia Nerd
Рет қаралды 646 М.
Unity AR Foundation AR Occlusion AR Core Depth API !
8:10
Dilmer Valecillos
Рет қаралды 17 М.
Get Started with AR in Unity in 6 minutes!
6:59
Novaborn
Рет қаралды 130 М.
NERF WAR HEAVY: Drone Battle!
00:30
MacDannyGun
Рет қаралды 50 МЛН