visgl / deck.gl

WebGL2 powered visualization framework
https://deck.gl
MIT License
12.22k stars 2.08k forks source link

Tile3DLayer ERROR : Failed to render layer of type cmpt #6389

Open naranakula opened 2 years ago

naranakula commented 2 years ago

Description

Error: update of Tile3DLayer({id: 'my-scatterplot'}): Tile3DLayer: Failed to render layer of type cmpt

JS Code

const {MapboxLayer, Tile3DLayer} = deck;

// Get a mapbox API access token
mapboxgl.accessToken = 'pk.eyJ1IjoidWJlcmRhdGEiLCJhIjoiY2pudzRtaWloMDAzcTN2bzN1aXdxZHB5bSJ9.2bkj3IiRC8wj3jLThvDGdA';

// Initialize mapbox map
const map = new mapboxgl.Map({
  container: 'map',
  style: 'mapbox://styles/mapbox/satellite-v9',
  center: [116.3655, 39.9226],
  zoom: 13
});

// Create a mapbox-compatible deck.gl layer
const myDeckLayer = new MapboxLayer({
  id: 'my-scatterplot',
  type: Tile3DLayer,
  data: '/REST/System/TENANTBASE/spatial/V1.0/SpatialService/3DTileService/LOCAL/Cesium/Projects/DY/DEFAULT/tileset.json',
  // loader: loaders.CesiumIonLoader
});

// Insert the layer before mapbox labels
map.on('load', () => {
  map.addLayer(myDeckLayer);
});

Error Info

image 0e1452b87de37354afe51c4b6396bdf

CMPT FILE

NoLod_20.cmpt.zip

HTML Environment

.  script src="https://unpkg.com/deck.gl@latest/dist.min.js" 
.  script src='https://api.mapbox.com/mapbox-gl-js/v2.6.0/mapbox-gl.js'  
.  link href='https://api.mapbox.com/mapbox-gl-js/v2.6.0/mapbox-gl.css' rel='stylesheet' 
ibgreen commented 2 years ago

@naranakula Thanks for reporting.

Wwe implemented support for parsing composite tiles in loaders.gl but AFAIK we never came across any tilesets in the wild that actually contained composite tiles so we never implemented rendering support in the 3D tile layers.

Adding rendering support for composite tiles is probably easy, though I am not sure if the folks working on I3S and 3D Tiles would be able to prioritize it. They are mainly active in the loaders.gl repo, so recommend also opening a bug there and link to this issue.

Is the tileset you shared open? Would you be willing to contribute it to e.g. the deck.gl-data repo?

Without a decent composite tileset that we can test and use in examples it will be hard to support and maintain this feature.

(Alternatively you could of course regenerate your tileset without composite tiles.)

@belom88 @dryabinin-actionengine