Skip to content
This repository was archived by the owner on Dec 22, 2023. It is now read-only.

Added sample models for Draco_mesh_compression_extension #116

Conversation

fanzhanggoogle
Copy link

@fanzhanggoogle fanzhanggoogle commented Sep 7, 2017

Hi,

This PR adds sample models for usage of KHR_draco_geometry_compression. These models are created using COLLADA2GLTF. Please see the glTF-Draco folder in each model folder. The models could be loaded by modified ThreeJS GLTF loader.

Here's preliminary compression result on the meshes of sample models:

Comparison on geometries (mesh/primitive only)

Model Name Total Geometry Size (byte) Compressed Size (byte) Compression Ratio
2CylinderEngine 1794612 183530 9.778303275
Avocado 23580 3988 5.912738215
BarramundiFish 128208 17448 7.348005502
BoomBox 207816 27651 7.515677552
Box 648 160 4.05
BrainStem 2009628 167491 11.9984
Buggy 7745988 692824 11.18031131
CesiumMan 211320 17535 12.05132592
CesiumMilkTruck 108144 14785 7.31444
Corset 662184 83635 7.917546482
Duck 102040 11354 8.987141096
GearboxAssy 4915704 423307 11.61262157
Lantern 231324 28535 8.106676012
Monster 48984 6664 7.350540216
ReciprocatingSaw 3496764 333415 10.48772251
RiggedFigure 19296 2830 6.81837
RiggedSimple 5736 772 7.430051813
VC 669786 152188 4.401043
WaterBottle 149412 15146 9.864782781

Comparison on glTF files (including texture, gltf file and other data)

Model Name Uncompressed GLB File Size (byte) Compressed GLB File Size (byte) Compression Ratio
2CylinderEngine 1838084 230056 7.989724241
Box 1664 1240 1.341935484
BrainStem 3195280 1357816 2.35324963
Buggy 7885636 845776 9.323551389
CesiumMan 491700 297696 1.65168494
CesiumMilkTruck 542172 449056 1.207359438
Duck 120484 29768 4.047433486
GearboxAssy 4958788 470248 10.54504857
Monster 327700 285204 1.149002118
ReciprocatingSaw 3562996 405476 8.787193323
RiggedFigure 50092 33416 1.499042375
RiggedSimple 11072 6004 1.844103931
VC 3086448 2584244 1.194333043

For geometry part of data, the extension has a good compression ratio around 9X in average. But we are aware of that if comparing the entire glTF assets (e.g. in glTF-Binary format), the sizes of some models don't have significant reduction (in average ~3X compression). That's mainly because the animation data and texture image is a big part of some assets which the extension doesn't compress. We have plans to work on at least compressing the animation data as another extension in the near future.
Any feedback is very welcomed! Thank you!

@pjcozzi
@lexaknyazev
@FrankGalligan
@ondys
@donmccurdy
@jbrettle
@bghgary
@zellski

@pjcozzi
Copy link
Member

pjcozzi commented Sep 8, 2017

Really awesome, thanks @fanzhanggoogle! This will be a big help to engine devs.

For the Total Geometry Size (byte) column, are these gzipped?

For the Uncompressed GLB File Size (byte) column, would it be better to report these numbers gzipped? For texture-heavy models, they may not be much different since jpg will not gzip well.

Animation compression in the future will be amazing! 😀

@bghgary let us know how tests go with BabylonJS.

@donmccurdy
Copy link
Contributor

@fanzhanggoogle do these need to be regenerated with the specification version of the Draco encoder? I'm getting errors (THREE.DRACOLoader: Decoding failed: Failed to decode geometry data.) after updating to the _gltf versions of the decoder.

@FrankGalligan
Copy link
Contributor

FrankGalligan commented Jan 26, 2018 via email

@FrankGalligan
Copy link
Contributor

For posterity most of the files were compressed with these settings:
--draco.quantizePosition 10 --draco.quantizeNormal 8 --draco.quantizeTexcoord 8 --draco.quantizeColor 8 --draco.quantizeSkin 10

@bghgary
Copy link
Contributor

bghgary commented Feb 13, 2018

Should we close this given #145 is now merged?

@donmccurdy
Copy link
Contributor

Should we close this given #145 is now merged?

👍

@donmccurdy donmccurdy closed this Feb 13, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants