Search Unity

Spatial Mapping Renderer component not rendering anything

Discussion in 'VR' started by trzy, Jul 25, 2016.

  1. trzy

    trzy

    Joined:
    Jul 2, 2016
    Posts:
    128
    Hi,

    I'd like to use spatial mapping in my app (primarily for occlusion culling initially but eventually collision as well) and thought I'd start with the "Spatial Mapping Renderer" AR component. The offline documentation indicates this can be attached to any object. I went ahead and added it to my main camera, set "Custom Render Setting" to "Custom Material" and the "Custom Material" to "SpatialMappingWireframe", which should draw a wireframe color coded by distance.

    Unfortunately, I get nothing. I've also tried Microsoft's "Origami" tutorial. They have a "Spatial Mapping" prefab that can render a wireframe and it includes the "Spatial Mapping Renderer" component, but as far as I can tell, it is their own script that ends up rendering a monochrome wireframe. The component does not seem to do anything at all.

    What am I missing? What is necessary to use this component?

    Thank you,

    Bart
     
  2. Unity_Wesley

    Unity_Wesley

    Unity Technologies

    Joined:
    Sep 17, 2015
    Posts:
    558
    Hello,

    It sounds like in your capabilities you have not set SpatialPerception to true. If you go to Build Settings -> Then Publishing Settings -> Then Capabilities, you should see SpatialPerception at the bottom of the list check, the box to enable it.

    upload_2016-7-25_8-35-28.png


    Thank you,
    Wesley
     

    Attached Files:

  3. trzy

    trzy

    Joined:
    Jul 2, 2016
    Posts:
    128
    Thanks, Wesley! That was it!

    In case anyone else stumbles upon this thread: if you've already built your app, you should delete the project folder and build anew otherwise the checkbox won't take affect. Alternatively, you can edit the manifest file but simply re-generating the app is a bit easier.
     
  4. VulgarGnome

    VulgarGnome

    Joined:
    Dec 21, 2016
    Posts:
    1
    Ugh! Thanks trzy! I knew to enable SpatialPerception, but I never knew I had to delete the app folder. rebuilt the thing about 5 times wondering why it didnt change. Thanks for the info!