Closed Insopitus closed 3 months ago
As far as I know these legacy formats are from pre release (version 0) variants of the 3d tiles specification which are not supported. Even if the legacy header did parse the gltf contents contained within the file are also a legacy 1.0 version which the three.js library cannot parse, anyway:
"asset":{
"generator":"infoearth",
"premultipliedAlpha":true,
"profile":{"api":"webgl","version":"1.0.2"},
"version":1
}
You'll have to upgrade your files if you'd like to use them with this project.
Would there be options to use custom loaders for parsing and decoding rather than the default ones? I have written a gltf 1.0 parser and b3dm parser that supports legacy headers. For now, I want to migrate to 3DTilesRendererJS but still need to support the legacy model files. I could modify the source code of 3DTilesRendererJS to meet the requirements. It would be better to directly use the library so it's easier to keep up with future updates though.
I'll have to think about this - maybe supporting the ability to get a loader constructor from LoadingManager.getHandler
? But generally I don't love the idea of adding a feature just to enable support long-deprecated, pre-release file formats. Even the newer B3DM version and the other original 3d tiles geometry formats (PNTS, I3DM, CMPT) are deprecated in favor of glTF. Is there no Cesium tool or something that will migrate a format to a newer version of the format?
Yes, there actually is one by the Cesium team.
But the upgrade
failed for our models. Still looking for the reason why it doesn't work though.
Also, we have lots of legacy format models stored here and there. Migrating them all would be painful, not to mention the possible side-effects in the migration.
The LoadingManager.getHandler
approach looks neat.
The
LoadingManager.getHandler
approach looks neat.
If you'd like to make a PR that implements this solution we can see how it looks and possibly get it added.
Okay, I will give this a try next Monday.
Describe the bug
My project uses some legacy old b3dm format (still version 1 though) which 3DTilesRendererJS failed to parse. It throws:
Uncaught RangeError: Invalid typed array length: -1179912019
. I did some research and found out it is because of the legacy header the b3dm models use. The cesium repository has some code to handle it, which I didn't find here in 3DTilesRendererJS.To Reproduce
Steps to reproduce the behavior:
B3DMLoaderBase