microsoft / MixedRealityToolkit-Unity

This repository is for the legacy Mixed Reality Toolkit (MRTK) v2. For the latest version of the MRTK please visit https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity
https://aka.ms/mrtkdocs
MIT License
6k stars 2.12k forks source link

SpatialUnderstanding fails to extract the first mesh of any room model #1507

Closed dimizuno closed 5 years ago

dimizuno commented 6 years ago

Overview

If you run the SpatialUnderstandingExample scene in the Editor the SpatialMappingManager uses a room model as the spatial source. The room model files contain separate meshes, for example _defaultMeshPart0, _defaultMeshPart1 and _defaultMeshPart2. This issue applies to all room models in the MixedRealityToolkit: FakeSpatialMappingMesh, MediumRoomWithHomeFurniture and SRMesh.

Expected Behavior

All room meshes should be consumed by the SpatialMappingManager and processed by the SpatialUnderstanding scripts to create and render corresponding playspace meshes.

Actual Behavior

The SpatialMappingManager consumes the separate meshes and creates corresponding GameObjects in the scene. The first one (always called roomMesh-0) is never extracted correctly by the SpatialUnderstanding.dll. To be exact, the GeneratePlayspace_ExtractMesh_Setup(out int vertexCount, out int indexCount) function in SpatialUnderstandingCustomMesh.Import_UnderstandingMesh() returns 0 instead of 1 for this mesh. Therefore it is not rendered in the scene.

Steps to reproduce

Just open and play the SpatialUnderstandingExample scene in the Unity Editor and try every single room model. A corresponding playspace mesh for roomModel-0 is never generated.

Unity Editor Version

2017.1.2p1

Mixed Reality Toolkit Release Version

HoloToolkit-Unity-v1.2017.1.2 HoloToolkit-Unity-Examples-v1.2017.1.2

wiwei commented 5 years ago

Closing issues older than 180 days. If this is still an issue, please reactivate with recent information.