Skip to content
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 encoding #207

Open
greenbrettmichael opened this issue Sep 13, 2019 · 9 comments
Open

Draco encoding #207

greenbrettmichael opened this issue Sep 13, 2019 · 9 comments
Labels

Comments

@greenbrettmichael
Copy link

This source file implements draco encoding,

https://github.com/GPUOpen-Tools/Compressonator/blob/master/Compressonator/Applications/_Plugins/Common/gltf/tiny_gltf2.h

what is the relationship between these two projects?

is it possible to integrate a similar functionality in this project?

@syoyo
Copy link
Owner

syoyo commented Sep 14, 2019

what is the relationship between these two projects?

There is no relationship. I didn't know that Compressonator uses customized version of tinygltf.

is it possible to integrate a similar functionality in this project?

Yes, you can backport draco encoding to tinygltf. PR is appreciated!

@tapika
Copy link

tapika commented Sep 20, 2019

Compressonator solution seems to be outdated, non-buildable and non-working.

What I have checked through - draco compression is disabled by default, after hacking projects and enabling draco, gltf refuses to load "JOINT_0" attributes, and also does not saves them.

So Compressonator project is outdated, please don't analyze it any further.

But @syoyo - do you have any idea when we could have draco encoder support added into tinygltf.
Would be interested in that one even if it's in early stage.

tiny_gltf2.h introduces so many changes changes in diff wise, so I'm not even sure if it's wise to go using that implementation (which is also non working).

@syoyo syoyo added the extension glTF extension label Sep 21, 2019
@syoyo
Copy link
Owner

syoyo commented Sep 21, 2019

@tapika glTF-Maya-Exporter's SaveToDraco code would be a good reference.

https://github.com/lighttransport/glTF-Maya-Exporter/blob/61116bc6950d270b716969a4236e3c74ea77b751/src/kml/SaveToDraco.cpp#L1

glTF-Maya-Exporter creates glTF with draco compression with picojson library. It creates valid glTF with draco-compressed data.

@Ben-Mack
Copy link

Ben-Mack commented Jul 7, 2021

+1 for this. I'm using gltf-pipeline and it is quite slow on mesh with several million tris (might take an hour or more on ryzen 5950x), really hoping tinygltf directly using the c++ version of encoder helps speed it up multiple times.

@syoyo
Copy link
Owner

syoyo commented Jul 7, 2021

@Ben-Mack I think it would be enough fast just using tinygltf(or C++ glTF tool) even without draco compression for meshes with millions of triangles.

https://github.com/syoyo/tinygltf/blob/master/examples/build-gltf/create_triangle_gltf.cpp is an example to build glTF from a scratch in C++.

@Ben-Mack
Copy link

Ben-Mack commented Jul 7, 2021

Actually the file is for serving online so I must use Draco compression to keep loading speed reasonable.
Really looking forward to the implementation of Draco encoder in tinygltf.
If so, tinygltf will be the first cpp lib can compress glTF Draco, performance-oriented, which is clearly missing on the market.

@syoyo
Copy link
Owner

syoyo commented Jul 7, 2021

@Ben-Mack There is a Draco compression code with TinyGLTF(I have updated the link since previous link URL was broken) #207 (comment)

https://github.com/lighttransport/glTF-Maya-Exporter/blob/61116bc6950d270b716969a4236e3c74ea77b751/src/kml/SaveToDraco.cpp#L1

You can implement Draco compression based on this and send PR. Contribution is always welcome!

@sariug
Copy link

sariug commented Sep 24, 2022

still open I guess? Any progress on this? Or should i also check it myself ? :)

@syoyo
Copy link
Owner

syoyo commented Sep 24, 2022

@sariug No progress. You can contribute Draco encoding support to TinyGLTF!

Repository owner deleted a comment from jennyzhang211 Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants