Giter VIP home page Giter VIP logo

unityarfoundationessentials's Introduction

Note: This repo is heavily based on https://github.com/Unity-Technologies/arfoundation-samples so I recommend using that repo as the main source and use my examples as well which were built while making YouTube videos about AR Foundation.

UnityARFoundationEssentials

This repository contains a variety of examples created while making a new video series in YouTube about AR Foundation Essentials with Unity3d. The Break down of videos and results are shown below:

Watch the AR Video Series in YouTube

Results from various examples taught in YouTube:

  • Face Tracking Generating Masks

  • People Occlusion

  • Body Tracking w/ Fire Particles

  • Body Tracking w/ Offset Options

  • Body Tracking w/ Skeleton made of Cubes - No Hands

  • Body Tracking w/ Skeleton made of Cubes - Full Body

  • Image Tracking w/ Reference Image Name

  • Image Tracking w/ A Prefab Per Image Tracked

  • AR Measuring Tape

  • AR Object Selection

  • TV Placement on Walls

  • AR Basic Inventory

  • AR Realistic Statue

  • AR Realistic Statue with Bounding Area Selection

  • AR Realistic Statue with Rotation Selection

  • AR Realistic Statue with Scaling

  • Eye Tracking

  • Automatic Placement With Horizontal Planes

unityarfoundationessentials's People

Contributors

dilmerv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

unityarfoundationessentials's Issues

The type or namespace name 'ARReferencePointManager' could not be found

I'm using Unity 2019.2.17f1 ,and xrfoundation 3.1.0...installed,
but this asset I opened, then console show -->
The type or namespace name 'ARReferencePointManager' could not be found (are you missing a using directive or an assembly reference?) [Assembly-CSharp]csharp(CS0246)
why does it?

How can we track ear theough ARFoundation

hello dilmerv

I am creating a application for jewelery my requirement is track jewelery on ear , nose ,head and neck for all jewelery.
Can you please it is possible to make application through ARFoundation

Please reply me i am in need.

thank you dilmerv !
you are doing a great job !

Getting Error while running the project in the FaceTrakingMeshToggle

Hi Dilmer Valecillos,
I'm a beginner in the Unity AR form the background of UI/UX. I saw your youtube video and learning the Unity AR.
I have downloaded the code from https://github.com/dilmerv/UnityARFoundationEssentials and trying to run the project in Unity but not a success.
Error (Assets\Scripts\ReferencePointManager.cs(8,26): error CS0246: The type or namespace name 'ARReferencePointManager' could not be found (are you missing a using directive or an assembly reference?))
I have added the screenshot for the error's Please help or advice.
Thanks
Unityerror

How to place an existing gameObject in AR Scene?

Hi, my question is: Instead of dragging prefab into the inspector and instantiating it, how can I place a gameObject in AR scene?

So I would like to load a gameObject from a scene into my AR scene. The AR scene will automatically detect for the plane. Once a plane is detected, the gameObject loaded should be automatically placed on the plane. The code I found uses prefab and instantiate like this

placedObject = Instantiate(placedPrefab, arPlane.transform.position, Quaternion.identity);
However, if the placed prefab is of type gameObject (basically I dragged the gameobject loaded), it didnt work. the gameobject was floating in air instead of following the detected plane. Do you know whether it is possible to achieve my desired scenario? Why is the position of gameobject wrong when I drag an existing gameobject in the scene instead of prefab?

Thank you in advance!

Below is my code but it didnt work:

[SerializeField]
 private GameObject placedPrefab;

 [SerializeField]
 private GameObject placedObject;

 [SerializeField]
 private ARPlaneManager arPlaneManager;

 void Awake() 
 {
     dismissButton.onClick.AddListener(Dismiss);
     arPlaneManager = GetComponent<ARPlaneManager>();
     arPlaneManager.planesChanged += PlaneChanged;
 }

 private void PlaneChanged(ARPlanesChangedEventArgs args)
 {   
     if(args.added != null && placedObject == null)
     {
         ARPlane arPlane = args.added[0];
         //placedObject = Instantiate(placedPrefab, arPlane.transform.position, Quaternion.identity);
         placedPrefab.transform.position = arPlane.transform.position;
     }
 }

Question: Image tracking prefab position in scene

I am working on a image tracking project where I want to scan an image and show the prefab on a set position in the world. Eg Vector3(0, 3, 15) in the direction the image target points to. Ive been looking into this project and it works really well for me except that it looks like the prefab show up in the direction of the device and not the rotation of the image target. When I stand on the left side of the image and scan, id like the prefab to show up on the set position to the left of me, and if I stand with the image in front of me the prefab should show up in front of me. I am testing on Android and ARCore works the way I described out of the box. Is this a feature you would want to implement or help me solve? Thanks

Multiple Issues

I am facing multiple issues with things as 'Input System', 'AR Human Body Manager','AR Reference Point Manager', 'AR Occlusion Manager', 'XR CPU Image', 'AR Human Bodies Changed Event Args', 'Configuration Chooser', 'Configuration Descriptor', 'Feature', 'Configuration', 'XR Human Body Pose 2D Joint', 'AR Human Body', 'Camera Facing Direction'. I googled it and read the documentation and found that these error occurs due to use of different version of AR-Foundation, AR-Core XR Plugin, AR-Kit XR Plugin, AR-Kit Face Tracking , also you are using preview packages for the above 4, so it's my humble request that please let me know the exact version that you are using, and lastly I am using Unity 2020.1.

web ar

Im trying to make a augmented reality project with unity engine when i host it in GitHub its not accessing the camera permission can anyone please help me out i don't need any plugins or sdks

ARHumanBodyManager could not be found error

Running Unity3d : 2019.3.1.1

For some reason, I keep receiving the error below

error CS0246: The type or namespace name 'ARHumanBodyManager' could not be found (are you missing a using directive or an assembly reference?)

Hope you can help

hi i had some errors

i have unity 2020 , i have started the project i had several error in code :
1- Assets\Scripts\PeopleOcclusion.cs(123,62): error CS0246: The type or namespace name 'XRCameraImageConversionParams' could not be found (are you missing a using directive or an assembly reference?)
2- Assets\Scripts\PeopleOcclusion.cs(122,155): error CS0103: The name 'CameraImageTransformation' does not exist in the current context
3- Assets\Scripts\PeopleOcclusion.cs(122,9): error CS0246: The type or namespace name 'CameraImageTransformation' could not be found (are you missing a using directive or an assembly reference?)
4- Assets\Scripts\PeopleOcclusion.cs(119,110): error CS1503: Argument 4: cannot convert from 'bool' to 'UnityEngine.Experimental.Rendering.TextureCreationFlags'

i have updated all from package manager put i have the same errors can you help please thank you

How to Convert Measurement in Meter?

how to change measurement to Meter? I try delete measurement factor and assume default Cube Scale in unity is 1:1 meter in real world, but I think Im wrong. Can Anyone help?

Error when adding images from local or persistence path to XRRefernceImageLibrary at runtime in unity

Hi,
I have taken one of the example scene (ImageTrackingRuntimeSave) from the UnityARFoundationEssentials project for adding images to XRImageLibrary at runtime.

I have made some changes on that code, like instead of adding the images from unity i loaded it from persistence path, it was working fine initially. After some point of time it was giveing some issue on while adding the images to the library.
Even if i load images from my asset folder to XRImageLibrary it is give me an error.

This is the error which i am getting from the script.
System.NullReferenceException: Object reference not set to an instance of an object at DynamicLoading+<AddImage>d__6.MoveNext () [0x0009a] in

When i further debug the code its showing error in texture format line, but in my project i have made those images to Read/Write enable and format to RGBA32.

image

But still i am getting the error.
Could someone explain me how to solve this?

Receive reply failed with error "Operation canceled" error in XCode

