No video

AR Foundation & Unity 03: Image Tracking

  Рет қаралды 127,122

Dinesh Punni

Dinesh Punni

Күн бұрын

Пікірлер: 301
@dhineshm2187
@dhineshm2187 2 жыл бұрын
For anyone having a black screen while running their apk in android (not tested in ios) , seems you have been working in URP template. It is a simple fix but took a while to solve . Select your UniversalRenderPipelineAsset_Renderer.asset , inspector window >add render feature >Select AR background renderer feature. Thats it
@martinisdn541
@martinisdn541 2 жыл бұрын
the script ImageRecognitionExample created at 4:50 is placed on the AR Session Origin game object, seen at 9:40
@SureshK-is4we
@SureshK-is4we Жыл бұрын
yes but he didnt explain about it
@markbakker97
@markbakker97 5 жыл бұрын
Great introducties what is possible with image tracking and AR foundation. Off Course Vuforia offers more functionality but then you pay 499 dollar per app license. Thanks 👍👍👍
@jboss2106
@jboss2106 4 жыл бұрын
Nice tutorial, thanks. Some feedback on things I found while trying this. Unity 2019.2 does not seem to be a problem. The ar-foundation-samples I tried earlier worked fine, however they were using version 3.1.0 of the AR Foundation package and it's related packages. When upgrading to that version, note that one of the scripts on the AR Camera has been removed and you need to add an AR Pose Driver script to that Camera. It might be interesting to explain how it works when you want to track two images, each with their own prefab. I got that working by extending your script and checking which image was tracked. I didn't try if this is possible by using two AR Tracked Image Managers on the AR Session Origin.
@DineshPunni
@DineshPunni 4 жыл бұрын
Thanks for your insights :)
@walkwithpraveen9322
@walkwithpraveen9322 4 жыл бұрын
Is it have any groups ( Facebook , telegram ) ? To study and discuss AR
@DineshPunni
@DineshPunni 4 жыл бұрын
*UPDATE* For anyone having problems with Image Tracking from this video definitely check out MY NEW VIDEO on IMAGE TRACKING FOR ANDROID kzbin.info/www/bejne/j5amdIt_fpycmqc Since there are lots of issues with ARFoundation and Android I have decided, that I'll release my complete ARCore with Unity course FOR FREE here on KZbin!! The course will cover everything you need to know for creating amazing AR Apps on your Android device. You will learn about: - Setting up your Unity Project and your Phone for AR Development - Image Recognition - Light Estimation - Motion Tracking - A demo where you create an AR portal... - And more Please show some love by subscribing, liking and sharing my content, so that I can create more free courses for you guys
@jitulborah_10
@jitulborah_10 2 ай бұрын
Thank you . been struggling for the last two weeks trying to work with my Android . Thank you Again
@JafferArshad
@JafferArshad Жыл бұрын
Hello We are using AR Foundation's image targets. When it is tracked, an empty gameObject with a script is created. This script instantiates another gameObject containing the rest of the scene (characters, tables, ...). The reason we're doing it this way is because once the image is tracked we don't want the models to be linked to it (so that if we stopped looking at the image, the models won't start jittering). When we instantiate the models this way their rotation is towards the AR camera's start position. Even if we set the rotation of the objects to zero, they still face the AR camera's start position.
@charanjeetsinghjaswani5058
@charanjeetsinghjaswani5058 4 жыл бұрын
hello @Dinesh Punni how can we change state of trackable image its always on tracking state when camera is not looking to reference image
@DineshPunni
@DineshPunni 4 жыл бұрын
As far as I know you don't actively change the tracking state yourself. It should be updated by the API itself, once the image is not beeing tracked anymore. What phone did you use?
@wolfeatsheep163
@wolfeatsheep163 3 жыл бұрын
So 8 minutes into the video I wasn't sure exactly what your goal was or what you were planning to do maybe I missed it but if I didn't maybe a brief example of the outcome in the beginning would avoid confusion for us newbies I see it now but still a little more on what the plan is in the introduction... or not just trying to help.
@DineshPunni
@DineshPunni 3 жыл бұрын
Thanks for the feedback! Will do it more in future videos :)
@bryanyoung8404
@bryanyoung8404 2 жыл бұрын
I followed the tutorial, fantastic explination. However when I launch the app it doesnt seem to be doing anything with the image recognition as it only places down a cube at the starting "origin" of the phone. Im on IOS and everything builds, deploys, and launches on the phone perfectly according to what ive seen.
@3ddesignmedia42
@3ddesignmedia42 5 жыл бұрын
did everything as it shown for Android, but the object does not show
@b54v55
@b54v55 5 жыл бұрын
I have exactly the same problem. The camera starts up and then nothing, it can't detect any image whatsoever
@DineshPunni
@DineshPunni 4 жыл бұрын
@@b54v55 Apparently there are still lots of issues with Unity and ARFoundation. Check out my pinned comment :)
@colinmbrandt
@colinmbrandt 4 жыл бұрын
Either it's missing from the video or I just missed it myself: you need to put the "ImageRecognitionExample" script onto the "AR Session Origin" object in the hierarchy. Not sure if this solves the problem or not.
@ollie1252
@ollie1252 4 жыл бұрын
ARCore doesn't call eventArgs.removed and TrackingState.None, you have to work around that
@_capu
@_capu 3 жыл бұрын
@@colinmbrandt The script "ImageRecognitionExample" does nothing actually
@tapasranjanpaul6743
@tapasranjanpaul6743 3 жыл бұрын
sir your videos are awesome i learn much about ar ,vr, and xr many many thanks for your help
@oshevans
@oshevans 4 жыл бұрын
Nice tutorial 👍 Looks like your cube is positioned in the middle of the image rather than in front of it. How could you re-position the prefab instance inside your script? Or would you change the cube's position within the prefab instead?
@DineshPunni
@DineshPunni 4 жыл бұрын
Thanks for the feedback :) There are multiple ways in how you could achieve that. You could for example get the exact tracked position of the image and then add the z offset to your prefab. Or you can add an offset in the prefab itself beforehand.
@bkinak9648
@bkinak9648 4 жыл бұрын
Once simple way is to make your prefab an empty game object then position the cube(or whatever content) as a child of that empty wherever you would like.
@farahilyanah.1633
@farahilyanah.1633 4 жыл бұрын
Hi. Great tutorial. But why do we have to do the C# scripting? is it like an additional element besides allowing the object to appear on the image tracked?
@DineshPunni
@DineshPunni 4 жыл бұрын
With the scripts you can add additional functionality. The basic Image Tracking comes with the AR Foundation package
@z3ven46
@z3ven46 4 жыл бұрын
Hi, first, thanks for this tutorial. All is working as shown in the video, but when my camera goes away from the "marked image" the 3D object doesn't diasappear but it keeps be blocked in the "world". How can i handle this event?
@DineshPunni
@DineshPunni 4 жыл бұрын
You can check if your object is not beeing detected anymore, if that's the case you can disable/destroy it. There are multiple events for that. I'd recommend checking out the documentation for more details docs.unity3d.com/Packages/com.unity.xr.arfoundation@2.2/manual/index.html Here you go :)
@BurkeDEV
@BurkeDEV 4 жыл бұрын
Seems this tutorial is too outdated now. The AR Foundations/AR Core Plugin packages used in the video don't work anymore, and anything more recently gives the black screen issue. Is there a solution to this?
@DineshPunni
@DineshPunni 4 жыл бұрын
Just saw, that it's almost a year old 😶 and that's a long time in the AR/VR world. So it definitely can be outdated regards the package versions. However, it should be working without problems now using the 2019 Unity LTS version. Try out different version for the AR Foundation package with the current Unity LTS version
@ashleyjamesbrown
@ashleyjamesbrown 3 жыл бұрын
@@DineshPunni same here. tried a huge variety of combo of the package. 3.1.3 across the board compiles fine, however doesn't actually generate the prefab on to pof the tracked image at all. Looking likely the code has since changed for running through the tracked images ?
@anonanon195
@anonanon195 4 жыл бұрын
Hello. Thank you for the video. How can I achieve instantiating realtime prefab to be directly at (0,0,0) with quartenion.identity? I want camera to stay at same distance and view angle to prefab, but unity-world coordinates to be where prefab is in (0,0,0). As I'm running some tests, prefab is never at 0,0,0. :-(
@DineshPunni
@DineshPunni 4 жыл бұрын
The origin (0,0,0) will always be exactly where you started your application (if it is an AR project) It's hard to pinpoint exactly where your problem might be but you can set the position with transform.position and the rotation with transform.quaternion.
@depropanda8428
@depropanda8428 4 жыл бұрын
So I followed this completely but when I open the ap its basically a glorified camera, I cant get it to recognize the image and or spawn the prefab, i don,t know if its just because im using the latest unity and functions has changed or what.
@juliusaugustaitis4195
@juliusaugustaitis4195 3 жыл бұрын
I am having the same problem
@sydneydoc
@sydneydoc 4 жыл бұрын
It works OK but the cube is unstable. It twitches in your video, and in my build. Any thoughts please?
@DineshPunni
@DineshPunni 4 жыл бұрын
Could be due to your phone. What phone are you using? And try to close all other apps ;)
@sydneydoc
@sydneydoc 4 жыл бұрын
@@DineshPunni I've looked at many other demos on youtube and they all twitch. There's a number of forum discussions about adding smoothing to the object. Strange that using the placement indicator approach works fine.
@sydneydoc
@sydneydoc 4 жыл бұрын
Had a look at yours again ... it's twitching too!
@selsebilmejdoub8240
@selsebilmejdoub8240 4 жыл бұрын
@sydneydochello , can you please tell me the version of unity the package AR foundation you used ? i used the same versions of the video and it doesn't work ; The camera turns on. But i cannot see the cube. Can you please give me a solution. Thanks in advance. AR foundation- 2.2.0 AR core XR - 2.1.2 Unity - 2019.2.0f1
@sydneydoc
@sydneydoc 4 жыл бұрын
@@selsebilmejdoub8240 I've tried every version, along with various versions of Unity. I've backed off to ARF 3. ARF4 and 2020.2b had problems for me. Make sure you set up debugging with 'monitor' in SDK. It should show your problem.
@jeremiahdelacruz5872
@jeremiahdelacruz5872 5 жыл бұрын
Great tutorial! 👍👍 Question, How can you add multiple prefabs on Image Manager?
@DineshPunni
@DineshPunni 5 жыл бұрын
Thanks for the feedback! There are probably lots of ways to achieve this. In one of my projects i filtered through the image name to decide what GameObject to enable. They were linked through a Dictionary which (unfortunately) requires additional plugins (e.g. Odin Inspector) to be visible in the inspector. Then, when an image gets detected you could have something like this: public void OnTrackedImageChanged(ARTrackedImagesChangedEventArgs args) { foreach (var trackedImage in args.added) { if ((productDict[trackedImage.referenceImage.name]) != null) { productDict[trackedImage.referenceImage.name].SetActive(true); productDict[trackedImage.referenceImage.name].transform.position = trackedImage.transform.position; productDict[trackedImage.referenceImage.name].transform.rotation = trackedImage.transform.rotation; } } } Makes sense?
@2imPhong
@2imPhong 2 жыл бұрын
The video is very useful, I tried it and it feels great. Looking forward to the next videos.
@shalsa07
@shalsa07 4 жыл бұрын
Great tutorial Dinesh. Ur tuts are very clear and easy to follow. The Ar foundation has been particularly eye opening for me. Just have one question, Can implement image tracking like that in vuforia, where when the tacking image is off screen the 'spawn' disappears and comes back when the image is in view of the phone...🙉
@DineshPunni
@DineshPunni 4 жыл бұрын
Thanks a lot for the feedback, victor! Yes, definitely possible. You'll have to cache the spawned object and remove it when you get an onTrackingLost event. I may do a future video on exactly that, since many people asked this already.
@shalsa07
@shalsa07 4 жыл бұрын
@@DineshPunni thanks for the feedback, i appreciate you taking the time. As always i appreciate your channel. Will wait eagerly for the video tutorial regarding the same.
@raghuramanc1970
@raghuramanc1970 4 жыл бұрын
Hi Dinesh, i am learning AR. Thanks for the nice walk through. I exactly followed the steps but when i run i only see blank screen. I also noticed that the tick mark doesnt appear on the component Image Recognition(script file). Am i missing something?
@raghuramanc1970
@raghuramanc1970 4 жыл бұрын
Update 1: I deleted the script file and re-created and now the tick mark appears on the session origin component. But when i see the app in Game mode/play mode it just shows blank image...
@vargasxr421
@vargasxr421 2 жыл бұрын
Build Settings>XR Plug-in Management - click it in the list (it is the last one left side )then click ARCore check box and rebuild
@FNDAHAN1
@FNDAHAN1 4 жыл бұрын
thank you very much for this tutorial but can you please tell me how the imageRecognition script we have created is used i believe we don't really use it in this example i followed your tutorial and ignored completely the script and it worked fine is their something i am missing
@DineshPunni
@DineshPunni 4 жыл бұрын
Thanks for the feedback Fares.
@evagagreel7974
@evagagreel7974 4 жыл бұрын
yeah, you are right. he forgot to show that you must apply it to the AR Session Origin. I was also looking for that moment but it's not there. You can see it later where the Script is in the Origin's components. So actually no programming tutorials needed to answer this question.
@margaridalopes5810
@margaridalopes5810 3 жыл бұрын
hello there! really nice video! After the build how do you send it to Iphone? Thank you very much!
@DineshPunni
@DineshPunni 3 жыл бұрын
Check out this video :) kzbin.info/www/bejne/m6bClnpmmrl5oqM
@wanderstudi
@wanderstudi 5 жыл бұрын
It‘s not stable... it seems that the only ar framework that manages stable image tracking is vuforia. But it costs unfortunately. // EDIT: today I tested it for Android. The image tracking was really good ! I think it's also important to use a detailed marker image to improve tracking stability. (I guess the unity logo is not the best marker)
@GuitarKirby93
@GuitarKirby93 5 жыл бұрын
Well, it's still very early in development (thus the preview state) but once you get it working it works quite stable. Additionally it's free and allows for deployment on iOS and Android, since it directly works with ARKit and ARCore.
@fahadguru
@fahadguru 4 жыл бұрын
Hey thanks for tutorials can you make a tutorial for object tracking in AR foundation unity Android & IOS?
@DineshPunni
@DineshPunni 4 жыл бұрын
Will come soon!
@neilianaryan7939
@neilianaryan7939 4 жыл бұрын
Seems object tracking is not supported on Android. O^O
@Tactic3d
@Tactic3d 4 жыл бұрын
Very interesting and synthetic video. Why can you move the cube with the trackpad ? Is it included on the TrackingManager or else ?
@DineshPunni
@DineshPunni 4 жыл бұрын
Not sure what you mean exactly :D Can you specity?
@Tactic3d
@Tactic3d 4 жыл бұрын
@@DineshPunni Sorry, the question was : "HOW can you move the cube via the trackpad"? The app runs on your phone, so how the trackpad can be linked to the phone?
@DineshPunni
@DineshPunni 4 жыл бұрын
@@Tactic3d Ahh okay, now i get it. Sry just should have watched the video again. The cube basically follows the image. And since i'm moving the image on the screen through the trackpad the cube follows that movement. I also could've printed the image and then move it around the the cube would follow it as well. So, in the video there is no direct connection between the editor and the running app.
@Thechannelwolf
@Thechannelwolf 4 жыл бұрын
Thanks so much for the tutorial. Really saving us right now. :) How could I hide a UI once the image has been detected?
@DineshPunni
@DineshPunni 4 жыл бұрын
Most likely you want to invoke an event when your image gets detected. What you add on the event is up to you, so there you could simply disable the UI I have an older video on events but that explains it quite well. kzbin.info/www/bejne/pJfOi4GCa9SDmcU
@kijkrond1084
@kijkrond1084 4 жыл бұрын
Nice tutorial, is it possible to set an offset from the traked image. Lets say the object has to spawn 30cm away from the image? Could be a noob question but i'm completely new to this and have no coding knowledge either... :-) Thx for the reply and keep u the nice work ;-)
@DineshPunni
@DineshPunni 4 жыл бұрын
Hey, no problem. Any 'noob' question is allowed :D You could unparent the tracked object from all the objects in the scene and then add the offset after it got tracked
@mohammadrasoulfard-habibi3066
@mohammadrasoulfard-habibi3066 4 жыл бұрын
Great tutorial buddy. I've got a question. Will depth sensors on phone camera's be important in the future for augmented reality apps? As I'm about to buy a new phone for augmented reality development.
@DineshPunni
@DineshPunni 4 жыл бұрын
Hey, sorry for the late reply! Some messages don't get displayed in YT studio. Depth sensors will definitely play a big role in AR. Apple just announced the lidar sensor on their new iPad for example. HoloLens and other HMD's are also working with depth sensors already
@ericgilligan602
@ericgilligan602 4 жыл бұрын
Hey Dinesh.....do you know if there is a way to turn off tracking of the image once the model is spawned ? so the model stays open in that location?
@DineshPunni
@DineshPunni 4 жыл бұрын
You could add an anchor to your model and disable the image tracking component. Will do some research and more videos on that topic, since many people asked about image tracking
@tapasranjanpaul6743
@tapasranjanpaul6743 3 жыл бұрын
it helped me a lot thanks bro
@DineshPunni
@DineshPunni 3 жыл бұрын
Awesome! :)
@tapasranjanpaul6743
@tapasranjanpaul6743 3 жыл бұрын
thanks , keep doing your ar and vr projects
@aryanjumani4524
@aryanjumani4524 2 жыл бұрын
Hey, Whenever I try to build for Android, I get this error: Failed to generated ARCore reference image library 'ReferenceImageLibrary' UnityEditor.BuildPlayerWindow:BuildPlayerAndRun () Could you please help
@DineshPunni
@DineshPunni 2 жыл бұрын
Hey, are you using the same image as the one in the video?
@Kryptstar_mack
@Kryptstar_mack 3 жыл бұрын
Great video! would you mind putting a link to the script in the description? Cheers!
@purbaphalgunimishra9114
@purbaphalgunimishra9114 4 жыл бұрын
Great Video... Working Fine on all the smartphone that supports ARCore... Now how to proceed to show different 3d objects for more than 1 image in the reference library? I mean how to show related 3d object for particular images... Like Mountain 3d Object with Mountain image and the like...
@DineshPunni
@DineshPunni 4 жыл бұрын
Great use case. Will do a future video on exactly this request. Stay tuned
@purbaphalgunimishra9114
@purbaphalgunimishra9114 4 жыл бұрын
@@DineshPunni Thanks a Lot! God bless... Love...
@purbaphalgunimishra9114
@purbaphalgunimishra9114 4 жыл бұрын
Please make the video soon on my request. Last video I remember was about the comfort zone. I am not able implement AR Image Tracking for multiple Images with Multiple 3D Objects... Please...
@HoangVietucIT
@HoangVietucIT 4 жыл бұрын
Great tutorial, but how i can tracking image in camera on runtime?? Help me please !!
@DineshPunni
@DineshPunni 4 жыл бұрын
What exactly do you mean? Can you clarify your question? Do you want to track images with the camera beeing rendered as background?
@massimomagrini4452
@massimomagrini4452 3 жыл бұрын
any solution to keep the cube from wobbling?
@gbaldsing
@gbaldsing 5 жыл бұрын
Great tutorial! Thanks for creating this.
@DineshPunni
@DineshPunni 5 жыл бұрын
Thanks for the kind words :)
@esukumar
@esukumar 4 жыл бұрын
Great tutorial can make a tutorial for 3dmodel interaction like scale, rotation, movie and place objects in 3d space using AR Foundation
@DineshPunni
@DineshPunni 4 жыл бұрын
That's something I'll do in a future video. This can be really helpful to new AR developers so yes :)
@vallenstein9163
@vallenstein9163 3 жыл бұрын
@@DineshPunni Hey, did this video plan happen? :)
@DineshPunni
@DineshPunni 3 жыл бұрын
@@vallenstein9163 I have covered new interactions, advanced plane tracking and more features in my AR Foundation course. Feel free to check it out insiders.dineshpunni.com/course/ar-course-title Also planning to release more free content on AR (Videos, blogs, etc) soon but currently I'm focusing on building the education platform and the community.
@user-jx8re7eq6t
@user-jx8re7eq6t 4 жыл бұрын
I want to know why my project as same as yours,but when I built complete in Xcode,my iPhone couldnt tracking the image,Im using unity2019.2 and packages version same as you.thk:)
@DineshPunni
@DineshPunni 4 жыл бұрын
Hmm that's weird. Doublecheck on the version and also if you have the same images in your Image database and also if that database is referenced correctly
@encereal
@encereal Жыл бұрын
Greetings! Thanks for the video. Is there a way to increase the tracking update interval or something to increase the accuracy of the model? When moving the camera; the object seems to sometimes float around the place even when the image is still on sight
@albertomatias8815
@albertomatias8815 4 жыл бұрын
hi! great video!!! i just got a message when i try to build it saying theres an error in the code and in the code section theres a message "no monobehaviour script in the file" can you help me out with this? thank you
@DineshPunni
@DineshPunni 4 жыл бұрын
Thanks for your feedback :) check out this post here. Maybe it can help you answers.unity.com/questions/1079331/no-monobehavior-scripts-in-the-file-or-their-names.html
@milindrathod9603
@milindrathod9603 Жыл бұрын
Thanks to this I dont have to use vuforia
@GeospatialTechnologies
@GeospatialTechnologies 3 жыл бұрын
Hi Dinesh, Please, how can I use the application.OpenUrL function when the image is scanned in unity?
@nishitparikh265
@nishitparikh265 4 жыл бұрын
Hey there Imersity, I followed your tutorials and was successful building a tracking app but after some time I couldn't build the app. The editor shows this error "UnityEditor.BuildPlayerWindow+BuildMethodException: 3 errors at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x00275] in :0 at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in :0 UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)" Please help me with this. Regards.
@DiegoShinoda
@DiegoShinoda 5 жыл бұрын
I'm having the following errors: Showing Recent Messages :-1: Undefined symbol: _OBJC_CLASS_$_ARSkeletonDefinition :-1: Undefined symbol: _OBJC_CLASS_$_ARBodyAnchor :-1: Undefined symbol: _OBJC_CLASS_$_ARMatteGenerator :-1: Undefined symbol: _OBJC_CLASS_$_ARBodyTrackingConfiguration From what I've seen i need to use a more recent version of XCode to compile (i'm using 10.3) My main question is, what version of Xcode are you using?
@DineshPunni
@DineshPunni 5 жыл бұрын
Definitely looks like an XCode error. I'm currently working on the 10.2.1 version
@DiegoShinoda
@DiegoShinoda 5 жыл бұрын
IMERSITY thanks for the reply. Currently I’m thinking is the iOS version the guilty and not Xcode, (I thought I needed Xcode 11 but this confirms that’s not the case). I’m using iOS 12 that doesn’t have arkit 3 support yet, and that makes sense, I’m guessing you’re on iOS 13 right? Fortunately iOS 13 launches in 2 days (September 19) so I’m gonna wait to update to the official version and then try again
@DineshPunni
@DineshPunni 5 жыл бұрын
@@DiegoShinoda nope, I'm working on iOS 12. But I'm not using any ARKit3 features (same in the video) so that will probably the reason. Most likely the ARSkeleton and the other ARKit3 stuff won't work on iOS12. I think you need the XCode beta as well.
@DiegoShinoda
@DiegoShinoda 5 жыл бұрын
@@DineshPunni Well, i noticed iOS 13 was going to launch on the 20th so i just updated everything (ios and Xcode) and was able to fully compile. I still have to test image tracking but otherwise the app is able to be compiled and run (Setting up the debugger support did take a while)
@DineshPunni
@DineshPunni 5 жыл бұрын
@@DiegoShinoda Awesome, good news already. Let us know if you have any further experiences with switching to iOS 13. I'm going to switch to iOS13 soon.
@lauraloperfido8868
@lauraloperfido8868 4 жыл бұрын
Great tutorial! As a beginner I can tell you explain things in a very simple way :) I have just one question: when I run the app on my device, there is only a black screen with my cube in the center. I followed the tutorial step by step and as I said I'm a beginner, so I don't understand what I did wrong. Can you help me?
@DineshPunni
@DineshPunni 4 жыл бұрын
Thanks for the kind words Laura :) Yea, that problem occurs to many developers. What phonr are you using and are you getting the message that you need to allow the camera usage, when opening the app ?
@lauraloperfido8868
@lauraloperfido8868 4 жыл бұрын
@@DineshPunni I am using an IPad Pro and yes, I'm getting that message
@RooJJu
@RooJJu 4 жыл бұрын
Laura Loperfido Hey, I had the same problem just yesterday. It appeared that my device wasn’t fit for this version of ARF, so I used a previous version and the camera worked. Hope it helps you
@lauraloperfido8868
@lauraloperfido8868 4 жыл бұрын
@@RooJJu hi! Yep, I tried to use and older version of AR Foundation and now It works! Thank you :)
@lauraloperfido8868
@lauraloperfido8868 4 жыл бұрын
@Christian Chavez I'm using version 2.0.2
@colinmbrandt
@colinmbrandt 4 жыл бұрын
Thank you so much for the detailed tutorial(s)! I think I followed all the steps correctly, but my prefab doesn't instantiate at the origin of the tracked image - it looks like it's being instantiated as a child of the camera position somehow. Any ideas why this might be?
@colinmbrandt
@colinmbrandt 4 жыл бұрын
Went through the steps again after updating my packages and it seems to be working!
@abdulwaseh2192
@abdulwaseh2192 4 жыл бұрын
hi i want to use image scanning + place object in ground. help me please
@DineshPunni
@DineshPunni 4 жыл бұрын
Hey, watch this video for placing objects on the ground. kzbin.info/www/bejne/rpjYmoarmr5kgtk
@jurasv2
@jurasv2 5 жыл бұрын
Hi, how to open video player in place and in size of the image that is tracking?
@DineshPunni
@DineshPunni 5 жыл бұрын
trackedImage.size will return a Vector2 which has to be applied to your video player screen. The videoplayer component is available in Unity. Here's some documentation for it: docs.unity3d.com/ScriptReference/Video.VideoPlayer.html
@albertcallejoamat7837
@albertcallejoamat7837 2 жыл бұрын
... to put the code in the description is a good practice, Thanks anyway!!
@DineshPunni
@DineshPunni 2 жыл бұрын
We'll start adding repositories to the demos we build
@GeospatialTechnologies
@GeospatialTechnologies 3 жыл бұрын
Hi Dinesh, Thank you for this video. Please, how can I do image tracking videos using AR Foundation? Thanks in advance!
@alfredomejia1125
@alfredomejia1125 Жыл бұрын
Hello, I have problems (I use visual studio): The type or namespace name 'ARTrackedImageManager' could not be found (are you missing a using directive or an assembly reference?)
@gravityhologramsolutions3624
@gravityhologramsolutions3624 2 жыл бұрын
Hai Sir, Can you please tell what algorithm is used inside AR Foundation in Unity to Track Image?
@saraswatipatel8450
@saraswatipatel8450 4 жыл бұрын
Great tutorial. I was trying to track multiple images and each image will instantiate different model. Do you have any suggestion.
@jibinjohn8263
@jibinjohn8263 4 жыл бұрын
In the referenceimage library, add another image and follow the same steps.
@saraswatipatel8450
@saraswatipatel8450 4 жыл бұрын
I have tried doing as you suggested but when I am trying to instantiate more than one gameobject(one gameobject for one image) gameobjects are floating and getting Repositioned again and again.
@jibinjohn8263
@jibinjohn8263 4 жыл бұрын
@@saraswatipatel8450 Let me try it out.
@jaredlandetta5136
@jaredlandetta5136 2 жыл бұрын
I'm running into an error in line 22 and 27. I'm not sure what is happening. I'muing unity 2021.3.1f1 and a visual studio for mac. Any ideas?
@unijascha3005
@unijascha3005 Жыл бұрын
Do it also works with an normal camera on windows? Or do I need an IOs device=
@jin416
@jin416 4 жыл бұрын
maybe it's a dumb question, but does this work on android??
@DineshPunni
@DineshPunni 4 жыл бұрын
No dumb question, and yes it works :)
@Preyr6
@Preyr6 4 жыл бұрын
Do you know any way to improve the quality of image tracking in AR foundation?, Now its not good as Vuforia , sometimes when we tilt the phone little bit the object disappears
@DineshPunni
@DineshPunni 4 жыл бұрын
What phone are you using? Under the hood AR Foundation basically uses ARKit and ARCore. I can't really say how good they are compared to Vuforia but on my tests it worked quite stable
@Preyr6
@Preyr6 4 жыл бұрын
@@DineshPunni Iam using Oneplus 5, but when I compared with vuforia's image target , ar foundation seems way back
@DineshPunni
@DineshPunni 4 жыл бұрын
@@Preyr6 I see.. that's quite unfortunate. Maybe try to use ARCore directly just to see if it's really ARFoundation messing up somewhere or the actual ARCore API. I must admit that my Android AR Foundation builds are not close as good as my iOS AR Foundation builds in terms of stability and tracking
@DineshPunni
@DineshPunni 4 жыл бұрын
But it's hard to compare, since I didn't use flagship Android phones.
@Preyr6
@Preyr6 4 жыл бұрын
@@DineshPunni thanks for the suggestion, will try it out
@jiranav8719
@jiranav8719 4 жыл бұрын
I'm newbies for UNITY world, where can I get such screenshot image as shown in VDO? Or how to prepare other image for this lesson, please advise. Thanks ^__^
@hetthummar9582
@hetthummar9582 3 жыл бұрын
You can use any image you like... It is not like you have to create special image for this
@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
@jhonsilvaale7784
@jhonsilvaale7784 4 жыл бұрын
thanks for the tutorial!!
@DineshPunni
@DineshPunni 4 жыл бұрын
Happy to help! :)
@emanueletaddei3596
@emanueletaddei3596 4 жыл бұрын
Good tutorial, i've a problem because my object don't follow the target when move it. Any solution? Thk you
@colinmbrandt
@colinmbrandt 4 жыл бұрын
I'm having a similar issue, will let you know if I figure it out. In my scene it looks like my prefab is somehow attached to the camera position rather than the tracked image.
@colinmbrandt
@colinmbrandt 4 жыл бұрын
I just fixed this issue for myself: I had updated my AR Foundation and ARKit packages after already having gone through many of the steps, so I thought maybe the process of updating them caused issues. I made a new scene and redid several of the steps with the already-updated packages, and now it's working for me. Hopefully this helps!
@marziocallegari
@marziocallegari Жыл бұрын
Hi Dinesh, That you for the video. I seem to be having difficulty doing the same with a video or an Image instead of a cube. However, other shapes and effects seem to work. Ive selected the video player in the prefab and linked it with the Mp4 file but it doesn't seem to work. any advice would be greatly appreciated. Thank you :)
@Shockdest
@Shockdest 3 жыл бұрын
Cool tutorial Dinesh! Could you lend me some tip for switching a scene after image recognition? I absolutely freezed. :(
@DineshPunni
@DineshPunni 3 жыл бұрын
Thanks for the feedback. Check out Unity‘s SceneManagement here docs.unity3d.com/ScriptReference/SceneManagement.SceneManager.LoadScene.html
@Shockdest
@Shockdest 3 жыл бұрын
@@DineshPunni That part is ok. Thx
@stuileblank
@stuileblank 2 жыл бұрын
And for multiple images and models?? Also when building for Android camera is black
@DineshPunni
@DineshPunni 2 жыл бұрын
Hey, Here is a blog post that will help you resolve the black screen: blog.immersive-insiders.com/setup-ar-app-for-google-play-store/
@zippycat
@zippycat 3 жыл бұрын
But... can i use this with vr? so i can make a cheap vr game? that will require two print outs which are qr codes, and use them to move my arms in virtual reality world?
@b3armonk
@b3armonk 3 жыл бұрын
In your opinion, do you think Vuforia or AR Foundation is more stable for tracking?
@DineshPunni
@DineshPunni 3 жыл бұрын
I think both work fine but AR Foundation is free and does everything you need
@rafaelladeia7278
@rafaelladeia7278 3 жыл бұрын
Thanks for the great contents! One question: it is viable to create an app in which the user can create him owns virtual objects, as well its triggers?
@DineshPunni
@DineshPunni 2 жыл бұрын
Thank you for your kind words. Yes, absolutely. But keep mind that your triggers need to have good amount of features points.
@rawkstar952
@rawkstar952 3 жыл бұрын
the app required the latest version of google play services for AR but it says that it isn't compatible with my device anymore.
@mooam231
@mooam231 4 жыл бұрын
Great! Thank you!
@DineshPunni
@DineshPunni 4 жыл бұрын
Glad you liked it!
@aboziad100
@aboziad100 3 жыл бұрын
making image tracking in vuforia much easier than doing it in AR foundation, there we do not need to code , and a lot of process is needed in AR foundation.
3 жыл бұрын
The price for that lazy behaviour is at least enjoy the vuforia watermark at all your projects
@DineshPunni
@DineshPunni 3 жыл бұрын
Well, if you have $40+ per month to spend then sure why not use Vuforia
@cleiton_axel
@cleiton_axel 4 жыл бұрын
Why you rotate the cube in 45,45,45?
@DineshPunni
@DineshPunni 4 жыл бұрын
There is no particular reason for that :D It just looks a little less boring if there is some rotation on the cube :)
@lonaur
@lonaur 4 жыл бұрын
@@DineshPunni But the question is why is the cube not rotated on the image then? Is the rotation of the prefab ignored? Ok, just saw some more videos from you. I guess the prefab is instantiated with the image target .position and .rotation and therefore the local values are ignored(?).
@telesta
@telesta 4 жыл бұрын
Always try and increase your font size. I can barely see all that you are typing.
@DineshPunni
@DineshPunni 4 жыл бұрын
Thanks for the feedback. Will improve it in future videos
@Sandro21996
@Sandro21996 4 жыл бұрын
Hey, first of all: Great Video. It helped me a lot. The only problem i face is that i don´t use a cube. I try to display a text. The app works fine and the picture is recognized but the text i want to display is always laid down and it doesn´t matter how i change the rotation. Maybe you can help me how to fix this issue.
@DineshPunni
@DineshPunni 4 жыл бұрын
Hey Wanesis, thanks for the feedback. You could try putting the Text as a child object of an empty gameobject which has the correct rotation. Also check that your object is not a child of any other managing object. It's hard to pinpoint the exact problem without much information. Maybe the tips could help.
@kazumichan8446
@kazumichan8446 3 жыл бұрын
Thanks a lot , but I have a problem , which name should I write in the script I wrote the name of my image tracked but there is an error .
@DineshPunni
@DineshPunni 3 жыл бұрын
The script should have the same name as the class
@user-lu4dk3nd3k
@user-lu4dk3nd3k 3 жыл бұрын
I found the prefab drift with camera. Is that correct?
@J.H.hhhhhhhhh
@J.H.hhhhhhhhh 2 жыл бұрын
What exactly is the script doing?
@sanjit5358
@sanjit5358 2 жыл бұрын
Hi is it possible to load image targets and the models to augment on them at runtime from external sources (example a web api) in ARFoundation. [Each Image target will have a different model associated with it]
@DineshPunni
@DineshPunni 2 жыл бұрын
Hi, no you cannot load image references at runtime, but you can create an image reference library at runtime.
@Horsaz
@Horsaz 4 жыл бұрын
Great tutorial but I'm having some trouble. I followed your Setup for Android tutorial and then jumped directly into this one. When I want to try this build on my phone my computer makes an error noise and doesn't want to launch the build. Do I need to make a completely new scene and setup to do this one?
@hugolami732
@hugolami732 3 жыл бұрын
Could you fix this?
@drjpvaidya
@drjpvaidya 4 жыл бұрын
If we want to put three or more than 3 images tracked for my grand child what changes should be done...
@DineshPunni
@DineshPunni 4 жыл бұрын
Should be no problem. You can just add them on the database described in the video
@andersonindia8634
@andersonindia8634 4 жыл бұрын
The camera turns on. But i cannot see the cube. Can you please give me a solution. Thanks in advance. AR foundation- 2.2.0 AR core XR - 2.1.2 Unity - 2019.1.2f1
@DineshPunni
@DineshPunni 4 жыл бұрын
Did you make sure that the cube is visible from your camera's perspective? For example, if the cube is at (0,0,0) it will be inside you, so you have to move forward and look back. So make sure by placing the cube at (0,0,1) and then try again
@andersonindia8634
@andersonindia8634 4 жыл бұрын
@@DineshPunni Thanks for the reply. Will surely try that and get back.
@jonabojdani8412
@jonabojdani8412 3 жыл бұрын
Did you find any solution to this problem? It happens to me too
@imperialdynamics5346
@imperialdynamics5346 4 жыл бұрын
hello. Question please: Does AR foundation only work on certain android phones? For example ARCore requires specific models whereas Vuforia works on all. Is AR foundation like ARCore in that regard (ie requires specific models?) or like Vuforia?
@DineshPunni
@DineshPunni 4 жыл бұрын
Hey there, good question. Since AR Foundation uses the ARCore (and ARKit) SDK you are limited to the the ARCore (or ARKit) qualified devices. If your device does not support ARCore it won‘t work with AR Foundation eigher.
@remaz6180
@remaz6180 4 жыл бұрын
thank you so much!!
@DineshPunni
@DineshPunni 4 жыл бұрын
Glad it helped! :)
@SurajKumar-gc3kg
@SurajKumar-gc3kg 4 жыл бұрын
System.InvalidOperationException: The texture must be readable to be used as the source for a reference image. At UnityEngine.XR.ARFoundation.MutableRuntime . I was trying to add image from photos folder of gallery dynamically . Is there any possible way to convert texture image readable for ARFoundation dynamically from gallery images of a phone .
@harisankar6112
@harisankar6112 5 жыл бұрын
Any idea upto how many image target does ARFoundation support?If I have around 25 image targets will it track all 25 prefabs accordingly?
@DineshPunni
@DineshPunni 5 жыл бұрын
I think 25 images should be fine. Best is to try is out :)
@063_muhammedrinshadsr6
@063_muhammedrinshadsr6 4 жыл бұрын
Please add videos on bussiness card
@DineshPunni
@DineshPunni 4 жыл бұрын
Okay noted! AR business cards is a pretty cool use case! Be one of the first to get fresh high quality content: www.dineshpunni.com/
@daryladhityahenry
@daryladhityahenry 2 жыл бұрын
Question: 1. The code you made is useless right? Because on mobile, we can't see the log 2. How do you know 45 degree rotation is the right one so it has the right placement and rotation when it appears? I haven't try number 2 yet. But, if I didn't give any rotation, and the position at 0,0,0 in the cube, it will not appear right. It has offset from the image, and also has it's own rotation. It's really really weird. I don't even know what I'm doing wrong. Do you have any idea about this? Thanks.
@DineshPunni
@DineshPunni 2 жыл бұрын
Make sure your AR camera doesn't have any weird values and make sure to scan your environment before with your phone. Your phone needs to understand the world and create a internal map, before scanning the image. Also, it could be due to your phone. There is a big big difference (unfortunately) depending on how good your hardware is
@daryladhityahenry
@daryladhityahenry 2 жыл бұрын
@@DineshPunni Hm.. I already try it twice. So, I already make sure there's no weird value. And, the phone needs to scan the world first? hm... Isn't that unnecessary since we're using image tracking and not planar tracking? ( Just want to make sure ) For the phone, I think my phone is more than enough? I'm using S9.
@pdotcreations5464
@pdotcreations5464 4 жыл бұрын
Hello, I created a prefab with a different object and when i build and scan my photo my prefab is not over my image. Sometimes it is at my phone origin and sometimes it is oriented with the Y axis facing me. Is there a solution to this??
@DineshPunni
@DineshPunni 4 жыл бұрын
Try to give your phone some time to scan the environment before detecting the image. If you, right after the start, scan your image your phone hasn‘t oriented itself yet. So move around your phone for 5-10 seconds before
@rishabhanand9355
@rishabhanand9355 3 жыл бұрын
the backgrund of the project i made remains dark and nothing but the object appears, what could have i done wrong here, can you suggest?? Thanks!!
@DineshPunni
@DineshPunni 3 жыл бұрын
This is a common mistake with AR Foundation sometimes. Check out more here: levelup.gitconnected.com/these-mistakes-can-make-your-ar-foundation-app-display-a-black-screen-3b5b505c28b1
@GeospatialTechnologies
@GeospatialTechnologies 3 жыл бұрын
Please, I am looking for a tutorial on how to play a video with audio using an image marker. In other words, user scans image marker with phone and a video with audio plays. I am finding plenty with vuforia but what about with AR Foundation? Thanks in advance!
@jeremiahboac6138
@jeremiahboac6138 3 жыл бұрын
Create a 3d plane, attached the video with audio, and make it a prefab
@GeospatialTechnologies
@GeospatialTechnologies 3 жыл бұрын
Jay Boac Thank you so much for your help. Did you make it before as I did it but the video doesn’t show. Can I ask you if you have any tutorial for that to follow the steps? Thanks in advance
@jeremiahboac6138
@jeremiahboac6138 3 жыл бұрын
@@GeospatialTechnologies set the rotation x to 95, rotation y to 2.5, rotation z to 180 of the 3D Plane. Also, on the unity check the "Flip Vertically" and "Flip Horizontally" of your video
@GeospatialTechnologies
@GeospatialTechnologies 3 жыл бұрын
@@jeremiahboac6138 Many thanks, I did it! I would ask how can I do another scene in the same app? I did one scene (1) and exported it as an app for android and it is working successfully. Now, I added another scene (2) with another image trigger and another 3d plane and exported it as an app for android, but the first scene is working only and the second scene does not appear, why?! and how can solve this problem as I have 15 scenes with different images triggers? Any tips or tricks should I do? Many thanks for your help
@neilianaryan7939
@neilianaryan7939 4 жыл бұрын
How do you think about the stability of ARKit's Image tracking and Vuforia's? I think Vuforia's is better, I don't know, I made a demo, it's OK on iPhone X but sucks on iPad(2018), keep tracking and losing. :-(
@neilianaryan7939
@neilianaryan7939 4 жыл бұрын
*A demo made by ARFoundation(build on iOS), Vuforia is really much better in my case.
@DineshPunni
@DineshPunni 4 жыл бұрын
I tried Vuforia some years ago and it worked quite well. However, as far as i know at some point you have to pay to use Vuforia and AR Foundation is completely for free and also works quite stable (tested on iOS and Android)
@DineshPunni
@DineshPunni 4 жыл бұрын
Haven't worked too much with Vuforia for some years but I can do a video, where I compare Vuforia with AR Foundation
@aaworks7508
@aaworks7508 4 жыл бұрын
object is displaying at angle of 45 degrees , even the cube too any help please??
@DineshPunni
@DineshPunni 4 жыл бұрын
Hmm that's weird. What phone and Unity version do you use?
@sheetanshus5179
@sheetanshus5179 4 жыл бұрын
How to visualise placing objects exactly over the image ?
@DineshPunni
@DineshPunni 4 жыл бұрын
You can read out the parameters from the detected image. The image manager spawns the object right on top of the image by default (if your prefab is at 0,0,0)
@ryanschmidt8468
@ryanschmidt8468 4 жыл бұрын
The cube is not stationary. I had the same issue in the first android tutorial as well. What might be causing the cube to drift away out of frame and disappearing on my phone?
@DineshPunni
@DineshPunni 4 жыл бұрын
My first thought is that your phone isn't tracking properly. Let your phone scan your room for 10-20 secs first and then try again. It should be much better than tracking the image straight away.
@ryanschmidt8468
@ryanschmidt8468 4 жыл бұрын
@@DineshPunni Thank you. Now I keep getting an error that says, "the name OnImageChanged does not exist in the current context". The app worked fine and now this happens. I can't seem to figure it out. Nothing changed. I deleted everything and started all over again and am continuing to get this message.
@ryanschmidt8468
@ryanschmidt8468 4 жыл бұрын
Nevermind. This Unity thing sucks. Going with Unreal.
@dominiqueemond827
@dominiqueemond827 4 жыл бұрын
I don't seem to have ARTrackedImageManager script available when you click on 'Add Component'. How do I get that?
@DineshPunni
@DineshPunni 4 жыл бұрын
Did you import the ARFoundation package from the PackageManager? Then you should see the XR menu when right clicking on the inspector. If yes, then make sure you added the correct version of ARFoundation + the ARCore/ArKit package. And last, which Unity version are you using?
@yaraelquorashy9311
@yaraelquorashy9311 4 жыл бұрын
Thank you for this video! The build was done successfully but when the app opens on my Google Pixel 4, a blackscreen is shown and nothing else happens. The app doesn't ask for camera permissions when the app first opens, so I manually allow access, but still, nothing changes. I am using Unity version 2019.4.1f1, ARFoundation 4.0.2, AR Subsystems 4.0.1, and ARCore XR Plugin 4.0.3 your help would be much appreciated! Thanks!
@yaraelquorashy9311
@yaraelquorashy9311 4 жыл бұрын
I changed the versions to 2.0.1. Now it asks for permission first and the camera is working, but nothing is being detected. I waited for some time but nothing was detected.
@DineshPunni
@DineshPunni 4 жыл бұрын
Hey Yara El Quorashy, yeah it's always a hassle with all those versions and package dependencies 😅 I'd recommend to first try the *exact* same versions as mentioned in the video and then try out to update and see what still works.
@DineshPunni
@DineshPunni 4 жыл бұрын
Usually if you have a Google Pixel 4 the tracking should be quite good. Did you make sure to add the image database like in the video? It could also be due to the version missmatch. So try to use a different Unity version
@milomakesstuff2019
@milomakesstuff2019 3 жыл бұрын
Can you track multiple AR Markers at once?
@aleksandermasiejczyk8407
@aleksandermasiejczyk8407 3 жыл бұрын
sure, just add another to the image library (XR Reference)
@savelii-nechvola
@savelii-nechvola Жыл бұрын
Unfortunately my program doesnt work. I did everything as in tutorial but I see only a black screen. Created a project as an AR-template, stole a script, added a component, added a library, added a model, rendered on android and just only a black screen. I dont know any URP (as in one of the comments), its not installed in the project packages. Hope someone can help
@DineshPunni
@DineshPunni Жыл бұрын
Hey, The black screen issue arises when you have not check ARCore in the XRPlugin Management settings. Also, feel free to checkout our latest video here: kzbin.info/www/bejne/p5aneJykirmNZ80
Unity AR Foundation Tutorial - Plane Detection
10:44
Dinesh Punni
Рет қаралды 89 М.
Augmented Reality (AR) tutorial for beginners using Unity 2022
32:11
Playful Technology
Рет қаралды 296 М.
Running With Bigger And Bigger Feastables
00:17
MrBeast
Рет қаралды 195 МЛН
SCHOOLBOY. Последняя часть🤓
00:15
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 16 МЛН
Just Give me my Money!
00:18
GL Show Russian
Рет қаралды 974 М.
Coding INDOOR NAVIGATION with A* Pathfinding
10:24
MatthewHallberg
Рет қаралды 186 М.
AR Foundation & Unity 01: Setup for Android
7:52
Dinesh Punni
Рет қаралды 113 М.
Everything You Need To Know About Getting a Job In VR (in 2024)
13:28
AR Foundation Image Tracking - Unity Augmented Reality/AR
7:48
Dev Enabled
Рет қаралды 62 М.
Augmented Reality Tutorial | Gaze Interaction in Unity
17:18
Third Aurora
Рет қаралды 63 М.
Running With Bigger And Bigger Feastables
00:17
MrBeast
Рет қаралды 195 МЛН