Search Unity

How to treat the entire Spatial Map as a single mesh for comparison.

Discussion in 'VR' started by Subere023, Jun 20, 2016.

  1. Subere023

    Subere023

    Joined:
    Apr 27, 2016
    Posts:
    47
    Let me say first, I am relatively new to unity( a few months) and geometric coding in general.

    I am trying take the spatial map for an area and dynamically place items throughout it. While I am sure there are many approaches to this, I want to analyze the whole spatial map to find the best spots, determine walkable areas etc. I have been trying various things but it seems like having all the spatial map meshes as one unit instead of individual meshes attached to a parent would be better for analysis. I have tried combining the meshes into one to find out that Unity and/or Hololens has a limitation in this matter.

    With that said, what might be a way to look at these meshes as a whole to work with? I realize this might be something obvious I am overlooking in regards to parents and children. But I look at an app like LSrD and have to assume its doable.
     
  2. shouchard

    shouchard

    Unity Technologies

    Joined:
    Mar 29, 2016
    Posts:
    10
    IIRC, there are utilities in HoloToolkit that exist for these kinds of things but I have not used them. Specifically, SurfaceMeshesToPlanes.cs and SurfacePlane.cs as seen at https://github.com/Microsoft/HoloToolkit-Unity.

    I'm not aware of any built-in solution that will combine the set of spatial mapping meshes into a single mesh for analysis. You can always inspect the mesh data directly and coalesce things manually if brute forcing the matter isn't going to be prohibitively expensive. Note that the points in a spatial mapping mesh are local to the surface's location as dictated by its WorldAnchor.

    Let me know if I can clarify anything for you.
     
  3. Subere023

    Subere023

    Joined:
    Apr 27, 2016
    Posts:
    47
    Yeah I have been through the HLTK - Unity pretty thoroughly(with my limited knowledge). My guess is that the help I am looking for is in the PlaneFinder.DLL. Maybe it does the work in the DLL to get around the mesh limitations? I guess I will dig further.

    Thanks