-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Proposal: Open3DGC mesh compression extension schema #398
Comments
Thanks for this detailed proposal, @kainino0x. I'm going to take a second pass through this, but here are my initial comments (all are minor):
Should
What about texture coordinates and application-specific attributes? Are they not really important to this spec since the decompressor returns each attribute in a separate array? |
I took a second pass through this, and have no new questions. This looks like a great start, and perhaps we will only have minor tweaks once we do the implementation. |
One comment regarding “Open3DGC … is designed to support meshes, but not animations.” The Open3DGC library could also be used to encode skinning/bone-based animations:
Morph animations could be compressed as follows:
|
@kmammou Sorry, I should clarify. I meant to say that this proposal does not support Open3DGC's animation compression. I will edit that paragraph. |
Oh. Thanks for the clarification :)! 2015-07-20 11:56 GMT-04:00 Kai Ninomiya [email protected]:
|
@kmammou do you have any other feedback on this proposal? |
Everything looks fine to me. On Mon, Jul 20, 2015, 17:27 Patrick Cozzi [email protected] wrote:
|
Thanks @kmammou. @kainino0x do you have a specific questions about the compression algorithm or libraries @kmammou may be able to help with? |
I have implemented a compressed glTF loader in Cesium using the above spec (that is, for now, without any support for animations). This implementation took about 4 hours of work on Cesium. Some of the glTF properties were unneeded (because they appear in the compressed file header), so I removed them (see gist changelog). |
@kmammou I was not able to load the binary Open3DGC format in Cesium using
because |
It seems that the decoded values are wrong. Is this problem specific to one 2015-07-27 11:21 GMT-04:00 Kai Ninomiya [email protected]:
|
@kmammou I see this with all of the models that I have tried with Open3DGC-binary. With Open3DGC-ASCII, everything works fine. Of course, it could be a problem with the converter, but I don't know how (we are using I did notice one comment in the converter (probably written by @fabrobinet?):
but I didn't understand why that comment was there; everything seems fine. |
(@pjcozzi @fabrobinet @tfili?) I have some general questions which are not closely related to compression, but which came up in implementation work.
Or, alternatively, to completely dissolve the
The former happens to match more nicely with Open3DGC and with sample data that I have been looking at. |
@kmammou Thanks! I will take a look at those and see if I can track down the difference. |
I'm open to changing this. Perhaps
I'm OK with either of @kainino0x's suggestions. The later is a bit cleaner if we can justify the simplified design doesn't remove useful structure from content, and implement it in the converter. @fabrobinet any insight into the current design? In practice, is it useful to have multiple Note that the alternative here is for this extension to require that all |
It is very important to match what you get in authoring tools. You typically have multiples primitives each associated with a material that are considered as a whole (the mesh). Please don't change this. |
@fabrobinet Thanks for the reply. I'm definitely fine with keeping multiple |
That is not true, you may have say 2 primitives: 1 with a material that is a plain diffuse color, 1 using a texture. In which case you end up with 1 primitive relying on texture coords(uv) attribute and not the other one. So it's that typically positions are always shared in a primitive it is not necessarily true for the other attributes. |
@fabrobinet I see. Although going from Blender to COLLADA to glTF that doesn't seem to happen, it certainly could in general. How about this: Would it be okay to require that no two primitives on the same mesh use different accessors for the same semantic? (This could still simplify the representation.) If we don't want to assume that generally, then I will still disable mesh compression for meshes which have more than one accessor for one semantic, and everything will be fine there. However, if there is no restriction on how primitives work, I still don't see how they add any expressiveness over just meshes. From an engine point of view, I imagine it would be nice to bind attributes once per mesh and draw once per primitive. But if primitives can have any attributes, then every attribute results in both binding and drawing. EDIT: found a case for which it probably makes sense to keep the current system: for meshes with more than 216 vertices, vertex data will have to be separate for each group of 216 vertices, which probably should each be a primitive of a mesh. Given this I'm fine with keeping it as it is |
Maybe will interest you: variant of implementation |
@smalcom very cool, did you test this with any loaders? Also, any chance you are interested in turning the current ideas into a full glTF extension? |
No, only with glTF.
yes, interesting. Let me some time, i prepare doc. |
Not sure what this means. Did you load the compressed model into any rendering engine?
Go for it! Awesome. |
load into assimp_qt_viewer |
Great discussion. Replaced by #874. |
mesh_compression_open3dgc
proposal & mock-upI have put together this proposal, with lots of Patrick Cozzi's advice, in order to try to solve the problem of how to specify and used compressed mesh data in glTF. This is based on the extension specification and implementation work of Fabrice Robinet, which is in turn based on the Open3DGC algorithm and library work by Khaled Mamou. It is designed to support meshes, but not animations.
This proposal should not require any changes to the core glTF specification, and most or all changes are within
"extensions"
objects. This avoids churn in the core specification, and also has future-proofing benefits in format flexibility: While the three libraries I've looked at (Open3DGC, OpenCTM, webgl-loader) all work similarly, there could easily be other libraries which would be very difficult to shoehorn into this structure.The semantics of this extension are also designed to provide a good design baseline for possible mesh compression extensions. Though I haven't thoroughly researched on the structure of other compression libraries, they should be able to use similar schemata. Some changes may be necessary to this extension schema, as it has not been implemented or formalized, but I will try to maintain structural compatibility with other compression libraries.
Please reply to this issue with any feedback you might have on this proposal.
(cc #208 #230)
Rendered (Gist for change tracking purposes)
The text was updated successfully, but these errors were encountered: