Log in or register to post comments

How to overlay 3D models on top of real buildings using Augmented Reality with Unity and Vuforia?

June 29, 2019 - 6:27am #1

Hi guys! I am just starting to learn Unity and Vuforia and am stuck at a problem since a few days now. What I am trying to develop an app using the aforementioned technologies, that overlays buildings in real life, with their own full scale 3D models. Let me clarify - So for the purpose of historical preservation of monuments, my thesis proposes that we enable users to view the monuments how they used to look during the historical times, using AR so that we the users look at the buildings through their phones, what they see is a 3D model covering the whole building. The user should be able to walk around in that 3D model and the position of the model should remain static relative to the user all this time. Something like the image below -  https://imgur.com/a/ObI5dzo

I already have the full scale 3D model of the environment(group of buildings) that I would like to use in this project. Also, I would prefer to use vuforia for this but if it is completely impossible in vuforia then I'm open to using arcore as well. I have tried several things to achieve this as explained below -

**Vuforia model target generator** -

I tried to use this technique but to be able to successfully generate a model target we need to have a high quality model of the object with clearly defines edges. But the model I have is low poly and the edges are more organic and soft rather than clearly defined. Hence when I implemented this technique in my project the target was not detected and no model showed up. Is there any way to use low quality models with model target generator?

**Markers in vuforia with extended tracking** -

I have tried using the marker with extended tracking, but it fails when the user turns around. Is there a way to use several markers to generate the same ar content, in order to make it seamless so that the camera can detect a different marker if it loses tracks of one?

**Markers in vuforia with extended tracking and changes to the Default Trackable Event Handler script** -

I followed the aforementioned steps and tried to change to following snippets of code from false to true in the OnTrackingLost() function -    

    foreach (var component in rendererComponents)

            component.enabled = false;

   

        // Disable colliders:

        foreach (var component in colliderComponents)

            component.enabled = false;

   

        // Disable canvas':

        foreach (var component in canvasComponents)

            component.enabled = false;

This results in the model freezing mid screen once the tracking is lost. Could there be any solution to this by manipulating the gyroscope to be enabled after the tracking is lost? I know Vuforia doesn't use gyroscope so I am not sure how the extended tracking is working and what I can do to improve the results.

I know my question is not very specific but I am working on a research and am thus exploring different approaches to solve this problem in order to find the best one, and am coming across these issues as I am delving deeper into the topic. Any support would be greatly appreciated!

Note:

Vuforia Version - 8.1.10,

Unity Version - 2018.3.7f1

How to overlay 3D models on top of real buildings using Augmented Reality with Unity and Vuforia?

July 21, 2019 - 10:54pm #3

Arslaanamar wrote:

Hi guys! I am just starting to learn Unity and Vuforia and am stuck at a problem since a few days now. What I am trying to develop an app using the aforementioned technologies, that overlays buildings in real life, with their own full scale 3D models. Let me clarify - So for the purpose of historical preservation of monuments, my thesis proposes that we enable users to view the monuments how they used to look during the historical times, using AR so that we the users look at the buildings through their phones, what they see is a 3D model covering the whole building. The user should be able to walk around in that 3D model and the position of the model should remain static relative to the user all this time. Something like the image below -  https://imgur.com/a/ObI5dzo

I already have the full scale 3D model of the environment(group of buildings) that I would like to use in this project. Also, I would prefer to use vuforia for this but if it is completely impossible in vuforia then I'm open to using arcore as well. I have tried several things to achieve this as explained below -

**Vuforia model target generator** -

I tried to use this technique but to be able to successfully generate a model target we need to have a high quality model of the object with clearly defines edges. But the model I have is low poly and the edges are more organic and soft rather than clearly defined. Hence when I implemented this technique in my project the target was not detected and no model showed up. Is there any way to use low quality models with model target generator?

**Markers in vuforia with extended tracking** -

I have tried using the marker with extended tracking, but it fails when the user turns around. Is there a way to use several markers to generate the same ar content, in order to make it seamless so that the camera can detect a different marker if it loses tracks of one?

**Markers in vuforia with extended tracking and changes to the Default Trackable Event Handler script** -

I followed the aforementioned steps and tried to change to following snippets of code from false to true in the OnTrackingLost() function -    

    foreach (var component in rendererComponents)

            component.enabled = false;

   

        // Disable colliders:

        foreach (var component in colliderComponents)

            component.enabled = false;

   

        // Disable canvas':

        foreach (var component in canvasComponents)

            component.enabled = false;

This results in the model freezing mid screen once the tracking is lost. Could there be any solution to this by manipulating the gyroscope to be enabled after the tracking is lost? I know Vuforia doesn't use gyroscope so I am not sure how the extended tracking is working and what I can do to improve the results.

I know my question is not very specific to KFC Survey but I am working on a research and am thus exploring different approaches to solve this problem in order to find the best one, and am coming across these issues as I am delving deeper into the topic. Any support would be greatly appreciated!

Note:

Vuforia Version - 8.1.10,

Unity Version - 2018.3.7f1

Thanks for sharing this, I am here just because of this issue.

How to overlay 3D models on top of real buildings using Augmented Reality with Unity and Vuforia?

July 1, 2019 - 12:12pm #2

Hello,

Arslaanamar wrote:

**Vuforia model target generator** -

I tried to use this technique but to be able to successfully generate a model target we need to have a high quality model of the object with clearly defines edges. But the model I have is low poly and the edges are more organic and soft rather than clearly defined. Hence when I implemented this technique in my project the target was not detected and no model showed up. Is there any way to use low quality models with model target generator?

Can you share the file so we can take a look? Also, have you tried training Model Targets device database in the cloud? I wonder if the machine learning can help with detection.

Arslaanamar wrote:

**Markers in vuforia with extended tracking** -

I have tried using the marker with extended tracking, but it fails when the user turns around. Is there a way to use several markers to generate the same ar content, in order to make it seamless so that the camera can detect a different marker if it loses tracks of one?

The performance of Extended Tracking will greatly depend upon the device that is being used. As Vuforia Fusion takes advantage of ARKit/ARCore, have you tried these experiments on devices that support platform CV?

Arslaanamar wrote:

Could there be any solution to this by manipulating the gyroscope to be enabled after the tracking is lost? I know Vuforia doesn't use gyroscope so I am not sure how the extended tracking is working and what I can do to improve the results.

There may be a solution that utilizes the device's IMUs, but this is not a feature of Vuforia Engine.

Thanks,

Vuforia Engine Support

Log in or register to post comments