AR Foundation Improved Image Tracking - Multiple Objects/Images - Unity Augmented Reality/AR

  Рет қаралды 101,631

Dev Enabled

Dev Enabled

4 жыл бұрын

Consider supporting the channel on Patreon: / devenabled
Unity AR:
This playlist is a collection of tutorials covering Augmented Reality in Unity including ARCore, ARKit features with the use of Unity ARFoundation as well as the Vuforia plugin.
This Video:
In this video, we improve the image tracking functionality by allowing for multiple images to be tracked and specifying which prefab to spawn depending on the image that has been tracked.
Links:
Download projects from any complete tutorial series and more: mega.nz/#F!imQGFKgR!O0wu4xrnl...
Start of Unity AR Playlist: • Augmented Reality Play...
Unity Intro to AR: unity3d.com/how-to/create-AR-...
Android Device Install: docs.unity3d.com/Manual/andro...
Vuforia SDK developer.vuforia.com/downloa...
ARFoundation Git: github.com/Unity-Technologies...
Voxel Asset Downloaded here: maxparata.itch.io/voxel-space...
Get a FREE Pluralsight trial and support the channel: pluralsight.pxf.io/DevEnabled
My First Pluralsight Course: pluralsight.pxf.io/UnrealBlue...
My Second Pluralsight Course: pluralsight.pxf.io/UnrealCPPI...
My Third Pluralsight Course: pluralsight.pxf.io/UnrealFund...
Check out my Website: devenabled.com/
Twitter: / robbcreates
RECOMMENDED READING - Game Theory Books -
Theory of Fun for Game Design: amzn.to/2Y7a29z (Personal Favourite)
Game Feel: A Game Designer's Guide to Virtual Sensation: amzn.to/3159Dl5 (Another read I couldn't put down)
Level Up! The Guide to Great Video Game Design: amzn.to/2MkxcC8
The Art of Game Design, Second Edition: amzn.to/2JY6EVz
Rules of Play: Game Design Fundamentals: amzn.to/2YcfsA7
Game Programming Patterns: amzn.to/2YbXnC2
Drawing Basics and Video Game Art: amzn.to/2Ml6FVb
Sound Effects (BFXR): www.bfxr.net/
Get Affinity Designer: affinity.serif.com/en-gb/
Get Unreal: www.unrealengine.com/
Get Some great free assets here: www.gamedevmarket.net/ Gamedev.tv Courses - Affiliate Links:
Unreal C++ Developer: www.gamedev.tv/p/unreal-engin...
Unreal Multiplayer: www.gamedev.tv/p/unrealmultip...
Unreal Blueprints: www.gamedev.tv/p/unreal-bluep...
Blender Characters: www.gamedev.tv/p/blender-char...

