-
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: specifying compression extensions #230
Comments
@kmammou you're the compression expert, please let me know what you think. thanks. |
thought about some issues with this design...:
|
Comments on the schema: "bufferView_708": {
"compression" : {
"type": "Open3DGC",
"extras" : {
"mode" : "ascii"
}
},
// ...
}
"bufferView_708": {
"compression" : {
"Open3DGC" : {
"mode" : "ascii"
}
},
// ... As for when to decompress, we need to keep the client really simple. Perhaps we could have a top-level property that is a dependency graph (created at conversion time) of all the bufferViews to decompress. Then, a bufferView without a |
|
Thought, we discussed that in issues before, having the Open3DGC property right away breaks a bit the "flow" of the implementation. Because developers needs to retrieve the keys for the object in the first place, so like for |
Can you provide a more complete schema example? Right now, it is very easy for a client to create GL buffers by just inspecting the glTF buffer views. We should strive to keep it as close to this as possible. Since an asset can have some compressed and some uncompressed buffer views (right?), it sounds like this is going to get messy:
Step 2 feels error prone (we strive to be fast by default) and a lot of pointer chasing. How can we keep this as streamlined as possible and still allow for the decompression dependencies? |
I'd like to resolve this next week. Will propose something as early as possible. |
Sorry for the delay, I really meant to continue this proposal earlier… This new iteration was made taking into account feedback from @pjcozzi (which I fully agreed on).
How should a mesh or accessor be processed by the compression codec is another more specific discussion.
In the following schema example
To know “where” to uncompress data, the referred It also means that a buffer can be a target, so |
Thinking more about this, there are 2 issues |
Looks promising. When decompression targets a
This isn't clear. Can you provide an example? |
@kainino0x have you reviewed this discussion in detail? Can we now close this as duplicate with #398? |
I talked with @kainino0x and we are going to continue all mesh compression discussion in #398. |
As mentioned in the proposal in #398, I don't want to create any sort of set structure for mesh compression extensions.
|
As a high-level guidance this proposal reuses some concepts learned from GL APIs and extend them to mesh compression:
Notes:
For mesh compression the entities we want to compress - wether they are vertices or indices - are streams of float, int…. can be interdependent/connected and thus all needed at the same time to be able to decompress, but for more flexibility they will appear as separate streams, each represented as an
accessor
. Depending on cases, it is the extension itself that should specify the info that is required (for instance if indices are required when decompressing vertices to get connectivity info).This proposal covers the compression of:
note: morphing will come later, and should be heavily based on same principles.
In animations accessors contains all the datas and all streams can be compressed separately without dependency. (not connectivity info needed)
The compressed accessor is just declared like any other accessor...
It is just when accessing the bufferView that we figure that we have to decompress it:
We have introduced the
compression
property. It hold:type
of compressiontype
of compressionThe
bufferView
indicates thebyteOffset
andbyteLength
to be read from compressedBuffer to decompress the datas.As mentioned earlier meshes need connectivity info, so one potential issue with the above definition would be to attempt to uncompress a datas "too soon", e.g when reading the glTF asset if one attempts to decompress bufferViews regardless of the context.
So to prevent this, we either can:
bufferView
withcompression
should never be decompressed without context (if not access via amesh
oranimation
).autonomous
(or whatever better name...) property in thecompression
property, so that we know if bufferView can be uncompressed right away.That's for the general idea. Based on feedback, implementation will start and iterations are likely to happen after a first pass...
The text was updated successfully, but these errors were encountered: