Unity AR Foundation Image Tracking to play Video

Sdílet
Vložit
  • čas přidán 28. 08. 2024
  • In this video, we will look into how to use Unity AR Foundation packages to play a video using AR Image Tracking.
    In this video, I'm using:
    Unity 2020.1
    AR Foundation 3.1.6
    ARKit 3.1.8
    ARCore 3.1.8
    Discord server invite: / discord
    Buy me a coffee here: www.buymeacoff...
    Video used from pexels: www.pexels.com...
    The art is used from Flaticon.com
    Hit the like button if you like my work, comment if you have any feedback/suggestions. Subscribe for more content coming every week.

Komentáře • 74

  • @paulohenriquerodrigues3230

    Best tutorial out there! I've been trying to make this work for ages and FINALLY I could make it work! THANKS!

    • @MohdHamza
      @MohdHamza  Před rokem +1

      Thanks!

    • @Al-Xorazmiy1
      @Al-Xorazmiy1 Před 11 měsíci

      @@MohdHamza where can i host this bro, I am new in C# unity

    • @MohdHamza
      @MohdHamza  Před 11 měsíci

      @@Al-Xorazmiy1 host what bro? Come to discord(link in description) for further discussion.

  • @tefo875
    @tefo875 Před rokem +4

    hai I have an issue after build it tracks the image and show the image only the video is not playing at all , Any one know how to solve it

  • @GuilhermeSantos-gu3ef
    @GuilhermeSantos-gu3ef Před 2 lety +7

    Great tutorial!
    I played with a single video and it worked perfectly, but I still couldn't play multiple videos, like creating an animated album. I would love to see a tutorial that reproduces this!!
    Thanks!!

    • @pythonandjs6380
      @pythonandjs6380 Před 2 lety +2

      Multiple videos working? How is it going? Tell me, please, I also want

    • @XojanazarTursinbayev
      @XojanazarTursinbayev Před 2 lety +3

      I can do it

    • @pythonandjs6380
      @pythonandjs6380 Před 2 lety +1

      @@XojanazarTursinbayev как?

    • @XojanazarTursinbayev
      @XojanazarTursinbayev Před 2 lety +1

      @@pythonandjs6380 патом объясняю, напиши мне еще раз чтобы легко найти тя.

    • @nana_1888
      @nana_1888 Před 2 lety +1

      @@XojanazarTursinbayev would you mind to make a tutorial please

  • @wwfanjeffhardy619
    @wwfanjeffhardy619 Před rokem

    What a legend! Thank you very much for this tutorial!

  • @nana_1888
    @nana_1888 Před 2 lety +4

    Why after i build and run the application it's blank, no camera scan appears

  • @soulsauveur
    @soulsauveur Před rokem +1

    Hello, it works like a charm, but the problem is that there is no audio.
    On my iPhone the sound of the video is not playing, I tried different settings on the video player but it doesn't work. Would you happen to know how to play the sound of the video?

  • @sheenmanalo3752
    @sheenmanalo3752 Před 2 lety +2

    Is there any configuration that would play in both android & IOS?

  • @nana_1888
    @nana_1888 Před 2 lety +3

    How about multiple images tracking, make a tutorial please...

  • @SurvivorsCharm
    @SurvivorsCharm Před 6 měsíci +1

    I will actually kiss you on the lips! BEST TUTORIAL EVER!!!

  • @notedownz
    @notedownz Před 2 lety +2

    how do you run this on your phone? like i have no idea

  • @itsk4000
    @itsk4000 Před 2 lety +1

    I followed you and when I put the phone parallel to the photo, the video will appear below the photo, is there any way to make the video always in the place of the photo, please help me, I would greatly appreciate it. thank you

    • @HHE1009
      @HHE1009 Před rokem

      I have the same problem now. Hope can solve it soon.

  • @thuphung5871
    @thuphung5871 Před 2 lety +1

    is this AR video has sound?

  • @muhammadizzatbinahmadzaini5770
    @muhammadizzatbinahmadzaini5770 Před 11 měsíci +1

    hi, ive try doing exactly like yours by using my pixel 6 phone, but when installed, the apps went blank, can you help me

  • @cambia4326
    @cambia4326 Před 3 lety +1

    Looks like it works, thanks for posting. But without narration, and with no source file posted, this is really hard to follow, especially with the video being so fuzzy when viewing full screen. The captions help, but there aren't enough of them.
    Wish I could follow it all, because I really need the information, and it looks like this works.
    For example, you did a lot of stuff very quickly between 08:35 and 10:30, and there were no captions. Could you explain what you were doing there, please? Thank you!

    • @MohdHamza
      @MohdHamza  Před 3 lety

      Hi,
      Thank you for your feedback. Will definitely try to narrate in future videos. I thought this one didn't require.
      I'm not sure if your problem is resolved.
      If it isn't you can share more details on my discord server (link in description)

    • @cambia4326
      @cambia4326 Před 3 lety

      @@MohdHamza thanks for the quick reply, really appreciate that. just want to know what you did between 08:35 and 10:35 . . . you were selecting a lot of stuff, but i couldn't read the screen (too fuzzy), and there were no captions. thanks again.
      also, as an aside, what i've really been looking for is some guidance on how to trigger audio files via image tracking. i thought your video might offer a clue, but can't be sure until i'm able to replicate!
      cheers.

    • @MohdHamza
      @MohdHamza  Před 3 lety

      @ 8:35 I checked the Video player to be working in the editor by disabling the AR components. Then after checking that its working I enabled the components and created a prefab of the video playback quad so that we can spawn it when the tracked image is visible to the camera. I also created an empty as a parent to the prefab so that the transform remains at scale 1,1,1 instead of 0.16 and 0.1.
      I feel I need to write chapters to videos from now on. Hope that helps.

  • @alpharhomedia9006
    @alpharhomedia9006 Před rokem +1

    I get black screen only, what is wrong?

  • @gorgitaher8266
    @gorgitaher8266 Před rokem

    THANK YOU SO MUCH, how can i make targets for multiple videos ?

  • @megabigman19
    @megabigman19 Před rokem +1

    Hi, I've done everything step by step, and when I run app after installation APK file, mobile screen is black and nothing appears . can you give advice or solution?
    thanks

    • @MohdHamza
      @MohdHamza  Před rokem

      Hi, Try selecting ARCore under XR Plugins.

    • @wyindepi8870
      @wyindepi8870 Před rokem

      hello i have same problem. +and no arcore under xr plugins, i have only XR Origin @@MohdHamza

  • @meow9874
    @meow9874 Před 2 lety

    Hi i tried building it to ios but the video wont play? but android works, need help thanks!

  • @HHE1009
    @HHE1009 Před rokem +1

    Thank you for your tutorial. I use Unity 2022.1.20f1, can you please tell me how can I get "Googel Pixel 2" at Video timeline 11:00? How can I set up the android environment?

    • @MohdHamza
      @MohdHamza  Před rokem +1

      Hi,
      Really appreciate your comment.
      In regards to your question, you need to be in developer mode on your Android device. Search for how to get into developer mode for your particular device on google. Once it’s done you will see that option.

    • @HHE1009
      @HHE1009 Před rokem

      @@MohdHamza Thanks. I fixed it. but it still doesn't work at last step. I use Unity 2022.1.20f1, should I use the same one like your tutorial? 2020.1.6f1 ?

  • @vishalpal6577
    @vishalpal6577 Před 3 lety +1

    I have a laptop with 256 gb space (40 gb ram) and 4 gb ram. And I am learning unity(as beginner) is my laptop space enough for that

    • @MohdHamza
      @MohdHamza  Před 3 lety

      Hi Vishal,
      Congratulations on getting started. I hope you find this space useful.
      In regards to your question I believe storage wouldn't be a issue in the beginning days. You could expand using an external hard drive if required however I think 4gb of RAM is a little less specially if you are building games which will be heavily dependent on processing.

  • @anwpecirotan
    @anwpecirotan Před 3 lety +1

    why using AR Foundation 3.1.6 and not the latest one?

    • @MohdHamza
      @MohdHamza  Před 3 lety +1

      Hi Anwar,
      This is what worked for me, you can try other versions if you wish to, in my future videos I'll demonstrate using ARFoundation 4+

  • @anandsingh741
    @anandsingh741 Před 2 lety

    Display 1 no error rendering after i click the video

  • @fatrishamohamedyussof5139

    Hi ive followed this video tutorial and successfully cuild and run . however on the phone apps I cant scan image, the screen is blank. may I know why is it because of my android version? should I change to android 5.0 at playersettng? please help

    • @MohdHamza
      @MohdHamza  Před 2 lety

      Hi,
      I think a minimum of Android 7.0 works with ARCore.

    • @fatrishamohamedyussof5139
      @fatrishamohamedyussof5139 Před 2 lety

      @@MohdHamza hi is it because of the unity version I use? i use 2021.3.1f1......at console appear this warning "No active UnityEngine.XR.ARSubsystems.XRSessionSubsystem is available. Please ensure that a valid loader configuration exists in the XR project settings.
      UnityEngine.XR.ARFoundation.ARSession:OnEnable () (at Library/PackageCache/com.unity.xr.arfoundation@4.2.3/Runtime/AR/ARSession.cs:341)
      "

    • @MohdHamza
      @MohdHamza  Před 2 lety

      @@fatrishamohamedyussof5139 ​ Maybe, I have tested on a lower version as in the video. Try that.

    • @fatrishamohamedyussof5139
      @fatrishamohamedyussof5139 Před 2 lety

      @@MohdHamza ok thanx much

    • @fatrishamohamedyussof5139
      @fatrishamohamedyussof5139 Před 2 lety

      hi, I've tested another version and succeeded but the other prob is now when I scan the marker image, I can only hear sound but the video does not appear. may I know why this is happening?hope to hear from you soon

  • @sarthaksinghbrar
    @sarthaksinghbrar Před 2 lety +1

    After opening app Not showing anything on smartphone

  • @DungPham-xe3wz
    @DungPham-xe3wz Před 2 lety

    tks for your turtorial. i have a trouble. i want add button: play, pause, stop, mute , slider tracking time; to control video.
    Can you help me. Thanks

    • @MohdHamza
      @MohdHamza  Před 2 lety

      Hi, Thank you for dropping by.
      If you understand how the video player is implemented, you can check out this and merge the two.
      czcams.com/video/9LwOmMzOrp4/video.html
      Simple things like start and stop button should be straight forward.

    • @DungPham-xe3wz
      @DungPham-xe3wz Před 2 lety

      @@MohdHamza thank you for your help

  • @mim1921
    @mim1921 Před 3 lety

    Thanks !!!!!

  • @noumqn
    @noumqn Před 3 lety

    Nicee.

  • @T__SyamAgungWidiarna
    @T__SyamAgungWidiarna Před 2 lety

    is it fine if i run this step with a different version of editor and ar package?

  • @anandsingh741
    @anandsingh741 Před 2 lety

    Display 1 no error rendering after i click the video 08:55
    Please help me out

    • @Red1ska
      @Red1ska Před rokem

      Its lil late 😂😂 but u should add camera

  • @XojanazarTursinbayev
    @XojanazarTursinbayev Před 2 lety

    Thanks for tutorial. How to add video from server? For example, i want to add video to AR from youtube or google disk. Could you tell me or make a video? Please🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏

    • @MohdHamza
      @MohdHamza  Před 2 lety

      Hi,
      @8:12 If you check out the video player component on the right side, you can switch the source from Video Clip to URL. That should work.

    • @XojanazarTursinbayev
      @XojanazarTursinbayev Před 2 lety

      @@MohdHamza Hi, i have tried this url but video didn't wotk. Do you know any other way to add video from server or youtube? Thank you a lot.

  • @MYSTERIOMAXXX
    @MYSTERIOMAXXX Před 2 lety

    Hi can u please tell me how to position xyz camera angel??
    in my case only 2 dimensions are visible and when i hit play screen turns black due to improper camera and videoplayer setup.

    • @TheTguevarra
      @TheTguevarra Před 2 lety

      Got also black screen, after I open this app, did u solve this?

  • @gofudgeyourselves9024
    @gofudgeyourselves9024 Před 3 lety +1

    Take image and video from server in next video

  • @TheDarkin74
    @TheDarkin74 Před rokem

    Привет. Видео супер - но почему то не работает....
    Failed to generated ARCore reference image library 'ReferenceImageLibrary'
    UnityEngine.GUIUtility:ProcessEvent (int,intptr)
    BuildFailedException: Failed to generate image database. Output from arcoreimg:
    Error building Player: 2 errors
    Build completed with a result of 'Failed' in 1 seconds (1157 ms)
    UnityEngine.GUIUtility:ProcessEvent (int,intptr)
    UnityEditor.BuildPlayerWindow+BuildMethodException: 3 errors
    at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002bf] in :0
    at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in :0
    UnityEngine.GUIUtility:ProcessEvent (int,intptr)

  • @user-yy7ju6uz7y
    @user-yy7ju6uz7y Před 3 lety

    Give the link bro

    • @MohdHamza
      @MohdHamza  Před 3 lety

      Hi, The link is in the description for the assets used.