Unity3d with AR Foundation - How To Add And Remove Reference Points (Anchors) ?

  Рет қаралды 21,368

Dilmer Valecillos

Dilmer Valecillos

4 жыл бұрын

AR Foundation provides functionality to add a point in world space called reference points in Unity3d but usually refer as anchors in other platforms. Reference points can be use to place AR Objects in world space which allow the AR subsystem to keep track of them as trackable objects.
In this video I provide you with a demonstration of how to use reference points, we will go through creation of AR Reference points by using the AR Reference Point Manager, AR Plane Manager, AR Raycast Manager, and other AR components.
Get the recommended Synty Unity Assets shown in the video from:
Simple Props - Cartoon Assets:
assetstore.unity.com/packages...
Simple Icons - Cartoon Assets:
assetstore.unity.com/packages...
Simple Items - Cartoon Assets:
assetstore.unity.com/packages...
Source Code:
github.com/dilmerv/UnityARFou...
** Support me by Subscribing to the channel as it will help me in bringing a lot more content and also as a way to show your appreciation for the free source code provided above **
bit.ly/2NmnFMu
** Find the source code in Patreon and support me if you can even if it is with one of the lower tiers as it helps me in bringing you more content - THANK YOU **
/ dilmerv
** EQUIPMENT USED TO RECORD THIS VIDEO **
- Rode Wireless Go - amzn.to/2J7RCw6
- Rode smartLav+ Omnidirectional Lavalier Microphone for iPhone and Smartphones - amzn.to/2LBQra6
- Rode SC7 3.5mm TRS to TRRS Patch Cable - amzn.to/2XTaYxv
- Blue Snowball iCE Condenser Microphone - amzn.to/2Ija0lo
- JOBY GorillaPod 3K Kit. Compact Tripod 3K Stand - amzn.to/2Xh4Bni
- JOBY GorillaPod 5K Kit. Professional Tripod 5K Stand - amzn.to/31Ew0yW
- Photography Photo Portrait Studio 600W Day Light Umbrella - amzn.to/2WwI0Tc
- AmazonBasics 60-Inch Lightweight Tripod with Bag - amzn.to/2Wd8utF
- Canon EOS Rebel T6 Digital SLR Camera Kit - amzn.to/2WcnRlV
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

