bertt / mapbox_3dtiles_samples

Samples of MapBox JS + 3D Tiles
MIT License
57 stars 11 forks source link

Help to visualize 3D-Tiles and Terrain #6

Closed reHildeb closed 2 years ago

reHildeb commented 2 years ago

Hello Bert,

your project is really awesome.

In 2D everythings works totally fine for me. For my next step i try to visualize 3D-Tiles and Terrain. In Cesium it does work, but with Maplibre and Mapbox there are some problems.

When using Mapbox it depends on the camera perspecitve. A flat angle shows a few 3D-Tiles, but not the ones directly near you. When its moved to a steeper viewing point they gradually disappear. Do you have an idea/hint if it possible to solve with changes to Mapbox3DTiles.js file. In my Attempts with mapblire the 3D-Tiles are rendered, but the terrain seems to cover it. In my opinion this seems like a problem in Maplibre, if you don't have another experience.

Regards, Hendrik

bertt commented 2 years ago

Hi, I haven't used the 3D Tiles in combination with the MapLibre/Mapbox terrains, maybe you can ask at https://github.com/Geodan/mapbox-3dtiles

reHildeb commented 2 years ago

Okay, thanks.

reHildeb commented 2 years ago

If anyone is looking for a solution. In Maplibre the WebGL order is "wrong". The Terrain is loaded after 3D-Tiles and cover them up. You have to change in Mapbox3DTiles.js the Material priority. ( this.depthFunc = EqualDepth; )