I am using the following: Catalina OSX, XCode 11 Beta, iPad_9.7 iOS 13 Beta, Unity 2019.1.6, Visual Studio for Mac latest

On XCode (set to Automatic license and team)..Builds..and runs on iPad but the camera doesn't face me and texture does not appear.

I get the following error in XCode:

2019-06-12 01:42:04.437963-0700 eg[717:87079] Built from '2019.1/staging' branch, Version '2019.1.6f1 (f2970305fe1c)', Build type 'Release', Scripting Backend 'il2cpp'
2019-06-12 01:42:04.445133-0700 eg[717:87079] -> registered mono modules 0x105194dc0
-> applicationDidFinishLaunching()
2019-06-12 01:42:04.538336-0700 eg[717:87079] Metal GPU Frame Capture Enabled
-> applicationDidBecomeActive()
GfxDevice: creating device client; threaded=1
Initializing Metal device caps: Apple A9X GPU
Initialize engine version: 2019.1.6f1 (f2970305fe1c)
2019-06-12 01:42:04.919325-0700 eg[717:87079] Unbalanced calls to begin/end appearance transitions for <SplashScreenController: 0x10823bf40>.
UnloadTime: 1.823208 ms
Setting up 1 worker threads for Enlighten.
Thread -> id: 16d21f000 -> priority: 1
2019-06-12 01:42:08.956790-0700 eg[717:87184] NSURLSessionEffectiveConfiguration - _socketStreamProperties is a connection property
2019-06-12 01:42:09.457225-0700 eg[717:87235] [] nw_protocol_get_quic_image_block_invoke dlopen libquic failed
2019-06-12 01:42:09.552133-0700 eg[717:87212] [] nw_connection_receive_internal_block_invoke [C1] Receive reply failed with error "Operation canceled"
2019-06-12 01:42:09.552203-0700 eg[717:87212] [] nw_connection_receive_internal_block_invoke [C1] Receive reply failed with error "Operation canceled"
2019-06-12 01:42:09.552243-0700 eg[717:87212] [] nw_connection_receive_internal_block_invoke [C1] Receive reply failed with error "Operation canceled"
2019-06-12 01:42:09.552309-0700 eg[717:87212] [] nw_connection_receive_internal_block_invoke [C1] Receive reply failed with error "Operation canceled"
2019-06-12 01:42:10.292605-0700 eg[717:87212] [] nw_connection_receive_internal_block_invoke [C2] Receive reply failed with error "Operation canceled"
2019-06-12 01:42:10.293564-0700 eg[717:87212] [] nw_connection_receive_internal_block_invoke [C2] Receive reply failed with error "Operation canceled"
2019-06-12 01:42:10.293624-0700 eg[717:87212] [] nw_connection_receive_internal_block_invoke [C2] Receive reply failed with error "Operation canceled"
2019-06-12 01:42:10.293663-0700 eg[717:87212] [] nw_connection_receive_internal_block_invoke [C2] Receive reply failed with error "Operation canceled"
2019-06-12 01:42:10.698837-0700 eg[717:87235] [] nw_connection_receive_internal_block_invoke [C3] Receive reply failed with error "Operation canceled"
2019-06-12 01:42:10.698901-0700 eg[717:87235] [] nw_connection_receive_internal_block_invoke [C3] Receive reply failed with error "Operation canceled"
2019-06-12 01:42:10.698941-0700 eg[717:87235] [] nw_connection_receive_internal_block_invoke [C3] Receive reply failed with error "Operation canceled"
2019-06-12 01:42:10.698977-0700 eg[717:87235] [] nw_connection_receive_internal_block_invoke [C3] Receive reply failed with error "Operation canceled"
-> applicationWillResignActive()
-> applicationDidEnterBackground()


Not sure if a script or component is missing in Unity or there is a setting that needs to be set. Everything in the UI seems to look good.

Thanks,
Enrique

Multiple image traker

I got a problem, when camera starts, the two objects appears in 0,0,0 position,,, why if i didnt found the marker yet? but when i found a marker its relocated position and scale and everything works ok... just in the begining every prefabs invoke in scene auto.

From Occlusion to detect touch virtual objects

Hi Dilmer,

first thanks for your work, you are really helpful in helping us. I have a question, do you think that using people occlusion (and hands detections?) is possible to detect the touch of an virtual object?

I need to implement something like vuforia virtual buttons but i cannot use vuforia (it isn't compatible with cardboard anymore)

Thanks
Andrea

Position AR content on ImageTracked

Hi Dilmer,

Normally I use Vuforia but through the help of your videos i am learning AR Foundation. But i have a question: with Vuforia you can drag/drop by example a sprite on the image marker and position it exactly on the X,Y position you want. When you scan the imagetarget the sprite will be positioned exactly on the X,Y position on the recognised imagetarget.

Is this also possible with AR Foundation Image Tracking? And how can this be accomplished in the Unity Editor?

For customers in the past we used Vuforia to by example show video's and AR buttons on certain position on a poster and when the user scans the poster all AR elements are shown on the correct position on the poster. I like to reuse this functionality but in this case with AR foundation.

Cannot build the app due to errors

Hello @dilmerv,

Thanks a lot for your great demo! However, as a newbie to this fascinating technology, I encounter problem in building the app due to the following errors, no matter what versions of unity I have tried (2023.2.3f1, 2022.3.13f1, 2021.3.32f1, 2020.3.34f1, 2019.2.2f1) in mac intel.
I want to try Measurement scene, but I cannot even enter the play mode since the console required me to fix the errors first. Here are the errors I have got from 2023.2.3f1.

Assets/AssetStore/48 Particle Effect Pack/Script/csShowAllEffect.cs(9,12): error CS0246: The type or namespace name 'UI' could not be found (are you missing a using directive or an assembly reference?)

Assets/Scripts/ReferencePointManager.cs(8,26): error CS0246: The type or namespace name 'ARReferencePointManager' could not be found (are you missing a using directive or an assembly reference?)

Assets/Scripts/ReferencePointManager.cs(26,13): error CS0246: The type or namespace name 'ARReferencePointManager' could not be found (are you missing a using directive or an assembly reference?)

Assets/Scripts/ReferencePointManager.cs(30,18): error CS0246: The type or namespace name 'ARReferencePoint' could not be found (are you missing a using directive or an assembly reference?)

Assets/Scripts/ReferencePointManagerWithCameraDistance.cs(6,26): error CS0246: The type or namespace name 'ARReferencePointManager' could not be found (are you missing a using directive or an assembly reference?)

Assets/Scripts/ReferencePointManagerWithFeaturePoints.cs(8,26): error CS0246: The type or namespace name 'ARReferencePointManager' could not be found (are you missing a using directive or an assembly reference?)

Assets/Scripts/ReferencePointManagerWithCameraDistance.cs(21,13): error CS0246: The type or namespace name 'ARReferencePointManager' could not be found (are you missing a using directive or an assembly reference?)

Assets/Scripts/ReferencePointManagerWithCameraDistance.cs(23,18): error CS0246: The type or namespace name 'ARReferencePoint' could not be found (are you missing a using directive or an assembly reference?)

Assets/Scripts/ReferencePointManagerWithFeaturePoints.cs(26,13): error CS0246: The type or namespace name 'ARReferencePointManager' could not be found (are you missing a using directive or an assembly reference?)

Assets/Scripts/ReferencePointManagerWithFeaturePoints.cs(30,18): error CS0246: The type or namespace name 'ARReferencePoint' could not be found (are you missing a using directive or an assembly reference?)

All compiler errors have to be fixed before you can enter playmode!
UnityEditor.SceneView:ShowCompileErrorNotification () (at /Users/bokken/build/output/unity/unity/Editor/Mono/SceneView/SceneView.cs:3919)

Pleas kindly suggest if there is anything I need to import to the project, thanks a lot for your effort!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.