3d-tiles-validator icon indicating copy to clipboard operation
3d-tiles-validator copied to clipboard

glTF 2.0 Draco compression

Open benjaminabb opened this issue 6 years ago • 8 comments

Is it possible to apply draco compression to glTF 2.0 b3dms?

When using the draco branch, I just get "Binary glTF version is not 1". With the 2.0-tools branch, this error occurs:

$ node ./bin/3d-tiles-tools.js optimizeB3dm -i "[...].b3dm" -o ./output/optimized.b3dm -f --options -q [...]\3d-tiles-tools\tools\lib\isJson.js:34 }); ^ SyntaxError: Unexpected token )

And after deleting the faulty line 34, the output is also "Binary glTF version is not 1". Am I doing something wrong?

benjaminabb avatar Jun 28 '18 14:06 benjaminabb

I think the problem is the version of gltf-pipeline in npm only works for glTF 1.0 models. We are getting very close to merging the gltf-pipeline 2.0 branch into master, after which npm will be updated and 2.0-tools can get finalized and merged.

I did push a fix for that first error though - it was some stray temporary code.

If you need a workaround in the meantime, you might want to use b3dmToGlb to extract the glb, run it through gltf-pipeline with -d (Draco), then run glbToB3dm.

lilleyse avatar Jun 28 '18 15:06 lilleyse

All right, then I'll just wait, since I would lose Metadata with the workaround. Thanks for your reply!

benjaminabb avatar Jun 29 '18 09:06 benjaminabb

Ah yeah, that's true. I'll update this post once 2.0-tools is merged.

lilleyse avatar Jun 29 '18 14:06 lilleyse

@lilleyse Will I be able to use version 2.0 to compress point cloud in 3D tiles format (*.pnts) using this tool?

cherukumilli avatar Aug 18 '18 03:08 cherukumilli

@cherukumilli That would need to be a new stage not part of the 2.0-tools branch. We don't have plans for it at the moment.

lilleyse avatar Aug 18 '18 17:08 lilleyse

@lilleyse - Can you please share how the Cesium team use draco encoding of their 3D tiles (both mesh (.b3dm files) and point clouds (.pnts files)?

I am trying to compress our 3D tiles (both .b3dm and .pnts files). Any help would be greatly appreciated.

cherukumilli avatar Aug 18 '18 18:08 cherukumilli

@cherukumilli Do you find your way to use draco encoding 3D tiles(.b3dm files) ?

I am trying to encode my .b3dm files, but not find the right way yet.

xiaohe avatar May 20 '19 09:05 xiaohe

Hi, I'm also interested by this feature; do you plan to implement it in the near future?

jailln avatar Jul 07 '20 16:07 jailln