microsoft / MapsSDK-Unity

This repository contains samples, documentation, and supporting scripts for Maps SDK, a Microsoft Garage project.
MIT License
650 stars 128 forks source link

Identifying common building parts such as windows from a RaycastHit #87

Closed yosun closed 4 years ago

yosun commented 4 years ago

Just wondering if it is possible to identify building parts such as windows via this SDK...

(If not, please add this as a feature!)

kircher1 commented 4 years ago

Similar answer to the other issue, but this is not possible and more dependent upon the data the SDK consumes which currently does not have this sort of information (e.g. window locations).

yosun commented 3 years ago

I'm thinking of writing kind of a manual hack for this, at least for known buildings. Can you let me know if this is the best approach?

kircher1 commented 3 years ago

Yes, I think it is a good idea. A shadow mesh could be annotated or subdivided in such a way so that a hit test can be used to determine what part of a building you are hitting.

Generating that sort of data could be more of the issue though as it's not available through the SDK and there is no way to export the meshes. Exporting the map data is also not allowed via TOU, so that likely won't be a feature added to the SDK either.

Of course if you have specific buildings in mind, maybe there is some existing BIM data for it that could use as a good starting point? Assuming the BIM data is accurate, it should match the building on the map closely. Just be sure to use the "realistic scaling" option on the MapPin.