Пікірлер: 200
@DevEnabled
@DevEnabled 4 жыл бұрын
In this video, we improve the image tracking functionality by allowing for multiple images to be tracked and specifying which prefab to spawn depending on the image that has been tracked.
@charanjeetsinghjaswani5058
@charanjeetsinghjaswani5058 4 жыл бұрын
hello @Dev Enabled i want to ask how to stabilized the image tracking so that the object spawn should stay on its place and should not move up and down
@o.pedrobenetti
@o.pedrobenetti Жыл бұрын
@@charanjeetsinghjaswani5058 I've the same question
@motionlifestudio9572
@motionlifestudio9572 Жыл бұрын
Hello, I would like to know how can I add interactivity like rotate, scale and select objects in AR foundation in image tracking mode.
@MatthewCC0311
@MatthewCC0311 4 жыл бұрын
I just wanted to catch you while you have a new upload. I just discovered your channel, and I am following along on your C++ UE4 tutorials from a year ago. Being a beginner C++ programmer, I wanted to say thank you, as getting a good teacher for UE4 with C++ is a rare thing on KZbin. You helped me get over wanting to use strictly C++ in my project, as I thought it would be beneficial, and start to appreciate blueprints more. So again, thank you for these tutorials, and I hope you continue those types of tutorials in the future. The augmentation and VR stuff isn't up my alley just yet, but I wish you the best on those videos as well. I will be watching your channel closely!
@DevEnabled
@DevEnabled 4 жыл бұрын
Thanks, Matthew. Great to hear the content has proven useful. If anything comes to mind in the future feel free to post a comment even on the older videos, I'll still get a notification and I try to reply to any comment that is readable. I actually had some more C++ content planned, I just need some time to concept the structure of it and what to cover. I can appreciate your AR/VR comment. Personally, I find AR quite interesting as it's so accessible and could have a lot of fun implementations at some point, I've always considered the prospect of scanning a board or tabletop and having a card game like MTG or a board game just loaded in front of you, saving so much setup and cost would be great. I'm not a huge fan of VR myself but I've worked with it in a professional sense for so many years I figured I could at least share my knowledge on it for people who do enjoy it.
@gorgeousorc
@gorgeousorc 3 жыл бұрын
Hero amongst men.
@chakravarthye
@chakravarthye 3 жыл бұрын
Lovely video. Thank you so much
@indigotidd6663
@indigotidd6663 2 жыл бұрын
Amazing tutorial thank you
@BenjaminK123
@BenjaminK123 3 жыл бұрын
Great video this really helped me, i was getting an error and had to change trackedImage.name to trackedImage.referenceImage.name also when you set the postion in the updateImage function i also added Quaternion rotation = trackedImage.transform.rotation; then applied that to the prefab, again thank you for a great starter video i may expand on this further and post some videos in the future
@KiritNarain
@KiritNarain 4 жыл бұрын
Amazing stuff!
@serchradd
@serchradd 10 ай бұрын
Great! thanks for this great video 😁
@yosephmanuel94
@yosephmanuel94 3 жыл бұрын
great content !
@jakew4237
@jakew4237 3 жыл бұрын
Hey great video! Do you think it would be possible to enable/disable buttons using the image manager/reference library? I want to create a catalog of objects that are placeable on a plane but I want the user to scan an image first before they get access to it. Thanks !
@philipoosthuizen
@philipoosthuizen 3 жыл бұрын
Thank you.
@ShacharOz
@ShacharOz 2 жыл бұрын
Nice example code for multiple image tracking. But I would suggest to link the image name to the prefab in a dedicated data class. But other than that, it's really useful.
@badwolfdubOfficial
@badwolfdubOfficial 2 жыл бұрын
Imagine using this with a small device in order to spawn AR wearables. That would be cool.
@GeospatialTechnologies
@GeospatialTechnologies 3 жыл бұрын
Hi Dev Enabled, Please, I got this error after finishing the script ''SpwanedPrefabs does not exist in the current context''. What about the script of SpwanObject as I see in your video?! Thanks for your help!
@ruhlmcu
@ruhlmcu 3 жыл бұрын
@Dev Enabled thanks for the videos. they are the best and most current for ARFoundation that i have seen. would you mind sharing the extensions you use for Visual Studio Code for Unity/ARFoundation development?
@GeospatialTechnologies
@GeospatialTechnologies 3 жыл бұрын
Hi, Please, how can I use the application.OpenUrL function when the image is scanned in unity?
@macrowaves624
@macrowaves624 3 жыл бұрын
Is there ways to make it trackfaster? Im not sure if its my old iPhone 6 or what but it doesn't track well. Stutters at best. ANy tips would be appreciated thanks!
@Jack-oq7rg
@Jack-oq7rg 3 жыл бұрын
is it possible to feed ReferenceImageLibrary remotely ? like download the images from remote server with the 3D prefabs to place
@abdulelahalghamdi2965
@abdulelahalghamdi2965 7 ай бұрын
Thanks for the great tutorial, I faced an issue when the prefab was instantiated, I saw some drifting in the z-axis, how can I solve that.
@itsk4000
@itsk4000 Жыл бұрын
For this project, can change the prefab which will spawn right?, like a video instead of that coffee and phone, I have a school project assigned to me about tracking image and play video, Can I apply it this way? Hope you reply me!
@xO_oxDK
@xO_oxDK 4 жыл бұрын
It is possible to have the overlaid image being a user controlled animation. Fx. a finished animation that is divided in steps and then "played" by user pressing a button or simply tapping the screen?
@o.pedrobenetti
@o.pedrobenetti 2 жыл бұрын
Yes, the animation just has to be in the prefab
@kizumekojilee2255
@kizumekojilee2255 4 жыл бұрын
Is it still possible though to use a flat 2d image as image target? Tried it but it doesn't work...
@motionlifestudio9572
@motionlifestudio9572 Жыл бұрын
Hello, I would like to know how can I add interactivity like rotate, scale and select objects in AR foundation in image tracking mode.
@stevejhon9957
@stevejhon9957 4 жыл бұрын
Hi, how to spawn different obj but with one image target using button?
@RealToOy
@RealToOy 3 жыл бұрын
It is working only for the first switch, after the first switch the same object stays spawned. Am I doing something wrong?
@BurtBot
@BurtBot 2 жыл бұрын
A build of this works on my Android device but not on my iPhone 12 Pro Max. Anyone find a solution for this?
@GeospatialTechnologies
@GeospatialTechnologies 3 жыл бұрын
Hi, I am trying to build an AR app using ARCore in Unity. I have ten images and ten URL links to websites; I need to link the ten images with those ten URL links. Simply, when I scan the image with the phone's camera, I want the URL to open directly. Could you help me by explaining how can I do that?
@carlas1720
@carlas1720 4 жыл бұрын
Do you have a solution to delete the prefab when tracking state is none? There are a couple of us who seem not to be able to figure this out I think. The prefabs always stay as soon as they have been tracked.
@serendelmacphereson3388
@serendelmacphereson3388 3 жыл бұрын
in the Awake function i changed spawnedPrefabs[prefab.name].SetActive(false); to spawnedPrefabs[prefab.name].gameObject.SetActive(false); and it turned off after spawning
@manurajput5348
@manurajput5348 3 жыл бұрын
@@serendelmacphereson3388 This works for the first time when you switch from first tracked image to second. The first model disappears and the second 3D model corresponding to that tracked image appears but try switching back to the first image again and it wont show you the corresponding model. Was it the case with you too? Are you getting what I am trying to say? If yes then how did you solve it? Also thanks in advance.
@saadelyousfi9490
@saadelyousfi9490 3 жыл бұрын
Any updates for the concern ? did you manage a solution ?
@aboodriazy3387
@aboodriazy3387 3 жыл бұрын
@@saadelyousfi9490 have you solved :/
@saadelyousfi9490
@saadelyousfi9490 3 жыл бұрын
@@aboodriazy3387 i did yes, i found a small and easy script that works very fine with multiple objects, unfortunatly on my very own project I'm still figuring out how to implement it. here it is github.com/darshanpv/DigiCard
@lilialola123
@lilialola123 3 жыл бұрын
How does the scaling work? Why are you setting the scale to 0.1? Thank you for clarifying!
@xrmasiso
@xrmasiso 2 жыл бұрын
so my guess is that usually for AR, because objects in AR are in real physical space, a scale of 1 unit in Unity corresponds to 1 meter in real space, so a scale of .1 scales it down so that it doesnt overtake the screen. i am making tutorials on AR and try to be as clear as possible if you are interested!
@marciskalnins244
@marciskalnins244 Жыл бұрын
Thanks for video! Have you tried adding ARAnchorManager to spawn GameObject with high accuracy? Would be nice tutorial..
@ideaplayground
@ideaplayground 3 жыл бұрын
Great tutorial! Is it possible to persist the reference image library, so that it could be shared? like Vuforia database
@Ashik787
@Ashik787 2 жыл бұрын
I think, if you make AR session origin and image tracking gameobject child of another game object and make it a prefab, then assetbundle, it can be shared.
@georgiosvlachogiannis9784
@georgiosvlachogiannis9784 Жыл бұрын
can we update the images to be tracked and the prefabs that needs to spawn from a database without the need of installing the new version of our app?
@imamsubhakti8155
@imamsubhakti8155 3 жыл бұрын
can we track the multiple object at the same time?
@poupdujour
@poupdujour 3 жыл бұрын
Thanks for taking time to make this. You make great content but for some reason this is the only one I am having trouble with, and it looks like a few others are in the same position. My models appear when the image target comes into view as it should, but they stay visible when the image is taken away. I can turn away from the object then turn back and it is still there without the image target. Are there any other ways to ensure the model is deactivated when the image target is not in view? I have double checked my code is identical to yours. I double checked prefab and reference image library names are identical, and have followed your video guides from the beginning in case I missed anything. Anything helps, thanks.
@manurajput5348
@manurajput5348 3 жыл бұрын
Did you solve it?
@DallaswithaD
@DallaswithaD 2 жыл бұрын
Just a hypothetical: I would put a collider or trigger box onto the camera, and one on the image-tracked prefab. The collider/trigger box on the camera would maybe be as big as the FOV of the camera. On the image-tracked prefab, I'd add a script with OnTriggerExit, so that once the prefab exits your FOV, the prefab is SetActive(false), and isn't set active again until the image is once again recognized.
@SamirJzVFX
@SamirJzVFX 3 жыл бұрын
What if I want to add an animation to the object? Can I export a .blend with an animation file? Or what doy you recommend me?
@o.pedrobenetti
@o.pedrobenetti 2 жыл бұрын
Yes, the animation just needs to be inside the prefab
@wyrus1987
@wyrus1987 3 жыл бұрын
Hello, great video! How to make model follow image rotation? TY
@heruardiyanto7479
@heruardiyanto7479 2 жыл бұрын
Thanks for the tutorial, Sir. Can I ask something? With AR Core can we do something like multitarget on Vuforia?
@o.pedrobenetti
@o.pedrobenetti 2 жыл бұрын
Yep, just add several Image Targets to the scene
@rentiantian2500
@rentiantian2500 2 жыл бұрын
could you tell me why I got that error---The name 'prefab' does not exist in the current context? thank you so much
@unbelievablenoye7178
@unbelievablenoye7178 2 жыл бұрын
I wanted to know regarding ARTrackedImagesChangedEventArgs.removed, even if I create a foreach loop it's like it doesn't work. The cycle works like this: foreach (ARTrackedImage trackedImage in eventArgs.removed) { _instantiatedPrefabs [trackedImage.referenceImage.name] .SetActive (false); } , is it an ARCore bug or am I not getting it very well. To summarize, did you also have problems with the .removed property, when using it with ARCore?
@user-lw2jc2qf3i
@user-lw2jc2qf3i 3 жыл бұрын
Hi thank you for you video! Currently I'm using Vuforia to build my AR App. I have modified the DefaultTrackableEventHandler script to play audio when the image target is tracked and it works good for me. However, I'm come across with problem of looping the audio with 5 seconds interval. Your help will be much appreciated, thank you! var audioComponents = mTrackableBehaviour.GetComponentsInChildren(true); foreach (var component in audioComponents) { component.enabled = true; component.loop = true; }
@gravityhologramsolutions3624
@gravityhologramsolutions3624 2 жыл бұрын
What algorithm does AR Foundation uses?
@mayank2564
@mayank2564 10 ай бұрын
Its working but after scanning the second image, it does not go away. and even after that, the prefab file stays on the mobile screen even if i am trying to scan the first image. when i can the second image again, it repositions itself at the center. it seems like either the image that i am tracking is not good enough, or the code has some errors
@staerii
@staerii 4 жыл бұрын
Is it possible to combine Plane Detection and Image Tracking? For example, have the prefab associated with the image spawned on a detected plane?
@DevEnabled
@DevEnabled 4 жыл бұрын
Definitely, you'd just need to mix and match the tracking logic and perhaps do something like in this video where we remove the default prefab so nothing is spawned automatically. You likely want some kind of custom TrackingManger class to track which image has been tracked from imageManager and if a plane has been tracked from PlaneManager then allow spawning an object on the plane based on which image is tracked.
@nickchang6753
@nickchang6753 3 жыл бұрын
@@DevEnabled Is there any video please? thank you
@jameshaskins4071
@jameshaskins4071 2 жыл бұрын
Just wondering if you are able to spawn different objects for the same image? Spawn whichever one is active.
@ryanleite8497
@ryanleite8497 2 жыл бұрын
hey, i've been looking for a solution to something like this, have u found anything?
@user-fs2of3uh8h
@user-fs2of3uh8h 4 жыл бұрын
cant find this video project on the link in description, are another projects located.
@DevEnabled
@DevEnabled 4 жыл бұрын
I've not uploaded 100% of the projects unfortunately.
@leaw9373
@leaw9373 3 жыл бұрын
I had the issue that only the 3d model of the last tracked image target was displayed. Deleting these lines of code solved the problem: ""foreach(GameObject go in spawnedPrefabValues){if(go.name != name){go.setActive(false);}} Maybe that helps you guys too
@BurtBot
@BurtBot 2 жыл бұрын
Thanks!
@jodexcreates
@jodexcreates Жыл бұрын
Both 3D models get shown in the scene when I do this
@ronweasley5573
@ronweasley5573 Жыл бұрын
@@jodexcreates same were u able to fix it?
@olcayertasms3177
@olcayertasms3177 Жыл бұрын
@@ronweasley5573 Did you fix it ?
@amirulaminazli2573
@amirulaminazli2573 3 жыл бұрын
i follow this tutorial but i get error to generated arcore and few other
@manurajput5348
@manurajput5348 3 жыл бұрын
Hello I am encountering the same problem as many other users over here. Ideally as you switch between the tracked image the corresponding 3D model should be displayed. But here you have to close the app and restart it . Have you figured out a way to solve it yet? Or if you could point my in some direction to resolve it. Thanks in advance.
@megapartymen
@megapartymen 2 жыл бұрын
did you solve the problem? Faced the same.
@parsec3d
@parsec3d 3 жыл бұрын
Hi, great video, just having some issues the first object spawn remains as the only one tracked so if the first image I see is for Object A I get Object A but to see Object B I need to close the app and show the image for Object B, Im not getting rotation tracked just position, also aren´t objects supposed to get killed once the image is not on camera ?
@kawerishirke5568
@kawerishirke5568 3 жыл бұрын
i have same problem as you mentioned...have you solved it? please help.
@parsec3d
@parsec3d 3 жыл бұрын
@@kawerishirke5568 no.. I switched to EasyAR not free but way better tracking.
@kawerishirke5568
@kawerishirke5568 3 жыл бұрын
@@parsec3d Fine, Thank you for the response!!!
@manurajput5348
@manurajput5348 3 жыл бұрын
@@kawerishirke5568 Did you solve it?
@kawerishirke5568
@kawerishirke5568 3 жыл бұрын
@@manurajput5348 No.., I also switched to EasyAR.
@o.pedrobenetti
@o.pedrobenetti Жыл бұрын
Hi, in my case, the phone don't place my prefab in the image that I've chosen to be my target and my prefab begin to float when I start the applications, someone can help me?
@ozlevin1678
@ozlevin1678 Жыл бұрын
Hello, thank you for this amazing tutorial. Only problem for me is after the second prefab I instantiate whether its the first image's prefab or second image's prefab, they are correctly popping and disabling the previous prefab, but then when I show the first I showed again, it doesnt hide the prefab of the second one I show and the prefab is not instantiating at all. Why is it? Basically the image Ive already showed and successfully instantiated the prefab, once it sees another image and instantiates another prefab, doesnt recognize that first image once more. This is a bug? If it is, this is a MAJOR bug
@kevingrandez8556
@kevingrandez8556 10 ай бұрын
same here :(
@ozlevin1678
@ozlevin1678 10 ай бұрын
@@kevingrandez8556 I couldnt find a way around it, no solution on the internet, I tried to code myself but still no luck. Hope the video owner recognizes this problem
@bajuhitam1005
@bajuhitam1005 3 жыл бұрын
May I know how the object can be rotating and zoom in/out? I want to implement each an object can be rotate and zoom in/out. Thank you
@user-lw2jc2qf3i
@user-lw2jc2qf3i 3 жыл бұрын
This helped me kzbin.info/www/bejne/gXSTmmiLZpJkmcU
@Besttechnology
@Besttechnology Жыл бұрын
can i use qr code with ARcore??
@seekuro6415
@seekuro6415 4 жыл бұрын
hi! I have an issue with the rotation of the instantiated prefab. If I, for example, instantiate a cube, it won't stick to the image with a face but it's placed diagonally instead. How do I manage to set the object to be perpendicular with the image? Thank you
@angusstardust
@angusstardust 4 жыл бұрын
I have had the same issue so I forced the rotation of the object to that of the trackedImage
@angusstardust
@angusstardust 4 жыл бұрын
@@Alex-uj2tz Just say that the orientation of your object is equal to that of your image marker. (you know GO.transform.rotation = marker.trasnform.rotation)
@livasadovska3052
@livasadovska3052 4 жыл бұрын
@@angusstardust thank you, this solved my problem too. Now looking at it, seems such an obvious solution...
@aquagnome1
@aquagnome1 4 жыл бұрын
@Matthieu Poyade Thanks for the details, though I don't do alot of programming etc., this may be a silly question but I must ask, in which section of the script does the "GO.transform.rotation = marker.transform.rotation" need to be placed in? Thanks and take care.
@SamirJzVFX
@SamirJzVFX 4 жыл бұрын
@@aquagnome1 here it is amigo: private void UpdateImage(ARTrackedImage trackedImage) { string name = trackedImage.referenceImage.name; Vector3 position = trackedImage.transform.position; GameObject prefab = spawnedPrefabs[name]; prefab.transform.position = position; prefab.SetActive(true); foreach (GameObject go in spawnedPrefabs.Values) { *go.transform.rotation = trackedImage.transform.rotation;* if (go.name != name) { go.SetActive(false); } } }
@revotiva
@revotiva 4 жыл бұрын
nice tutorial.... How can put a message "find a marker" and when find marker it text desapear, and apear when lose marker. thank great tuto :)
@DevEnabled
@DevEnabled 4 жыл бұрын
Thank you. Using a standard canvas setup should work for that.
@blabberbytes9967
@blabberbytes9967 3 жыл бұрын
How do you get the app on the phone? I'm trying to develop an ar experience for the public.
@xrmasiso
@xrmasiso 2 жыл бұрын
my tutorial thats coming up explains step by step how to get it on the phone!
@patrudoizero
@patrudoizero Жыл бұрын
Can AR foundation be used on windows with a webcam?
@shivangmishra4028
@shivangmishra4028 4 жыл бұрын
⚠️CAN WE CREATE SOMETHING LIKE MULTI TARGET (vuforia) in AR Foundation????
@vladkozunenko
@vladkozunenko 3 жыл бұрын
Yes. Just use a bit of imagination.
@toyhound
@toyhound 4 жыл бұрын
Nice Tutorial Bro :) Thank U! What is the version of AR foundation you use?
@DevEnabled
@DevEnabled 4 жыл бұрын
Thank you. And I'm not too sure, whichever one I demonstrated installing at the start of the playlist. I haven't changed it at any point during development.
@toyhound
@toyhound 4 жыл бұрын
Dev Enabled 2.1 ver?? Right?
@premsagar5289
@premsagar5289 3 жыл бұрын
'ARTrackedImageManager' does not contain a definition for 'trackedImageschanged' and no accessible extension method 'trackedImageschanged' i am getting this error
@eduardoortizron7398
@eduardoortizron7398 2 жыл бұрын
You are probably missing a letter, that happend to me tho...
@angusstardust
@angusstardust 4 жыл бұрын
Hi Dev Enabled, Thank you for the tutorial. Does this work for Android?
@lennardharing2320
@lennardharing2320 3 жыл бұрын
i think you have your information by now, but yes, AR-Foundation is compatible with apple ARKit and google ARCore
@schreiber_e
@schreiber_e 2 жыл бұрын
Hi, great video, Thanks! I'm trying to track multiple images like in this video, but instead of 3D models, I wanna add videos. Once the video starts, it goes on playing till the end of the video, even if the camera is not pointed towards the tracked image. Does anyone have an idea? (without Vuforia plz.)
@xrmasiso
@xrmasiso 2 жыл бұрын
i might make a tutorial for this if the demand is high enough!
@schreiber_e
@schreiber_e 2 жыл бұрын
@@xrmasiso +1👍👏👏👏👏
@kamelbakir6415
@kamelbakir6415 2 жыл бұрын
@@xrmasiso do it please
@xrmasiso
@xrmasiso 2 жыл бұрын
@@kamelbakir6415 you got it! subscribe to my channel and stay tuned!
@rn4013
@rn4013 2 жыл бұрын
For this tutorial, I think it would be beneficial to post the code for the C# code/script somewhere, like the description from example. I think it would help out those of us who are learning a little bit more.
@DevEnabled
@DevEnabled 2 жыл бұрын
😅 You mean for those that can't be bothered to type it themselves? As everything used in the build is covered in the tutorial. Unfortunately, I don't have the project any longer so the only place the code remains is in the video. Sorry about that.
@rn4013
@rn4013 2 жыл бұрын
@@DevEnabled I typed it in. I guess I saw your point. On a sidenote, the script doesn't give me the "Placeable Prefabs" option after adding it to the "AR Session Origin." Do you know why this would happen?
@sergioandresrodriguez6340
@sergioandresrodriguez6340 3 жыл бұрын
Hi bro, I have a problem with my project. When I scan my augmented reality markers my prefabs appear at 0,0,0 coordinates. I have not been able to solve this problem for 3 weeks. I really appreciate your help.
@derfelixhalt
@derfelixhalt 3 жыл бұрын
Actually the same problem for me. Would also appreciate some help :)
@carlas1720
@carlas1720 3 жыл бұрын
Guys, not sure this helps here as well but with my code I needed to make the prefab a child of an empty game object and only then was able to change any transformations
@ulicesisaia4518
@ulicesisaia4518 3 жыл бұрын
I have everything the same in the code but can't recognize 2 separate images, I have to close the aplication and open again to scan the other one, and also both are upside down, please help!!!
@manurajput5348
@manurajput5348 3 жыл бұрын
Did you solve it?
@Lemonlimed
@Lemonlimed 4 жыл бұрын
Hi there! Awesome video! Unfortunately, I'm having the same problem as mavc18 . My objects are spawning before the marker is visible and not spawning on the marker at all. I have absolutely disabled them from spawning in the "tracked images prefab" (it's set to "None [Game Object]"), so that's not it. I've quadruple checked our scripts, and they seem identical. Prefabs and images have identical names. Images are 2D. I cannot for the life of me figure out what's going on. :( I'm using a Pixel 3A and Unity 2019.3.7.
@Lemonlimed
@Lemonlimed 4 жыл бұрын
Update! They are finding the markers now! (I had accidentally set the ref image size to 5 metres instead of 0.5. Oops!) The images are still spawning upon launch, though, even though I have the tracked images prefab set to "none." I had this same problem with another tutorial, so I'm wondering if it's a Unity bug or a weird Android thing.
@DevEnabled
@DevEnabled 4 жыл бұрын
Check the full comment thread by mavc18 as he mentions what he'd overlooked and has resolved it. If it sounds like the same issue then hopefully the solution will be the same for you.
@Lemonlimed
@Lemonlimed 4 жыл бұрын
@@DevEnabled After four hours I finally figured it out! Tiny coding typo that Unity didn't pick up in its error log. :) All good. Thanks again. Excellent tutorial!!
@Lemonlimed
@Lemonlimed 4 жыл бұрын
@@DevEnabled Ahh, I thought I had fixed it, but it seems not. When I changed one of the prefabs I was using, the problem came back. Again, the "Tracked Image Prefab" is set to "none." I haven't overlooked it--in fact, I've even tried switching it to a prefab, running the app, and then switching it back to "none." The problem persists. I haven't touched the code, only which prefabs I'm using. It is the strangest problem I have ever encountered. The floating objects do disappear once the camera finds a marker, but that isn't really a solution. I've Googled the problem to no avail. Just one of those things, I guess.
@DevEnabled
@DevEnabled 4 жыл бұрын
@@Lemonlimed Hey, I'm not too sure why people are struggling with this concept and I always like to see people getting an understanding of what's going on. If you're new to Unity you might want to go over some of the official intro tutorials rather than jumping headfirst into AR? As for this example, on Awake() we're creating all of the objects before the image is ever tracked which is most likely why you're seeing them by default. In this example I have purposely set their default scale to Vector3.zero, meaning they're there, but can't be seen. We then toggle and update their visibility when the images are tracked based on their scale. That would also explain why the "floating objects" disappear when the camera finds the marker. Sounds like you've spawned the objects but not hidden them by overriding the scale and the scale is then being updated and hiding them properly when you track the image.
@lovesterposey5109
@lovesterposey5109 4 жыл бұрын
I was having trouble switching between two images. The game object doesnt go away when I move the image out of the camera view and the new image doesn't trigger the different game object. Is there a solution for this??
@jorgitomuxamarcha
@jorgitomuxamarcha 4 жыл бұрын
i have the same problem. i read that eventargs.removed it is not called when the image goes out of the cam, so you need to use another reference, like trackedimage.trackingstate. but i try this one and i have problem when i switch multiple times between images.
@lovesterposey5109
@lovesterposey5109 4 жыл бұрын
@@jorgitomuxamarcha I didn't find a solution, but I did put a "refresh" button that reloads the scene. So, the user can clear the screen for the next image.
@jorgitomuxamarcha
@jorgitomuxamarcha 4 жыл бұрын
@@lovesterposey5109 i finally gets a solution. I use the update event and i check de status of the images individually using an if. When the status change to limited means that the image is not in the camera vision.
@aquagnome1
@aquagnome1 4 жыл бұрын
Thanks for the info @jorge garcia montaño and @Lovester Posey. I am running into the same issue with the game object. @jorge garcia montaño do you have an example or reference that you used to fix this issue or what code was used for update event for each individual image? Any extra information would be appreciated, thanks.
@BogdanAndreiRO
@BogdanAndreiRO 4 жыл бұрын
@@jorgitomuxamarcha can you please help me how to do it? thanks
@revotiva
@revotiva 4 жыл бұрын
I got a problem, when camera starts, the two objects appears in 0,0,0 position,,, why if i didnt found the marker yet? :( thank u again.
@DevEnabled
@DevEnabled 4 жыл бұрын
Because we spawn the possible objects and pool them for use when the image is found at the start of the script. I'm guessing you missed the part of the video where we disable them.
@revotiva
@revotiva 4 жыл бұрын
@@DevEnabled no, i've had review all tutorial many times and the script where you dissable at start. Maybe some is wrong with my Unity 2019.3.1 or package but are the same like yours. Thanks to answers me.
@revotiva
@revotiva 4 жыл бұрын
@@DevEnabled oh man , you are rigth!!!!, thank you so much!!! i just dissable the prefab and bum! :D
@DevEnabled
@DevEnabled 4 жыл бұрын
@@revotiva Yeah, it's usually something really simple that can get overlooked. Glad to hear you tracked it down.
@revotiva
@revotiva 4 жыл бұрын
@@DevEnabled spent 3 days! haha
@tomasmiklovic4526
@tomasmiklovic4526 3 жыл бұрын
I have a problem. First scan takes something about 5 -15 seconds, then it scans much faster. Anyone have solution for this ?
@tomasmiklovic4526
@tomasmiklovic4526 2 жыл бұрын
Solved the issue was in Ar foundation version.
@lilialola123
@lilialola123 3 жыл бұрын
Great video! Next time please turn up the volume, we can't always hear you well. Thanks
@DungPham-xe3wz
@DungPham-xe3wz 2 жыл бұрын
hi i'm new dev. i trying make a project that can be track one image and show multi ar-image corresponding. this is done by button next and back to change ar-image. your turtorial is one picture - one ar-image i want one picture - muilti ar-image Ex. i have a pictute " car" . i want button left and right ( back and next ) to change multi ar-image car 3d model Can you help me pls?
@danielcoleman2047
@danielcoleman2047 2 жыл бұрын
Will this work for IOS or is this just for Android?
@premsagar5289
@premsagar5289 3 жыл бұрын
i need the C# Script
@carlocattano5981
@carlocattano5981 4 жыл бұрын
any chance you upload this project to the mega link ?
@DevEnabled
@DevEnabled 4 жыл бұрын
Hey, sorry I've had a bit too much to manage recently so I've started only uploading in-progress projects on my Patreon page. I'm now only sharing projects publicly that I don't cover as a tutorial such as the let's create content.
@carlocattano5981
@carlocattano5981 4 жыл бұрын
@@DevEnabled Oh I see , thanks . Ive tried to replicate this method but Im playing with the settings of it cause the prefabs are instantiated at start and will work on it to see if I can use this apprioach . Thanks for your content is very inspiring and clear
@SamirJzVFX
@SamirJzVFX 4 жыл бұрын
@@carlocattano5981 Assets\ImageTracking.cs(12,26): warning CS0649: Field 'ImageTracking.placeablePrefabs' is never assigned to, and will always have its default value null Do you know why is this is error? I've done right everything.
@CarloCattano
@CarloCattano 4 жыл бұрын
@@SamirJzVFX is just a warning not an error⚠️
@billlin421
@billlin421 2 жыл бұрын
I have been successful in the past, but now I don't know why as long as the program is opened, it will display all the prefabs, which is completely impossible to solve...
@xCRiPPLESx
@xCRiPPLESx 4 жыл бұрын
After making the script, and applying it to the AR Session Origin, there are no parameters for me to alter on the script component? I also get three errors, and don't know how to fix them: - Assets\Scripts\ImageTracking.cs(11,25): warning CS0649: Field 'ImageTracking.placeablePrefabs' is never assigned to, and will always have its default value null - Assets\Scripts\ImageTracking.cs(23,81): error CS0117: 'Quaternion' does not contain a definition for 'indentity' - Assets\Scripts\ImageTracking.cs(23,36): error CS0103: The name 'instantiate' does not exist in the current context CAn anyone help me?
@alexbruno9575
@alexbruno9575 4 жыл бұрын
Unity 2019.4.0 Package manager: AR Foundation Version 3.1.3 AR Subsystem Version 3.1.3 AR Core XR Plugin Version 3.1.3 Player Settings \ Other Settings \ Graphics API (select Vulkan and click on minus). If you still have an error = change one or all images inside ReferenceImageLibrary If you still have an error = Player Settings \ Other Settings \ API Level 26 or higher If you still have an error = Player Settings \ XR Settings \ uncheck ARCore Supported
@SamirJzVFX
@SamirJzVFX 4 жыл бұрын
I have the same issue as you the .placeablePrefabs is never assignet to. Did you find the solution?
@SamirJzVFX
@SamirJzVFX 4 жыл бұрын
Alex Ross exactly that one, I fill all fields but when i run the program is like the app does not detect any of them therefore it says the error I mentioned before.
@SamirJzVFX
@SamirJzVFX 4 жыл бұрын
@@artemtereshenkov9966 nevermind, i've just find my mistake xD
@buenalynch
@buenalynch 3 жыл бұрын
@@SamirJzVFX what was the mistake??
@BogdanAndreiRO
@BogdanAndreiRO 4 жыл бұрын
hey dev enabled, I really need some urgent help please, thanks
@wisdomkhan
@wisdomkhan Жыл бұрын
NOt working
@MaxIzrin
@MaxIzrin 2 жыл бұрын
Using "find object" is wasteful, as it searches the scene, and you can just "get component" instead, as it is guaranteed to be on the same Game Object by the "required component" tag. Otherwise, good video.
@gravityhologramsolutions3624
@gravityhologramsolutions3624 2 жыл бұрын
Hi I need code for SpawnObjectOnPlane.cs where can i get this?
@motionlifestudio9572
@motionlifestudio9572 Жыл бұрын
Hello, I would like to know how can I add interactivity like rotate, scale and select objects in AR foundation in image tracking mode.
@kizumekojilee2255
@kizumekojilee2255 4 жыл бұрын
Is it still possible though to use a flat 2d image as image target? Tried it but it doesn't work...
@DevEnabled
@DevEnabled 4 жыл бұрын
Yep, that's really the intended way to use it. As I mentioned it was only because I don't have access to a printer that I needed to get a little creative to get this working. If your images aren't working then you may have a problem in your code or the images might not be working very well as a pattern for the system to track.
@kizumekojilee2255
@kizumekojilee2255 4 жыл бұрын
@@DevEnabled Ah! I see! I guess I have to try another image. Thank you for replying 👍
@kizumekojilee2255
@kizumekojilee2255 4 жыл бұрын
@@DevEnabled if the image I used has no star for target rating, will it still work?
AR Foundation Image Tracking - Unity Augmented Reality/AR
7:48
Dev Enabled
Рет қаралды 62 М.
LOVE LETTER - POPPY PLAYTIME CHAPTER 3 | GH'S ANIMATION
00:15
1❤️
00:17
Nonomen ノノメン
Рет қаралды 13 МЛН
Дибала против вратаря Легенды
00:33
Mr. Oleynik
Рет қаралды 5 МЛН
Получилось у Вики?😂 #хабибка
00:14
ХАБИБ
Рет қаралды 7 МЛН
Unity AR Foundation Image Tracking to play Video
12:35
Mohd Hamza
Рет қаралды 20 М.
AR Foundation & Unity 03: Image Tracking
12:12
Dinesh Punni
Рет қаралды 126 М.
Langton's Loops: The cellular automaton that copies itself
12:01
davbrdavbr
Рет қаралды 445 М.
A new way to generate worlds (stitched WFC)
10:51
Watt Designs
Рет қаралды 514 М.
Unity AR Foundation - AR Image Tracking Tutorial
15:21
FireDragonGameStudio
Рет қаралды 15 М.
Augmented Reality (AR) Anchors [in depth]
10:57
Learning Dojo
Рет қаралды 9 М.
Secrets Hidden in Images (Steganography) - Computerphile
13:14
Computerphile
Рет қаралды 1,2 МЛН
LOVE LETTER - POPPY PLAYTIME CHAPTER 3 | GH'S ANIMATION
00:15