Пікірлер: 46
@rasoulmousavi9694
@rasoulmousavi9694 2 жыл бұрын
Thank you for your help with the AR Reference point tool
@14ksilverjewelry
@14ksilverjewelry 4 жыл бұрын
Thanks for the awesome tutorial!!
@dilmerv
@dilmerv 4 жыл бұрын
Cool I am glad you liked it and thanks for the feedback !
@cyberben3d
@cyberben3d 4 жыл бұрын
awesome topic!
@dilmerv
@dilmerv 4 жыл бұрын
Thank you so much for the feedback !
@sooryasankar1193
@sooryasankar1193 4 жыл бұрын
Thanks man!
@dilmerv
@dilmerv 4 жыл бұрын
You are very welcome !
@RooJJu
@RooJJu 4 жыл бұрын
Hi ! Thank you ! I don't know if you will answer but for a projet I need different references points for different prefabs (it depends on where you "click"). Is it okay to have multiple references points (and different AR session origin) on the same scene ? Or is a "bad" thing to do ?
@arihantparsoya
@arihantparsoya 2 жыл бұрын
Very helpful video. Can these anchors be persisted between sessions? Lets say I switched to another non-AR app and moved to another room, then opened the AR app again. Unity wont be able to track the same anchor in new room. In this case, is there any event/callback from Unity which I can use?
@fabioburkard
@fabioburkard 4 жыл бұрын
Very nice tutorial! Do you have any complementary tut (can be a third party one) teaching how to keep track of the pose? I mean, using the ARReferencePointUpdatedEventArg passed with the "referencePointUpdated" event? Also liked your log window! :)
@dilmerv
@dilmerv 4 жыл бұрын
Thanks Fabio I don't right now but I will in the next few days.
@farahzehra8952
@farahzehra8952 2 жыл бұрын
This is great! thanks a lot. Also, can you tell me any SDK or tool that I can use for streaming my AR screen display from one user to another? Its basically for a remote assistance project🙏🙏🙏🙏🙏🙏
@johndcoutho8962
@johndcoutho8962 3 жыл бұрын
Great video, mate. I have a question, can we utilise the same function for scene positioning and orientation in relation to real world
@dilmerv
@dilmerv 3 жыл бұрын
Absolutely, you can use this function to also reposition the scene, I would also combine this with meshing (LiDAR) as it gives you more accurate data of the real world.
@dimitrismar219
@dimitrismar219 4 жыл бұрын
Thanks for the awesome work so far, I would like to ask if there are any tips for multiplayer AR using AR Foundation.:)
@dilmerv
@dilmerv 4 жыл бұрын
You are very welcome and sure let me look into some options and make a video for the channel !
@rfbftp123
@rfbftp123 4 жыл бұрын
Hey man, thanks for the videos Im trying to create a simple AR app where I can upload an image from camera roll and place it on a wall in Augmented reality, and also have the options to make it transparent and toggle it on and off, would this be a hard project? I'm very new to this. Thanks :)
@dilmerv
@dilmerv 4 жыл бұрын
I have a few videos related to placement so check out my AR Foundation playlists and you can get an idea of what can be done :)
@dennislee267
@dennislee267 4 жыл бұрын
Actually, all the thing is works, but just why I cannot place the prefab on the plane? Is there anything missing in the Prefab? And I also check the GitHub source code, there is no prefab instantiate on it?
@aiadtariq9964
@aiadtariq9964 4 жыл бұрын
Awesome, I’m trying using anchoring and I keep seeing drift in the object ..I’ve looked everywhere and I can’t find one solid way to reduce that drift ..what do you suggest ..this is the biggest hurdle in making AR reliable and realistic .
@dilmerv
@dilmerv 4 жыл бұрын
I have experience similar behaviors, I know that with my iPhone 11 Pro I get better response when tracking objects, what device are you using?
@MN_JohnnyZ
@MN_JohnnyZ 4 жыл бұрын
Is there a way to have these reference points slide along a detected plane as an indicator of where the AR content will be placed? There is a tutorial from The Unity Workbench that no longer works since the implementation of ARPlaneManager. Once a plane was detected an icon would appear and slide along the floor for example. When the user tapped, the content would appear where that icon was. I can't for the life of me get it to work like that anymore. Love your tutorials!
@dilmerv
@dilmerv 4 жыл бұрын
I will make a video with what you are requesting Johnny, thanks for your time and feedback :)
@Tokw11
@Tokw11 4 жыл бұрын
Do you know of a good way to use reference points until an object is moved? For example, using object tracking and reference points until the object is picked up then relying more on the object tracking.
@dilmerv
@dilmerv 4 жыл бұрын
Yes I can do a video about that topic thanks for the suggestion
@kimkaye1712
@kimkaye1712 4 жыл бұрын
Hi, first of all, thank you for this tutorial, I would like to ask if how can I spawn different kinds of prefab like an array of prefab using Reference Point Manager?. Thank you!
@kimkaye1712
@kimkaye1712 4 жыл бұрын
I found a solution to my problem. For those who want to access the instantiating object of Reference Point manager. Just simply call the getter/setter named referencePointPrefab to your script Example: private ARReferencePointManager arReferencePointManager; public GameObject[] objectSpawn; Update() { arReferencePointManager.referencePointPrefab = objectSpawn[0]; } you can leave Reference Point Prefab empty in Ar Reference Point Manager Now you can Spawn different kinds of prefab in an array.
@roslim0848
@roslim0848 2 жыл бұрын
@@kimkaye1712 thank you, can i ask you question?
@franciscocriscuolo6350
@franciscocriscuolo6350 4 жыл бұрын
Thanks for the explanation, Dilmer. If i make a reference point, another person with another device can see what i instance there? keep the good work!
@dilmerv
@dilmerv 4 жыл бұрын
Hey man, reference points do not contain map info, I will do a video about that and show you what’s needed to do what you are looking for.
@franciscocriscuolo6350
@franciscocriscuolo6350 4 жыл бұрын
@@dilmerv *clap clap clap* Thank you! You are great!. This tool is useful for what? What is the difference between this and place an object in the space?
@hamzaha5658
@hamzaha5658 4 жыл бұрын
@@dilmerv Hi, I am making an AR game using AR Foundation. Any update on this video? I'm interested in multiplayer features and would like to know how I can have two users with different devices see the same object.
@samialfarra4275
@samialfarra4275 3 жыл бұрын
did you find solution of 2 devices see same anchore point in local network
@letnjaoluja
@letnjaoluja 4 жыл бұрын
Hi, do I need to change the code somehow if I use it on android? Till now it doesn't really work. At first my screen was black, so I replaced the camera with the ARCore Camera, and now I can see everything, but the touch function doesn't really work. I'm not getting any planes. Thank you so much for your videos!
@dilmerv
@dilmerv 4 жыл бұрын
Make sure to add the ARCore Plugin under the package manager and everything should work in android.
@letnjaoluja
@letnjaoluja 4 жыл бұрын
@@dilmerv Thank you for your answer, that was the first thing I did before I started coding.
@letnjaoluja
@letnjaoluja 4 жыл бұрын
@@dilmerv I just tried again and now it works! The only difference is that this time I installed ARFoundation and ARCore XR Plugin, and last time ARFoundation and ARCore SDK for Unity with Packages XR Legacy Input Helpers and Multiplayer HLAPI. I didn't really understand the first time what you meant under "ArCore Plugin" :D thanks!
@0GRANATE0
@0GRANATE0 4 жыл бұрын
Will this Reference Point stay there when we restart the APP? How to achieve that functionality? For HoloLens its called Anchor Persistance.
@dilmerv
@dilmerv 4 жыл бұрын
They won’t unless you implement ARWorldMap which saves the position in respect to the location where you are.
@terryyu5597
@terryyu5597 4 жыл бұрын
@@dilmerv To achieve persistence, Can't I use ARReference Points (Anchors)?
@Scrapemist
@Scrapemist 4 жыл бұрын
Seems ARReferencePointManager is replaced by ARAnchorManager in the latest update of AR foundation.
@dilmerv
@dilmerv 4 жыл бұрын
That’s correct I need to update this videos thanks for your feedback.
@dilmerv
@dilmerv 4 жыл бұрын
Sounds like Unity now uses the correct names ;)
路飞被小孩吓到了#海贼王#路飞
00:41
路飞与唐舞桐
Рет қаралды 33 МЛН
MEGA BOXES ARE BACK!!!
08:53
Brawl Stars
Рет қаралды 36 МЛН
Khó thế mà cũng làm được || How did the police do that? #shorts
01:00
Unity AR Foundation Simulation Tools Are Here !
10:49
Dilmer Valecillos
Рет қаралды 14 М.
Augmented Reality (AR) Anchors [in depth]
10:57
Learning Dojo
Рет қаралды 9 М.
AR Foundation Object Placement - Unity Augmented Reality/AR
13:28
These Keys Shouldn't Exist | Nostalgia Nerd
19:32
Nostalgia Nerd
Рет қаралды 646 М.
Tierlisting the BEST (and worst) GAME ENGINES
33:51
BiteMe Games
Рет қаралды 202 М.
20 Advanced Coding Tips For Big Unity Projects
22:23
Tesseract
Рет қаралды 163 М.
AR Foundation with Unity3d and Adding AR Point Cloud Particle Visualizers
17:13
Unity AR Tutorial:  AR Raycast - place an object mutiple times
6:34
SoomeenHahm Design
Рет қаралды 7 М.
路飞被小孩吓到了#海贼王#路飞
00:41
路飞与唐舞桐
Рет қаралды 33 МЛН