Log in or register to post comments

Cannot get tracking / showing objects working on HoloLens, but it's working e.g. in Unity with a Webcam

June 2, 2017 - 5:39am #1

I created a simple Test-App: An ImageTarget with some text that is displayed when the corresponding image is visible.

My app is also working - as long as I'm using Unity with my Surface and it's webcam. The image is tracked, my object displayed, ... everything as expected.

Then I wanted to get it to run on the HoloLens and I made the documented changes (like second camera and so on, see my list of tried fixes below). But after starting the App on the HoloLens I only get the Splash-Screen ("Created with Unity") and after that nothing happens. I can exit the App with the bloom-gesture, but that's all. No object recognition / tracking...

The only scene (it is also activated in the build-window) has the following GameObjects in this order:

  1. HoloLensCamera (Main Camera)
  2. Directional Light (default)
  3. ARCamera
  4. ImageTarget
    1. MeshText

What did I already check:

  • Applied all settings for the scene, project and capabilities via the HoloToolkit
  • Capabilities for InternetClient, WebCam, Microphone and SpatialPerception are set
  • Added the HoloLensCamera from the HoloToolkit
  • Selected Optical See-Through -> HoloLens on the ARCamera for the Digital Eyewear settings
  • On ARCamera the World Center Mode is on "CAMERA" and the Central Anchor Point is set to the HoloLensCamera
  • My ImageTarget also has "Extended Tracking" enabled
  • For my project I enabled within the PlayerSettings the "Virtual Reality Support" and selected "Windows Holographic"
  • I also tried to Rebuild the project with the "Debug" (x86) configuration as well as the "Release" (x86) configuration before deploying it to the HoloLens

As it is working inside Unity on the PC the app itself is configured correctly.

Cannot get tracking / showing objects working on HoloLens, but it's working e.g. in Unity with a Webcam

June 7, 2017 - 11:01am #6

Glad to hear the issue was resolved.

Cannot get tracking / showing objects working on HoloLens, but it's working e.g. in Unity with a Webcam

June 7, 2017 - 6:03am #5

Hi medabit,

thanks for that example. I actually got it working this time!

After comparing all settings side-by-side I discovered, that the Field of View and the Near Clipping Planes of the HoloLensCamera were different (I used the recommend settings 16 and 0.85 - your camera 60 and 0.3).

I now have some trouble to get some easy to recognize tags, but at least I see some flickering text already in my HL-App :)

 

Thanks!

Cannot get tracking / showing objects working on HoloLens, but it's working e.g. in Unity with a Webcam

June 5, 2017 - 5:58pm #4

Hello,

I've uploaded a Unity 5.5 project with some test scenes that you can use as reference:

https://www.dropbox.com/s/76cnl61wq1c24o3/Unity%205.5%20HL%20SDK%206.2.zip?dl=0

It's not pretty like our sample apps, but I just built it and ran on my HL. It recognized the stones target and placed a sphere upon top.

Workflow was as-follows:

  1. Build app in Unity (see screen grab) - I don't think the XAML/D3D setting makes a difference, but mine was set to XAML
  2. Save build artifacts to custom folder
  3. After build is done, open the .SLN file in MS Visual Studio
  4. Connect HL device to build machine
  5. Select "Debug", "x86" and "Device"
  6. Press Play

I was able to see the sphere with the target being held at arm's length and closer.

Perhaps the issue with your project has something to do with the clipping plane settings? Under ARCamera, highlight StereoCameraLeft. In the inspector settings you'll see the clipping plane values. My far plane was set to 2000. If the far plane value is too small, the augmentation will not render unless the target is far away.

Hope this helps.

Cannot get tracking / showing objects working on HoloLens, but it's working e.g. in Unity with a Webcam

June 4, 2017 - 7:55am #3

medabit wrote:

Hello,

Can you also confirm that you loaded and activated the dataset in the ARCamera configuration settings? This is a common oversight and will result in the target not being recognized.

Thanks.

 

Yes, those are activated, see also the screenshots I attached from all relevant Settings...still not getting to work :(

Cannot get tracking / showing objects working on HoloLens, but it's working e.g. in Unity with a Webcam

June 2, 2017 - 8:11am #2

Hello,

Can you also confirm that you loaded and activated the dataset in the ARCamera configuration settings? This is a common oversight and will result in the target not being recognized.

Thanks.

Log in or register to post comments