-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draco mesh/point compression extension for glTF #5120
Comments
Also, instead of branching off of master, use this branch that is being updated to support glTF 2.0 (and still 1.0 by converting to 2.0 on the fly): #4808 |
That sounds a good plan to validate Draco extension and a good way to promo it :) |
Sounds great @fanzhanggoogle! Ping @lasalvavida if you have any questions about the COLLADA2GLTF code. |
Draco sample models: KhronosGroup/glTF-Sample-Models#116 |
@lilleyse can you please connect with @AnimatedRNG to come up with a detailed Draco roadmap and to show him the relevant parts of Cesium's glTF loading code? High-level roadmap is something like:
Please open incremental pull requests into the draco-master branch. Resources
|
@AnimatedRNG - here's some notes about glTF and some ideas for getting Draco support into Cesium: The general structure for a glTF is: scene -> node -> mesh -> primitive -> attributes -> accessors -> buffer view -> buffer A scene contains a list of nodes. A node contain a model matrix and a reference to a mesh. A mesh contains a list of primitives, where each primitive is defined by a material, vertex attributes, and indices. Each attribute points to an accessor, which is an object that defines how to interpret buffer data for that vertex attribute (maps to the concept of glVertexAttribPointer). The accessor points to a buffer view which is some range within a buffer. In Cesium, a The Draco extension is also defined per-primitive. When the extension is present, ignore any data that might be pointed to by the primitive's attributes and indices. Instead the attribute and indices are contained within a chunk of data referenced in the extension's I think the easiest approach for getting this into Cesium will be: Add a function after: That function should check if the extension exists. If it does, loop over each mesh and each of its primitives (use Now edit the glTF so that everything points to the decoded data correctly. First add a new buffer for the decoded data to This approach could also be its own self-contained stage in |
Add to #5120 (comment):
|
@lilleyse as you sure about your approach? It makes sense for |
I see your point. It shouldn't be too hard to use intermediate data structures instead.
After looking closer I noticed this step isn't needed. The draco buffer view target will not be marked as
Instead of this approach, we can probably circumvent most of the gltf asynchronous loading code and just create vertex and index buffers directly from the decoded data. Look at the The last step is making sure @AnimatedRNG let me know if anything is unclear. There may be some edge cases I haven't forseen. |
@ggetz @lilleyse here is the three.js implementation by @donmccurdy: donmccurdy/three.js#6 |
@ggetz @lilleyse Draco sample models: KhronosGroup/glTF-Sample-Models#145 |
Updated the task list. Extension loading in Cesium added in #6191 |
@ggetz OK to close? Or is there anything left here: #5120 (comment) |
See KhronosGroup/glTF#874
@fanzhanggoogle if you are able to contribute this or start a prototype, it would be very much appreciated. Here's some tips:
Let us know if you need more help.
Part of #3241, #4678, and CesiumGS/3d-tiles#188
The text was updated successfully, but these errors were encountered: