Occlusion in Tango AR Camera
Asked Answered
I

4

32

I have a simple Tango Unity app which uses the Tango AR Camera prefab to display a 3D object in augmented reality.

Following this question, I wanted to try out the occlusion feature provided by TangoARScreen.

Therefore I have:

  • checked the "Enable Occlusion" checkbox
  • enabled depth detection in Tango Manager
  • added a Tango Point Cloud with Update points mesh enabled.

However the 3D object never gets hidden by foreground real-world objects. What am I missing?

Is there any sample project that demonstrates this "Enable Occlusion" feature?

Inobservance answered 21/6, 2016 at 7:38 Comment(0)
I
0

That seems to have been fixed in latest versions of the Tango SDK.

Inobservance answered 5/6, 2017 at 15:58 Comment(0)
B
8

Try to look in the Unity Examples, the one named ExperimentalMeshOcclusion.

I just ran it and the occlusion there works well, so you can see the scene objects and the code being used.

Binominal answered 28/6, 2016 at 13:59 Comment(2)
This example has its own way to handle occlusion (based on experimental meshing), it doesn't use the "Enable occlusion" feature of TangoARScreen.Inobservance
All of the Unity3D Tango SDK examples crash for me within about 30 seconds of running, the same happens to others I have spoken to too. How on Earth did you get them to work? Could you tell me which Unity version + which SDK release + which device you are using?Elinaelinor
C
4

In order to use occlusion on TnagoARScreen, you have to check the Update Points Mesh checkbox on TangoPointCloud prefab in the scene.

Canoewood answered 28/6, 2016 at 23:35 Comment(1)
As explicitely mentioned in the question, I have already added a "Tango Point Cloud" with "Update points mesh" enabledInobservance
H
3

There is no sample, but here's steps to alter an existing sample to turn it on. Tested working on the Phab2.

  1. Start from the Area Learning Example.
  2. Load the scene in Unity and Open "Tango Point Cloud" Inspector from your Hierarchy.
  3. Tick "Update Points Mesh" under the "Tango Point Cloud" script.
  4. Open the "Tango AR Camera" Inspector.
  5. Tick "Enable Occlusion" under the "Tango AR Screen" script
  6. Run the app and make sure you are testing by placing a mark behind a good sized object, and moving far enough back so that the depth sensor can see the object. Rendering the Point cloud data to screen can help you make sure that you are getting the input from Depth sensor that you expect.

I do find better results using the Experimental sample referenced by @Oren

Hildredhildreth answered 19/1, 2017 at 14:27 Comment(3)
I'll try that, but I don't see any difference with what I tried and described in my question, is there any?Inobservance
Naa the steps you list are the same, but you might have been starting from a different starting point than the Area Learning Example? I did follow those through myself and it worked on a Mac, and Unity 5.5.0f3 and the latest (a few days ago) updates to Tango. And step 6 is from experience, I thought it wasn't working, until I realised I was too close to my occluding object for the depth sensor to pick it up. It was only when I turned the display of the point cloud on that I realised how picky it can be.Hildredhildreth
this is not working for me.. I started from a clean Area Learning Example. Any ideas?Rockies
I
0

That seems to have been fixed in latest versions of the Tango SDK.

Inobservance answered 5/6, 2017 at 15:58 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.