cocos / cocos-engine

Cocos simplifies game creation and distribution with Cocos Creator, a free, open-source, cross-platform game engine. Empowering millions of developers to create high-performance, engaging 2D/3D games and instant web entertainment.
https://www.cocos.com/en/creator
Other
8.23k stars 1.94k forks source link

Investigate model compression integration #13999

Closed iwae closed 1 year ago

iwae commented 1 year ago

Use Case

In other engine cases(https://static.ssl.jimingkeji.com.cn/popmart_show/?source=fma&sceneId=107003#/home), use Draco can significantly reduce the mesh/animation size.

Problem Description

Currently, the mesh stored with binary costs much more storage compared with Draco compressed file's size, which may could be improved with Draco compression.

Proposed Solution

No response

How it works

No response

Alternatives Considered

Moreover, by using Draco loader with wasm+worker, which increases its decoding speed as well, which has been widely used in Cesium for large projects(http://ecnuzlwang.top/draco/ )

Additional Information

No response

pandamicro commented 1 year ago

Could be a solution for https://github.com/cocos/cocos-engine/issues/13998

pandamicro commented 1 year ago

There is a very good comparison in this article https://juejin.cn/post/6931954784018628621 So we should include EXT_meshopt_compression as a candidate. I modified the title to model compression integration, the output of this issue should be a detailed solution, executable tasks and plan.

iwae commented 1 year ago

There is a very good comparison in this article https://juejin.cn/post/6931954784018628621 So we should include EXT_meshopt_compression as a candidate. I modified the title to model compression integration, the output of this issue should be a detailed solution, executable tasks and plan.

I would suggest to use MeshQuan with 2 reasons, 1st the ASM of meshOpt performs unstable at some platforms, 2nd some platforms don't support WASM. So with the choice of MeshQuan, it would be a more completable solution, since it simply just compresses the float data without changing the data structure, which does not require special uncompress methods/libs with it ( and also it mays save several tens of KB)