Hi Joshua, I'm stuck with something. I used the vuforia content creator app and placed a cube within the area target a child and ran the build within unity in simulator mode. It worked fine but when I took a build and ran it on android only the camera opens but no cube augmentation. Can u help me with this?
Hii Joshua, could you please create a Video all about, How to scan an Environment using Vuforia Creator app, then How to create target points in Area Target Generator, this would be very helpful for us!
I just want to ask how did does the localisation work? Like what is the technology behind that, I just want to know because we are working on a school campus indoor ar navigation at the moment and we need to integrate the localisation of the user with the 2d map in order to know the user current position. Hope you find this comment, thankyou
Hi there i like your work very much i m doing something same but using AR foundation in unity . I want to ask you that how can i create a point cloud. Is there any soft. for it. Plz help me
Hi there, thanks for reaching out! We were also very curious about AR foundation in the beginning. We found that it is not really clear how to create and handle point clouds by justing using the AR point cloud manager as documented here: docs.unity3d.com/Packages/com.unity.xr.arfoundation@4.1/manual/point-cloud-manager.html Although what you can do, use the Vuforia Engine inside your AR foundation project (this didn't exist yet back then when we started the project): library.vuforia.com/unity-extension/vuforia-engine-and-ar-foundation . But I don't see an advantage using AR foundation, because with by "just" using Unity and Vuforia you can also support iOS and Android by using one code base, by simply building for another platform. Vuforia Engine will run on both platforms using the respective AR framework (ARKit or AR Core). Does that make sense?
hey man doing the same project for my college first floor was no issue but as soon as we are moving area target above certain height for second floor it is getting invisible. would love to get insights how did you make multi floor navigation. we have kept all the first floor area targets in multi target fyi
Sorry for seeing your comment so late! Sometimes I don’t get notified properly by YT. Did you find a solution? Best approach for me is to activate/deactivate ATs once the user us walking up stairs. How did you try to solve it?
@@joshuadrewlow hi there yes we solved the issues , but we would really need more guidance on this can we arrange a meeting with you please as we have less time
Hello, could you please help us resolving the below issues that we're facing while we're building this project at our end: 1. LINE RENDERER is not visible 2. Cannot see the dynamic INT option (Part 2) 3. Facing scaling issues i.e the pointer is moving in some other direction and with random speed.
Thanks for stopping by. To narrow down your problems I need to ask some questions: 1: Where is the LineRenderer not showing? When running on the device or is it also not showing in the Editor? If it's showing in the Editor and not on the device then maybe the Area Target (AT) cannot be found. Have you tried to simply place a cube as child of the AT, and can you see it when running on the device? 2: What do you mean with the dynamic INT? 3: With "pointer" do you mean the off screen target indicator? What do you mean with scaling? What are you scaling, adding more ATs? Make sure that you set the indicator to one object only. For debugging try to show indicator to a static cube in the scene which is child of the AT. Hope this helps to get a bit more light into your problems. Best regards, Joshua
@Joshua Drewlow Thank you. What if I don't have iPhone or iPad which supports LiDAR. Is there any alternate tool in Android which scans the room and import it in unity. This is out of vuforia
I replied on the other thread but for any case: Sorry I forgot about replaying. I’m sure there is a way with Android devices. Try to check out what you can do with AR Foundation. It has a plugin for Unity. I haven’t tried to achieve the same thing because from first looking at it it looked more complicated, but at least everything is for free, Vuforia is a very expensive product: unity.com/unity/features/arfoundation
Hi Joshua. it seems the Vuforia Capture app is only native to ios.....are there alternative ways to generate a 3d reconstruction....I tried stardust neogama..but it seems like their system is down... I would really like to know if there's anyway I can achieve the 3d capture , point clouds and all with my mobile device...Are there any recommendations?
@@user-hg6lp5nl6fUnfortunately I don’t know of much alternatives, iOS or a professional camera (can also be rented e.g. for 100$ per day). I recently heard that you can capture Matterport spaces with Android now, but I’m not sure if you can buy the MatterPak from that.
@@joshuadrewlow ohh .... are you implying that you can take regular pictures of an environment and then upload them to a software to generate the 3d reconstruction for you ....I thought all that would have to be done within that software
Hi Joshua thanks for the video it was be very usefull and wonderfull. Excuse can i ask You, how did You do they scan of the oficce ir what software did You use?
HI Joshua!!! When and how did u managed to call "SetPositionFrom" and "SetPositionTo" ? Is there any specific controller or event tracker for that? which triggers the these two functions?
Hi there again 😊 Yes there is another controller. SetPositionFrom is called multiple times per second with the current position of the NavMesh agent and SetPositionTo is set when the user selects a destination for navigation in the ui. It's the position of a GameObject which is child of the corresponding Area Target. Cheers
@@joshuadrewlow Hi, world center mode is selected as "device" but, but the navmesh path is giving invalid path on runtime, inside unity it is working fine
Is the NavMesh at the desired location? Try visualise the NavMesh on runtime, this is very helpful. NavMesh must be child of AreaTarget to move relative to Area Target location. The destination also must be child of AreaTarget.
@@joshuadrewlow navmesh is coming perfectly, on runtime... I have checked... At the time of baking the navmesh, I have selected the area target and then bake the navmesh... That means, navmesh and area target is same object
Hey Joshua . Great video. I am planning to implement an AR Navigation system. I am a beginner in Vuforia, and I was wondering how you managed to track multiple area targets. Did you bake the Navmesh on runtime, since the untracked area targets constantly drift? And how did you manage to track multiple area targets.
No I don’t bake NavMesh on runtime. I use the NavMesh surface component, which is not static, so it can move around with the AT, like an AR object. This means that the NavMesh must be child of an AT. You can check out the documentation of Vuforia: library.vuforia.com/develop-area-targets/multiple-area-targets Nevertheless, at the time of the project we solved it differently, because this documentation didn’t exist yet. But their approach is better than my.
@@joshuadrewlow Hey, thanks for your reply. Just wanted to ask another question: I followed Vuforia's documentation and according to it when I create area targets, I have to apply the "PreviewModel" which is a 3D model of the area target as a prefab. It is used for baking the NavMesh on it. Now, when I run the AR application, two things happen: 1. the 3D prefab of the Area Target is visible and although overlayed correctly, I don't want the 3D prefab to visible. I have tried setting the mesh material as an invisible material. But it still shows some weird artefacts around the outlines/boundaries of the prefab, which looks odd. So, in that case, how do I deal with these artefacts. Is there a setting in Vuforia that will solve this ? 2. The prefab of the other Area Targets kind drifts, so apart from the solution, which was given by Vuforia, which for some reason doesn't seem to work, how did you manage to track multiple area targets. What was the approach?
Regarding your issues, 1: are you experiencing this issue in the editor or on the phone? In the editor it is normal to still see the mesh of the Prefab to better know where things are. If you still see the Prefab on the phone something is very odd. By default when running on the phone you should not see anything of the Prefab. With the artefacts, do you mean it’s rendering the outlines of the Prefab kind of like a drawing sketch (this is e.g. done in the AT creator app to test an AT)? Or are you using the demo app of Vuforia from the asset store? So by default you should not have to add any shader to make the Prefab disappear on the phone. What you can do is enabling occlusion mesh on the AT behaviour. You can also use a custom shader to enhance this occlusion or model the whole occlusion yourself.
For your issue 2: Did you use the MultipleAreaTargets script of the documentation? Did you place it on a GameObject as Parent of all other AreaTargets? How many ATs do you have? By default the engine can only handle 2-3 activated at the same time. My approach was to activate/deactivate the point clouds by script with colliders in the scene. The augmentation objects I always set as children of the currently activated AT. In a newer version of the app I‘ve successfully used the MultipleAreaTargets script, so there must be something wrong in your setup. If you have more than three ATs you can use LocationPrior or activate ATs manually by script. As far as I remember they have used this in one of their example projects, but it’s a long time ago I‘ve implemented this.
@@joshuadrewlow No, I see the prefab when running the app on the phone. It is also visible on the editor. The outlines are artefacts left after applying an invisible material. But it's odd. I attached the 3D prefab as a child of the Area Target. I don't know how to hide it at runtime . I have enabled occlusion mesh , but it does not help
Sorry for my late reply: I subscribe to the DevicePoseStatusCallback to show different information to the user and know which Area Target is currently localized. For Vuforia 9.x it was solved differently (library.vuforia.com/content/vuforia-library/en/articles/Solution/tracking-state.html) as it is now with Vuforia 10.5, but the principle is the same.
@@joshuadrewlow Thanks alot! I just have these problems. So how would I go about setting the position of the user everytime they are at a certain position in the real world. Also, another problem being that the line renderer doesn't render it the line correctly when testing the navigation in the real world. In example it goes through walls when the phone starts to move, however on Unity when using Vuforias Simulator it works fine. Would be a great help if you have any ideas of fixing these issues, since you may have come across these problems too. Thank you!
Did you use the occlusion mesh from the AT behaviour? To set the position of the user you can fix the position of the NavMeshAgent to the position of the AR camera. Because the AR camera represents the smartphone camera. And with the NavMeshAgent you can calculate the path. The destination should be set to a place inside an AT.
Thanks Joshua for this tutorial ♥️ Now after preparing NavMeshAgent, how can I set the destinations in my area target, and what should I do after that? Can you explain it to me because I get confused?!
The destination should be a GameObject inside your Area Target. The position of it you should assign as destination to NavMesh agent. Then the agent calculates fastest way which you can render with LineRender.
Hey Joshnua loved your video, i have some sort of a similar use case where i need to use indoor navigation for example lets think of it as an airport ,like if a user wanted navigation to a certain gate, so far what i have done is set up a camera and current gps coordinates etc, but i am new to this is there any way you could guide me to move forward with this, by the way i am doing this POC only so it doesnt have to be perfect i dont know how to move forward with this.
@@joshuadrewlow for testing purposes i want to do this in my office and i have 2D map but i do want to use the phone back camera so i guess in 3D i am still new to all of this.
I see. This might be a good page to start: developer.vuforia.com/library/environments/area-targets Maybe a word of caution: Navigation is a very complex use case. AR makes it even more complex. If you are completely new to AR I suggest you try to start with a simple AR use case like showing a 3D model with a reference image: developer.vuforia.com/library/objects/image-targets
hello @Joshua Drewlow!! thanks for sharing this on YT. I have a doubt that how did you showed the map? captured by 3d camera and then you uploaded the vedio or what? I'm making naviagtion system and I'm a student, never explored this field of AR/VR. can you make the pathway in details with tools used! Thanks in advance
Do you mean the visible NavMesh? That is actually not a map, since a map is normally in 2D. This is the walkable area made visible with a NavMesh renderer. A link should be in the description... Let me check it 😉
Here you got the link: blog.terresquall.com/2020/07/showing-unitys-navmesh-in-game/ You need to add a script and some kind of mechanism to activate it, for example a button. Does that help?
If you want a 2D map with current position on it that is another thing. I haven't implemented it but there are plenty of tutorials. I tried to keep this tutorial only concerning the Vuforia related stuff.
Hi there, sorry for the late answer. You can use iPhone to create a Matterport scan yes. According to this page you can even now buy the MatterPak addon and therefor should be able to create an AreaTarget with it: matterport.com/cameras
Hello! I’m writing to you because I’m working with area target too and I’ve had some problems, and looking for solutions I got to your video which is fabulous! I’m a designer studying a master in new media art and it’s my first time using vuforia with unity. I managed to use a Matterport scanner of my space converting it into a area target with the vuforia software, and I added it to my unity project adding the vuforia engine, vuforia key and ARKit, so far so good. I managed to mount the app via Xcode but although the app loads and opens the camera with the vuforia watermark, the augmentations do not appear. I’m doing everything in ios, and I’m wondering if the phone on which I load the app must also have LiDAR? I have not been able to find any documentation about it. If you have any comments or ideas I will be happy to receive them. Again thank you very much and congratulations for your work.
No, the phone does not need to have LiDAR. Have you checked your phone against this list of recommended devices? library.vuforia.com/platform-support/recommended-devices If the app starts without error I assume ARKit is supported. Have you tried other AR apps on the phone? Did you place the objects to appear as children of the Area Target GameObject? There are many possible sources of error… A good thing would be to debug the pose status, so you can figure out if the Area Target has been “found”, that the position is being estimated correctly: library.vuforia.com/getting-started/pose-status-and-status-info#handling-of%C2%A0status-and%C2%A0status%C2%A0info-in-unity
Hi Joshua, Here is my requirement 1. I dont have the matterplot camera to scan the room. I need an alternate method to make an accurate floor plan and import it in unity. 2. Will unity consider the floor plan measurements as it is or do we need to make an alternation in unity. 3. How to start from any origin to the destination.
1. The cheapest way is to use an iPhone or iPad with LiDAR support. You can install Vuforia Area Target Creator app and creat point clouds. With Matterport you can create larger point clouds but it’s necessary for prototype. 2. By default Unity’s measurement system is based on meters. If you scan an area you don’t have to alternate something regarding size. 3. take a look at the NavMesh system from Unity. The main camera of Unity is the back camera of the device and there should the NavMeshAgent be placed. The destination is the Transform of the Destination GameObject. If you don’t know this basic words from Unity language you should read about it in the documentation or watch a tutorial about basics of Unity. Hope that finds you helpful. Best regards
@@joshuadrewlow Thank you. What if I don't have iPhone or iPad which supports LiDAR. Is there any alternate tool in Android which scans the room and import it in unity. This is out of vuforia
Sorry I forgot about replaying. I’m sure there is a way with Android devices. Try to check out what you can do with AR Foundation. It has a plugin for Unity. I haven’t tried to achieve the same thing because from first looking at it it looked more complicated, but at least everything is for free, Vuforia is a very expensive product: unity.com/unity/features/arfoundation
Hi Joshua, first of all thank you for sharing your work! I have a question regarding the "Show back to line" or "Off Screen Target Indicator" you used for this project. How did you manage to show the indicator in AR? I'm planning to integrate this feature for the hololens, however due to the constraint that the indicator must lie in screen space - overlay I'm somehow lost. Thanks again and kind regards!
Hi Lea, I used a Unity asset that renders an arrow on the 2D canvas, but it uses an object to calculate where it has to render in 3d space. For the hololens this sounds more complicated indeed, unfortunately I don't know how the UI setup looks like but yes I think you have to render the arrow in 3d space always at the corner of the field of view. Did you check already in the Unity store?
Hi @@joshuadrewlow, thanks for responding! Indeed it seems to be not as easy as for other devices. Yes I already checked the asset store (unsuccessfully) and it is the same asset you used which relies on on overlay screen space unfortunately. Hopefully I can manage to find a way around that. Anyway, thank you for your feedback! :)
With screen overlay the indicators will only be visualized in the Editor and not on the hololens unfortunately... That's at least what I experienced and e.g. On unity forums they also suggest to use worldspace. So i guess I'll rewrite the assets scripts :D
Before you start really digging it's probably worth trying to contact the guy from this Unity asset. It looks much more sophisticated then the one I am using: assetstore.unity.com/packages/tools/gui/waypoint-indicators-153472
Hi there again Adnaan :) It acts as a controller script, so it's just attached to an empty GameObject. Are you having troubles with the implementation? Cheers
@@joshuadrewlow Hi. Yea I am having some challanges in trying to understand how to actually make the navigation. So like I have the navmesh and agent all created. I am just trying to wrap my head around how and what is needed to make the arrows to show where the user needs to go to and how to set up the start and end destination and incase if the user goes the wrong way the arrow needs to redirect the user to the proper path. Plus what does your ARStateController do if you don't mind telling me. :) Thank you so much for the support Joshua.
Ah I see now that you already asked once. For the navigation you need three things: 1) destination coordinates, 2) calculate a route from the user to the destination and 3) visualisation of that route. With Unity's NavMeshSystem you can cover the first two issues. For the third you have to be a bit more creative. You can simply render the NavMeshAgent's path, add arrows along the way or have an animated character guiding the user. Does that makes sense?
Distance is from adding up the distances between the corner points of the calculated path by the NavMeshAgent. You need to use Vector3.Distance() docs.unity3d.com/ScriptReference/Vector3.Distance.html Time is calculated simply by using the average walking speed I found on Google. Is that enough detail?
Off screen pointer not working. In unity asset pointer object will be 2d but I think you have using as 3d object right? How can I used it.Can you please help me..
The target object has to be a 3d GameObject yes! Check out carefully the demo scene of the asset. I think I used the second corner of the NavMeshAgent‘s path and in most cases it works. It could be done more smoothly.
I used the 3d model created by Vuforia. Some imperfect parts I occluded myself with basic cubes and a custom shader, link in the description. in kore advanced projects I even edited the 3d model in Blender to fix certain things.
hi sir is there any way to hide the mesh wich appears during the real world navigation. i used mesh collider and run time mesh accluder but it hides line renderer at some places where mesh is not visible. thanks in advance
Of course yes, just deactivate the object with the renderer. So your issue is that your navmesh is occluding line? You can also make the line render y positions a bit above the ground/navmesh
@@joshuadrewlow ya, my issue is our AT is not good quality is there any way to hide that, all the walls and floor appear as dull so I wanted to hide that.
@@ekeshkumar-rc4hb Are you saying that you are seeing the AT mesh when running on mobile? That should not happen. Did you enable Occlusion mesh on Area Target Behaviour?
Hm I don't know how to help further. You could create a small screen recording or contact me on one of my channels to have a video call: firefighter-ar.com
What exactly do you need more details about? A detailed video about everything would take hours and hours. You find lots of links in the description for more in depth tutorials.
Hi there, we scanned 4 Area Targets. One was unusable because a corridor was generated 1 meter to short. So we ended up using only 3 which covered a surface of 690m². How many did you scan or are planning to scan? Cheers
@@joshuadrewlow I wanted to scan my house with 3 different area, but just not sure Ipad Pro able to do it or not, because of the limited of time. I have tried to use Multi Area Target and added Navmesh, but end up not working, hoping can get some information from your next video about Multi Area Target.
@@patrizayin Yeah time is limited with the Area Target creator app to 5 min per scan. You can try to get through the house just by pretending to scan. Or you get a Matterport subscription where you have no time limit. I will start to work on the next video maybe next week. Cheers :)
We scanned the environment before hand. And then we use the "Vuforia Area Target" feature from Vuforia Engine to position the device where our app is running on.
The app uses the Vuforia Area Target to do that. Then attached to the virtual device camera (AR camera) is a NavMesh agent. From the NavMesh agent to the destination Unity's NavMesh system calculates the fastest way.
Thank you for stopping by. Unfortunately for now I decided not to share the source code, because it was a ton of work. Maybe there will be a Unity template in the store in the near future. Are you working on a similar project?
@@joshuadrewlow hi can you guide me from beginning, i have made the model sketch and now how to set the navigation target areas, any GitHub scripts avail ?
On this site you find explanations on how to setup up the Area Targets and there are also some scripts available: library.vuforia.com/develop-area-targets/area-targets-unity
Thanks Joshua for your good tutorial 😍😍
Thanks :)
Hi Joshua, I'm stuck with something. I used the vuforia content creator app and placed a cube within the area target a child and ran the build within unity in simulator mode. It worked fine but when I took a build and ran it on android only the camera opens but no cube augmentation. Can u help me with this?
Hii Joshua, could you please create a Video all about, How to scan an Environment using Vuforia Creator app, then How to create target points in Area Target Generator, this would be very helpful for us!
I just want to ask how did does the localisation work? Like what is the technology behind that, I just want to know because we are working on a school campus indoor ar navigation at the moment and we need to integrate the localisation of the user with the 2d map in order to know the user current position. Hope you find this comment, thankyou
I use Unity and Vuforia Engine. For localisation I use the Vuforia Area Targets, an optimised point cloud for augmented reality.
Hi there i like your work very much i m doing something same but using AR foundation in unity . I want to ask you that how can i create a point cloud. Is there any soft. for it. Plz help me
Hi there, thanks for reaching out! We were also very curious about AR foundation in the beginning. We found that it is not really clear how to create and handle point clouds by justing using the AR point cloud manager as documented here: docs.unity3d.com/Packages/com.unity.xr.arfoundation@4.1/manual/point-cloud-manager.html
Although what you can do, use the Vuforia Engine inside your AR foundation project (this didn't exist yet back then when we started the project): library.vuforia.com/unity-extension/vuforia-engine-and-ar-foundation . But I don't see an advantage using AR foundation, because with by "just" using Unity and Vuforia you can also support iOS and Android by using one code base, by simply building for another platform. Vuforia Engine will run on both platforms using the respective AR framework (ARKit or AR Core). Does that make sense?
hey man doing the same project for my college first floor was no issue but as soon as we are moving area target above certain height for second floor it is getting invisible. would love to get insights how did you make multi floor navigation. we have kept all the first floor area targets in multi target fyi
Sorry for seeing your comment so late! Sometimes I don’t get notified properly by YT. Did you find a solution? Best approach for me is to activate/deactivate ATs once the user us walking up stairs. How did you try to solve it?
@@joshuadrewlow hi there yes we solved the issues , but we would really need more guidance on this can we arrange a meeting with you please as we have less time
I will try to upload a tutorial to help you out. For possible meeting please contact me on LinkedIn. Are you on there?
do i need to set up vuforia in unity?
Yes, please read the docs. This is not a "build it from scratch tutorial". Vuforia and Unity have excellent docs.
Hello, could you please help us resolving the below issues that we're facing while we're building this project at our end:
1. LINE RENDERER is not visible
2. Cannot see the dynamic INT option (Part 2)
3. Facing scaling issues i.e the pointer is moving in some other direction and with random speed.
Thanks for stopping by. To narrow down your problems I need to ask some questions:
1: Where is the LineRenderer not showing? When running on the device or is it also not showing in the Editor? If it's showing in the Editor and not on the device then maybe the Area Target (AT) cannot be found. Have you tried to simply place a cube as child of the AT, and can you see it when running on the device?
2: What do you mean with the dynamic INT?
3: With "pointer" do you mean the off screen target indicator? What do you mean with scaling? What are you scaling, adding more ATs? Make sure that you set the indicator to one object only. For debugging try to show indicator to a static cube in the scene which is child of the AT.
Hope this helps to get a bit more light into your problems. Best regards, Joshua
@Joshua Drewlow Thank you.
What if I don't have iPhone or iPad which supports LiDAR. Is there any alternate tool in Android which scans the room and import it in unity. This is out of vuforia
I replied on the other thread but for any case: Sorry I forgot about replaying. I’m sure there is a way with Android devices. Try to check out what you can do with AR Foundation. It has a plugin for Unity. I haven’t tried to achieve the same thing because from first looking at it it looked more complicated, but at least everything is for free, Vuforia is a very expensive product: unity.com/unity/features/arfoundation
Hi Joshua. it seems the Vuforia Capture app is only native to ios.....are there alternative ways to generate a 3d reconstruction....I tried stardust neogama..but it seems like their system is down... I would really like to know if there's anyway I can achieve the 3d capture , point clouds and all with my mobile device...Are there any recommendations?
@@user-hg6lp5nl6fUnfortunately I don’t know of much alternatives, iOS or a professional camera (can also be rented e.g. for 100$ per day). I recently heard that you can capture Matterport spaces with Android now, but I’m not sure if you can buy the MatterPak from that.
@@joshuadrewlow ohh .... are you implying that you can take regular pictures of an environment and then upload them to a software to generate the 3d reconstruction for you ....I thought all that would have to be done within that software
Hi Joshua thanks for the video it was be very usefull and wonderfull. Excuse can i ask You, how did You do they scan of the oficce ir what software did You use?
I used the Matterport Pro2 camera. For the upper floor we used the capture app of Vuforia (which is free to use).
HI Joshua!!!
When and how did u managed to call "SetPositionFrom" and "SetPositionTo" ? Is there any specific controller or event tracker for that? which triggers the these two functions?
Hi there again 😊 Yes there is another controller. SetPositionFrom is called multiple times per second with the current position of the NavMesh agent and SetPositionTo is set when the user selects a destination for navigation in the ui. It's the position of a GameObject which is child of the corresponding Area Target. Cheers
@@joshuadrewlow perfect... Did the same... Your tutorial really helps... Thanks... Keep the great work going
@@joshuadrewlow Hi, world center mode is selected as "device" but, but the navmesh path is giving invalid path on runtime, inside unity it is working fine
Is the NavMesh at the desired location? Try visualise the NavMesh on runtime, this is very helpful. NavMesh must be child of AreaTarget to move relative to Area Target location. The destination also must be child of AreaTarget.
@@joshuadrewlow navmesh is coming perfectly, on runtime... I have checked... At the time of baking the navmesh, I have selected the area target and then bake the navmesh... That means, navmesh and area target is same object
how to import ARStatecontroller.
I created it myself
Hey Joshua . Great video. I am planning to implement an AR Navigation system. I am a beginner in Vuforia, and I was wondering how you managed to track multiple area targets. Did you bake the Navmesh on runtime, since the untracked area targets constantly drift? And how did you manage to track multiple area targets.
No I don’t bake NavMesh on runtime. I use the NavMesh surface component, which is not static, so it can move around with the AT, like an AR object. This means that the NavMesh must be child of an AT. You can check out the documentation of Vuforia: library.vuforia.com/develop-area-targets/multiple-area-targets
Nevertheless, at the time of the project we solved it differently, because this documentation didn’t exist yet. But their approach is better than my.
@@joshuadrewlow Hey, thanks for your reply. Just wanted to ask another question: I followed Vuforia's documentation and according to it when I create area targets, I have to apply the "PreviewModel" which is a 3D model of the area target as a prefab. It is used for baking the NavMesh on it. Now, when I run the AR application, two things happen: 1. the 3D prefab of the Area Target is visible and although overlayed correctly, I don't want the 3D prefab to visible. I have tried setting the mesh material as an invisible material. But it still shows some weird artefacts around the outlines/boundaries of the prefab, which looks odd. So, in that case, how do I deal with these artefacts. Is there a setting in Vuforia that will solve this ? 2. The prefab of the other Area Targets kind drifts, so apart from the solution, which was given by Vuforia, which for some reason doesn't seem to work, how did you manage to track multiple area targets. What was the approach?
Regarding your issues, 1: are you experiencing this issue in the editor or on the phone? In the editor it is normal to still see the mesh of the Prefab to better know where things are. If you still see the Prefab on the phone something is very odd. By default when running on the phone you should not see anything of the Prefab. With the artefacts, do you mean it’s rendering the outlines of the Prefab kind of like a drawing sketch (this is e.g. done in the AT creator app to test an AT)? Or are you using the demo app of Vuforia from the asset store? So by default you should not have to add any shader to make the Prefab disappear on the phone. What you can do is enabling occlusion mesh on the AT behaviour. You can also use a custom shader to enhance this occlusion or model the whole occlusion yourself.
For your issue 2: Did you use the MultipleAreaTargets script of the documentation? Did you place it on a GameObject as Parent of all other AreaTargets? How many ATs do you have? By default the engine can only handle 2-3 activated at the same time. My approach was to activate/deactivate the point clouds by script with colliders in the scene. The augmentation objects I always set as children of the currently activated AT. In a newer version of the app I‘ve successfully used the MultipleAreaTargets script, so there must be something wrong in your setup. If you have more than three ATs you can use LocationPrior or activate ATs manually by script. As far as I remember they have used this in one of their example projects, but it’s a long time ago I‘ve implemented this.
@@joshuadrewlow No, I see the prefab when running the app on the phone. It is also visible on the editor. The outlines are artefacts left after applying an invisible material. But it's odd. I attached the 3D prefab as a child of the Area Target. I don't know how to hide it at runtime . I have enabled occlusion mesh , but it does not help
Hey Joshua. Hope you are doing well. Just wanted to know what does ur ARStateController script contain. if you don't mind me asking. :)
Sorry for my late reply: I subscribe to the DevicePoseStatusCallback to show different information to the user and know which Area Target is currently localized. For Vuforia 9.x it was solved differently (library.vuforia.com/content/vuforia-library/en/articles/Solution/tracking-state.html) as it is now with Vuforia 10.5, but the principle is the same.
@@joshuadrewlow Thanks alot! I just have these problems. So how would I go about setting the position of the user everytime they are at a certain position in the real world. Also, another problem being that the line renderer doesn't render it the line correctly when testing the navigation in the real world. In example it goes through walls when the phone starts to move, however on Unity when using Vuforias Simulator it works fine. Would be a great help if you have any ideas of fixing these issues, since you may have come across these problems too.
Thank you!
Did you use the occlusion mesh from the AT behaviour? To set the position of the user you can fix the position of the NavMeshAgent to the position of the AR camera. Because the AR camera represents the smartphone camera. And with the NavMeshAgent you can calculate the path. The destination should be set to a place inside an AT.
Thanks Joshua for this tutorial ♥️
Now after preparing NavMeshAgent, how can I set the destinations in my area target, and what should I do after that? Can you explain it to me because I get confused?!
The destination should be a GameObject inside your Area Target. The position of it you should assign as destination to NavMesh agent. Then the agent calculates fastest way which you can render with LineRender.
were you able to complete the project? Even I have the same doubt, let me know if it worked for you pl
Did you try to create a simple scene with NavMeshAgent before? That might help to understand that part first.
Hey Joshnua loved your video, i have some sort of a similar use case where i need to use indoor navigation for example lets think of it as an airport ,like if a user wanted navigation to a certain gate, so far what i have done is set up a camera and current gps coordinates etc, but i am new to this is there any way you could guide me to move forward with this, by the way i am doing this POC only so it doesnt have to be perfect i dont know how to move forward with this.
I worked with point clouds not GPS coordinates. Do you also want to show the way with AR or just 2D on a map? Did you see part 1 of my tutorial?
@@joshuadrewlow for testing purposes i want to do this in my office and i have 2D map but i do want to use the phone back camera so i guess in 3D i am still new to all of this.
I see. This might be a good page to start: developer.vuforia.com/library/environments/area-targets
Maybe a word of caution:
Navigation is a very complex use case. AR makes it even more complex.
If you are completely new to AR I suggest you try to start with a simple AR use case like showing a 3D model with a reference image: developer.vuforia.com/library/objects/image-targets
hello @Joshua Drewlow!! thanks for sharing this on YT.
I have a doubt that how did you showed the map? captured by 3d camera and then you uploaded the vedio or what?
I'm making naviagtion system and I'm a student, never explored this field of AR/VR. can you make the pathway in details with tools used!
Thanks in advance
Do you mean the visible NavMesh? That is actually not a map, since a map is normally in 2D. This is the walkable area made visible with a NavMesh renderer. A link should be in the description... Let me check it 😉
Here you got the link: blog.terresquall.com/2020/07/showing-unitys-navmesh-in-game/
You need to add a script and some kind of mechanism to activate it, for example a button. Does that help?
If you want a 2D map with current position on it that is another thing. I haven't implemented it but there are plenty of tutorials. I tried to keep this tutorial only concerning the Vuforia related stuff.
Hi can I use Matterport on iPhone to make 360 and 3D scan?
Have the same queston! Does it have to be perfect?
Hi there, sorry for the late answer. You can use iPhone to create a Matterport scan yes. According to this page you can even now buy the MatterPak addon and therefor should be able to create an AreaTarget with it: matterport.com/cameras
@@joshuadrewlow Thanks a lot! Keep up the amazing work
Thanks ☺️
Hello! I’m writing to you because I’m working with area target too and I’ve had some problems, and looking for solutions I got to your video which is fabulous! I’m a designer studying a master in new media art and it’s my first time using vuforia with unity. I managed to use a Matterport scanner of my space converting it into a area target with the vuforia software, and I added it to my unity project adding the vuforia engine, vuforia key and ARKit, so far so good. I managed to mount the app via Xcode but although the app loads and opens the camera with the vuforia watermark, the augmentations do not appear. I’m doing everything in ios, and I’m wondering if the phone on which I load the app must also have LiDAR? I have not been able to find any documentation about it. If you have any comments or ideas I will be happy to receive them. Again thank you very much and congratulations for your work.
No, the phone does not need to have LiDAR. Have you checked your phone against this list of recommended devices? library.vuforia.com/platform-support/recommended-devices
If the app starts without error I assume ARKit is supported. Have you tried other AR apps on the phone? Did you place the objects to appear as children of the Area Target GameObject? There are many possible sources of error… A good thing would be to debug the pose status, so you can figure out if the Area Target has been “found”, that the position is being estimated correctly: library.vuforia.com/getting-started/pose-status-and-status-info#handling-of%C2%A0status-and%C2%A0status%C2%A0info-in-unity
how to i find current location in the model
If you mean current location of the user/device, it’s the AR camera object, it represents the rear camera of the device.
Hi Joshua,
Here is my requirement
1. I dont have the matterplot camera to scan the room. I need an alternate method to make an accurate floor plan and import it in unity.
2. Will unity consider the floor plan measurements as it is or do we need to make an alternation in unity.
3. How to start from any origin to the destination.
1. The cheapest way is to use an iPhone or iPad with LiDAR support. You can install Vuforia Area Target Creator app and creat point clouds. With Matterport you can create larger point clouds but it’s necessary for prototype.
2. By default Unity’s measurement system is based on meters. If you scan an area you don’t have to alternate something regarding size.
3. take a look at the NavMesh system from Unity. The main camera of Unity is the back camera of the device and there should the NavMeshAgent be placed. The destination is the Transform of the Destination GameObject. If you don’t know this basic words from Unity language you should read about it in the documentation or watch a tutorial about basics of Unity. Hope that finds you helpful. Best regards
@@joshuadrewlow Thank you.
What if I don't have iPhone or iPad which supports LiDAR. Is there any alternate tool in Android which scans the room and import it in unity. This is out of vuforia
Sorry I forgot about replaying. I’m sure there is a way with Android devices. Try to check out what you can do with AR Foundation. It has a plugin for Unity. I haven’t tried to achieve the same thing because from first looking at it it looked more complicated, but at least everything is for free, Vuforia is a very expensive product: unity.com/unity/features/arfoundation
Hi Joshua, first of all thank you for sharing your work!
I have a question regarding the "Show back to line" or "Off Screen Target Indicator" you used for this project.
How did you manage to show the indicator in AR?
I'm planning to integrate this feature for the hololens, however due to the constraint that the indicator must lie in screen space - overlay I'm somehow lost.
Thanks again and kind regards!
Hi Lea, I used a Unity asset that renders an arrow on the 2D canvas, but it uses an object to calculate where it has to render in 3d space. For the hololens this sounds more complicated indeed, unfortunately I don't know how the UI setup looks like but yes I think you have to render the arrow in 3d space always at the corner of the field of view. Did you check already in the Unity store?
Hi @@joshuadrewlow, thanks for responding! Indeed it seems to be not as easy as for other devices. Yes I already checked the asset store (unsuccessfully) and it is the same asset you used which relies on on overlay screen space unfortunately. Hopefully I can manage to find a way around that. Anyway, thank you for your feedback! :)
Can't you have an fixed overlay as big as the camera size?
With screen overlay the indicators will only be visualized in the Editor and not on the hololens unfortunately... That's at least what I experienced and e.g. On unity forums they also suggest to use worldspace. So i guess I'll rewrite the assets scripts :D
Before you start really digging it's probably worth trying to contact the guy from this Unity asset. It looks much more sophisticated then the one I am using: assetstore.unity.com/packages/tools/gui/waypoint-indicators-153472
Hey. I just wanted to know where does the ARPathVisiualizer script has been attached to?
Hi there again Adnaan :) It acts as a controller script, so it's just attached to an empty GameObject. Are you having troubles with the implementation? Cheers
@@joshuadrewlow Hi. Yea I am having some challanges in trying to understand how to actually make the navigation. So like I have the navmesh and agent all created. I am just trying to wrap my head around how and what is needed to make the arrows to show where the user needs to go to and how to set up the start and end destination and incase if the user goes the wrong way the arrow needs to redirect the user to the proper path. Plus what does your ARStateController do if you don't mind telling me. :) Thank you so much for the support Joshua.
Ah I see now that you already asked once. For the navigation you need three things: 1) destination coordinates, 2) calculate a route from the user to the destination and 3) visualisation of that route. With Unity's NavMeshSystem you can cover the first two issues. For the third you have to be a bit more creative. You can simply render the NavMeshAgent's path, add arrows along the way or have an animated character guiding the user. Does that makes sense?
Hi Joshua! Excellent video and thank you for sharing. How did you calculate time and distance? can you please share in detail. thanks in advance.
Distance is from adding up the distances between the corner points of the calculated path by the NavMeshAgent. You need to use Vector3.Distance() docs.unity3d.com/ScriptReference/Vector3.Distance.html
Time is calculated simply by using the average walking speed I found on Google. Is that enough detail?
Off screen pointer not working. In unity asset pointer object will be 2d but I think you have using as 3d object right? How can I used it.Can you please help me..
The target object has to be a 3d GameObject yes! Check out carefully the demo scene of the asset. I think I used the second corner of the NavMeshAgent‘s path and in most cases it works. It could be done more smoothly.
@@joshuadrewlow Its working smoothly. Again thank you for excellent video and support! Great work😇
Nice. How did you do the occlusion of the green paths behind objects in the distance?
I used the 3d model created by Vuforia. Some imperfect parts I occluded myself with basic cubes and a custom shader, link in the description. in kore advanced projects I even edited the 3d model in Blender to fix certain things.
@@joshuadrewlowthanks man!
hi sir is there any way to hide the mesh wich appears during the real world navigation.
i used mesh collider and run time mesh accluder but it hides line renderer at some places where mesh is not visible.
thanks in advance
Of course yes, just deactivate the object with the renderer. So your issue is that your navmesh is occluding line? You can also make the line render y positions a bit above the ground/navmesh
@@joshuadrewlow ya,
my issue is our AT is not good quality is there any way to hide that,
all the walls and floor appear as dull so I wanted to hide that.
@@ekeshkumar-rc4hb Are you saying that you are seeing the AT mesh when running on mobile? That should not happen. Did you enable Occlusion mesh on Area Target Behaviour?
@@joshuadrewlow
yes sir i applied occlusion mesh, in advanced settings option in AT.
Hm I don't know how to help further. You could create a small screen recording or contact me on one of my channels to have a video call: firefighter-ar.com
👌🏻🔥
😏💥
Can you please create a full detailed video on making this
I want to make this as my final year project, plz it would be great help
What exactly do you need more details about? A detailed video about everything would take hours and hours. You find lots of links in the description for more in depth tutorials.
Hello Rahul,
I am also doing the same project. Shall we get in touch or could you share ideas on it
@@ameeransar5297 we will get connected there from
@@joshuadrewlow it would be best if detailed video would be three
What more details do you need to know? The Vuforia documentation is already very detailed.
So, in total. how many area target have scanned in this project?
Hi there, we scanned 4 Area Targets. One was unusable because a corridor was generated 1 meter to short. So we ended up using only 3 which covered a surface of 690m². How many did you scan or are planning to scan? Cheers
@@joshuadrewlow I wanted to scan my house with 3 different area, but just not sure Ipad Pro able to do it or not, because of the limited of time. I have tried to use Multi Area Target and added Navmesh, but end up not working, hoping can get some information from your next video about Multi Area Target.
@@patrizayin Yeah time is limited with the Area Target creator app to 5 min per scan. You can try to get through the house just by pretending to scan. Or you get a Matterport subscription where you have no time limit. I will start to work on the next video maybe next week. Cheers :)
@@joshuadrewlow This project really great, thanks you for sharing
How do you get into the environment...how you find the position in place
We scanned the environment before hand. And then we use the "Vuforia Area Target" feature from Vuforia Engine to position the device where our app is running on.
How does the app position you in the environment
The app uses the Vuforia Area Target to do that. Then attached to the virtual device camera (AR camera) is a NavMesh agent. From the NavMesh agent to the destination Unity's NavMesh system calculates the fastest way.
Thanks for your good tutorial. May share your project source code kindly?
Thank you for stopping by. Unfortunately for now I decided not to share the source code, because it was a ton of work. Maybe there will be a Unity template in the store in the near future. Are you working on a similar project?
@@joshuadrewlow yes. I am. Any chances you have found something similar, or have changed your mind in sharing the source code?
Unfortunately still no, but hopefully will get my package out soon. Are you struggling with something particular?
Hi
Can you help me with the code please
Where are you having problems?
@@joshuadrewlow The coding part of it.
Where exactly do you have problems? There are many many aspects to it.
@@joshuadrewlow hi can you guide me from beginning, i have made the model sketch and now how to set the navigation target areas, any GitHub scripts avail ?
On this site you find explanations on how to setup up the Area Targets and there are also some scripts available: library.vuforia.com/develop-area-targets/area-targets-unity