microsoft / MapsSDK-Unity

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

Overlap Between Elevation Surface and 3D Aerial Scan Model #166

Closed MMitty closed 1 year ago

MMitty commented 2 years ago

Hi,

I use the Maps SDK for certain parts of the world where it has 3D detailed coverage and that works great.

At other places I'll need to use custom 3D aerial scanned models like on this screenshot. image

Note at the red arrows that the custom 3D model and the Microsoft elevation layer overlaps and the elevation layer protrudes and hides parts of the custom model.

How could I achieve that this protrusion would not happen? How could it be ensured that inside the area of my custom model the Microsoft map surface would not be visible?

Could there be a special helper object type in the SDK that would mask the original maps surface inside their volume? I'm thinking about something like what the "Advanced Dissolve" plugin does: image

kircher1 commented 2 years ago

My suggestion here is leveraging some of the customization features: overriding the material used to render the map and adding a custom TextureTileLayer.

The tile layer would provide tiles that are effectively a mask used to identify pixels inside the region you have the more detailed 3D coverage. Then the custom shader would read this tile layer's texture and discard the pixel if it's inside this region.