CesiumGS / cesium

An open-source JavaScript library for world-class 3D globes and maps :earth_americas:
https://cesium.com/cesiumjs/
Apache License 2.0
12.8k stars 3.46k forks source link

3DTILES_multiple_contents no supports more than 6 contents #10468

Open engine5d opened 2 years ago

engine5d commented 2 years ago

3DTILES_multiple_contents no supports more than 6 contents, except change the cesium static setting: Cesium.RequestScheduler.maximumRequestsPerServer = 8;

, or the tile cannot load. But this extension schema link no contains this limitaiton.

"3DTILES_multiple_contents": { // 7 contents "contents": [ { "uri": "B_0.b3dm" }, { "uri": "I_0_0.i3dm" }, { "uri": "I_0_1.i3dm" }, { "uri": "I_0_2.i3dm" }, { "uri": "I_0_3.i3dm" }, { "uri": "I_0_4.i3dm" }, { "uri": "I_0_5.i3dm" } ] }

lilleyse commented 2 years ago

@engine5d thanks for the bug report. This is a CesiumJS limitation, not a 3D Tiles spec limitation.

@ptrgags you might be able to provide more details here. I remember this being a known limitation with the multiple contents implementation. Was this documented in the code or in a github issue?

ptrgags commented 2 years ago

I found some comments in Multiple3DTileContent.js:

https://github.com/CesiumGS/cesium/blob/main/Source/Scene/Multiple3DTileContent.js#L345

(EDIT by javagl: I hope it's OK to add the permalink to this note here )

Essentially due to race conditions with request scheduling, apparently it was possible to leak typed arrays somehow (I'm rusty on the details, it was over a year ago), so it tries to schedule all the requests at once with RequestScheduler. Since RequestScheduler caps the number of requests per server, if you need many contents in a single tile, yes, you'd have to set RequestScheduler.maximumRequestsPerServer to a higher value.

lilleyse commented 1 year ago

Came up again in https://github.com/CesiumGS/3d-tiles/issues/723