Editing the Spatial Mesh

Would it be possible to export the Spatial Mesh .obj file from the device portal and load it into a 3D modeling software to then be edited? (i.e. smoothen out edges or make the floor more flat) I'm planning on creating a 2D plane based on the spatial mesh's rendering of the floor then dividing the plane up into a grid so I can setup some sort of coordinate system with walkable and non walkable nodes. If I could edit the spatial mesh to make it more uniform, it'll make the plane creating script more accurate and consistent when analyzing the spatial mesh's bounds.

Thanks.

Best Answers

Answers

  • @ccyuen,

    On the 3D View screen in the Device Portal, go down to Spatial Mapping and click the save button to get an .obj.

    James Ashley
    VS 2017 v5.3.3, Unity 2017.3.0f3, MRTK 2017.1.2, W10 17063
    Microsoft MVP, Freelance HoloLens/MR Developer
    www.imaginativeuniversal.com

  • @james_ashley yes I already understand how that works. My question was asking if I can edit that file.

  • @jbienzms Yes sorry, I mean to take that .obj file into a 3D modeling software, edit it and then export it to use. For example I would take a spatial mesh object of a room and edit it so that the floor is completely flat and use it in my unity project instead of the one stored in the HoloLens. Is this still possible through the ObjectSurfaceObserver? Or even if it is possible I foresee some bugs or issues that will pop up when trying to do this.

  • Oh, P.S. if what you're looking for is a normalized smoothed mesh of the room you probably want to check out Spatial Understanding. This is dynamically generated and can be used for any room. It's a little complicated to use, but the mesh produced is very clean, it's water tight, and you can execute queries against it.

    Spatial Understanding is part of the toolkit. You’ll find it here:
     
    https://github.com/Microsoft/HoloToolkit-Unity/tree/master/Assets/HoloToolkit/SpatialUnderstanding
     
    And there is a sample scene you can play with here:
     
    https://github.com/Microsoft/HoloToolkit-Unity/tree/master/Assets/HoloToolkit-Examples/SpatialUnderstanding
     
    You can also check out a video of someone trying that sample scene here:

    Our Holographic world is here

    RoadToHolo.com      WikiHolo.net      @jbienz
    I work in Developer Experiences at Microsoft. My posts are based on my own experience and don't represent Microsoft or HoloLens.

  • Yes @jbienzms, Thank you so much :)

  • Also @jbienzms how would I go about changing the Spatial Understanding scripts so that it wouldn't be dynamic? I don't want to scan the same room everytime I deploy the app, I want it to load the spatial mesh data from the OS/HPU and convert that into the Spatial Understanding mesh. I am trying to integrate the functionality of the Spatial Understanding scripts into my project.

  • @ccyuen for saving the SU Mesh check out this code here. Specifically look at the SaveSpatialUnderstanding scene.

    Our Holographic world is here

    RoadToHolo.com      WikiHolo.net      @jbienz
    I work in Developer Experiences at Microsoft. My posts are based on my own experience and don't represent Microsoft or HoloLens.

  • @james_ashley said:
    @ccyuen,

    On the 3D View screen in the Device Portal, go down to Spatial Mapping and click the save button to get an .obj.

    I am sorry to disturb you. I want get a better(finer grid) spatial mapping.obj files from hololens. DO you know how to get it? BY the way,DO you know the max value of the TPCM(triangles per cubic meters),and TPCM default value is 500,

  • @LieBe said:

    @james_ashley said:
    @ccyuen,

    On the 3D View screen in the Device Portal, go down to Spatial Mapping and click the save button to get an .obj.

    I am sorry to disturb you. I want get a better(finer grid) spatial mapping.obj files from hololens. DO you know how to get it? BY the way,DO you know the max value of the TPCM(triangles per cubic meters),and TPCM default value is 500,

    As far as I know the maximum is about 2000 triangles per cubic meter, you can put more but won't change anything.

Sign In or Register to comment.