-
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
EXT_mesh_manifold #2286
EXT_mesh_manifold #2286
Conversation
I am quite interested in this. Will give it a look. |
Interesting. Does there need to be any harmony between this extension and the manifold requirements placed by We already have a ratified extension with a parameter ( |
@emackey Yeah, I think they'll work just fine together. In the volume extension I believe manifoldness is not required (or even defined), but simply recommended. This extensions would be a nice pairing to ensure that manifoldness in a strict way if desired. Having recently tested a bunch of glTF sample models, I can tell you most of the volume ones don't actually pass this manifold check, which isn't really a surprise or a problem per se. |
@elalish You're right, the volume extension doesn't define what "manifold" means. But it is a normative requirement that when |
Yeah, that seems fine. I'd put the distinction this way: the volume extension wants the mesh to be watertight geometrically, since that's all renderers care about. This extension requires manifoldness topologically since that's what's required for computational algorithms. The classic case is a sharp crease in the normals - the triangles butt up against each other, so it's perfectly fine for volume, but since the verts themselves are duplicated and not associated, it can't be topologically manifold without this extension. |
If gltf transform can apply the manifold extension to valid gltfs in both optional and required mode, that would be amazing for the use case of ensuring a manifold supply-chain from input to output. |
@lexaknyazev Would you be so kind as to check my extension spec? I've verified that it's working well for round-tripping the data, but I'm not so familiar with JSON schema. |
@lexaknyazev Do you know why the test failed? I have no idea what it's checking. Also, this is ready for a second review. |
@elalish Looks like the tests passed on the most recent commit. |
Okay, I've updated my gltf-io.ts with documentation and it's now able to handle different numbers of properties per primitive and such. I should probably publish it to npm. Meanwhile, that is now allowing manifoldCAD.org to export GLBs with this extension that all pass the Khronos validator. For a round-trip, you can try https://manifoldcad.org/make-manifold where you can upload a GLB with this extension to verify it is in fact manifold, or a GLB without this extension and it will find any meshes that are close to manifold and |
My understanding is that as soon as there are two independent implementations of an |
I also just saw https://github.com/KhronosGroup/glTF/tree/main/extensions#naming - should I rename this to |
I am interested in doing gtlf import for jscadui and jscad, but the problem is that it will take a long time until I get to it. I would also likely use |
There are some elements of the process that are not perfectly pinned down yet, and I'm omitting some details - the following is an attempt of a very short tl;dr: The intention of the Whether an extension specification is merged depends more on the "maturity" of the extension, and whether it has been thoroughly reviewed (some of this is hard to quantify...) The requirement for "two independent implementations" is indeed a condition for an extension being ratified (but this could be done for
I'm not aware of a clear definition of what 'a second implementation' means. But I could imagine that an implementation of the extension in glTF-Transform could count as an 'implementation' - iff it is not solved with manual twiddling in raw JSON objects, but indeed an extension implementation in the spirit of the library. (This concept of 'two implementations' should be defined more clearly...) |
I wouldn't push this extension for ratification - glTF is primarily about rendering, while this extension is for CAD/3D printing workflows that are not normally the core users of glTF.
It would be great to have some "next steps" on this. There aren't yet two independent implementations, but there is an open source one that reads and writes with a bunch of tests. Pretty much the only concern I have left about it is the name. It would be nice to point people to a published spec to encourage them to implement. |
@elalish, I'd be interested in implementing this. |
@alteous Great, let me know if you have any questions for me. How do you plan to make use of it? |
+1 for |
I should have clarified, we would export the extension data from our modelling app: https://kittycad.io/modeling-app |
Okay, I updated the name here, along with my implementation: elalish/manifold#630 since I'm pretty sure we're the only one so far. @emackey, merging is only blocked until there is an approving review - would you feel comfortable? |
@hrgdavor we should just publish my |
Yes I am interested, I think at least few more people that are experimenting with manifoldjs outside of jscad. |
extensions/2.0/Vendor/EXT_manifold/schema/glTF.EXT_manifold.schema.json
Outdated
Show resolved
Hide resolved
extensions/2.0/Vendor/EXT_manifold/schema/glTF.EXT_manifold.schema.json
Outdated
Show resolved
Hide resolved
extensions/2.0/Vendor/EXT_manifold/schema/glTF.EXT_manifold.schema.json
Outdated
Show resolved
Hide resolved
extensions/2.0/Vendor/EXT_manifold/schema/glTF.EXT_manifold.schema.json
Outdated
Show resolved
Hide resolved
extensions/2.0/Vendor/EXT_manifold/schema/glTF.EXT_manifold.schema.json
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the helpful reviews - I believe I've addressed all the comments.
extensions/2.0/Vendor/EXT_manifold/schema/glTF.EXT_manifold.schema.json
Outdated
Show resolved
Hide resolved
extensions/2.0/Vendor/EXT_manifold/schema/glTF.EXT_manifold.schema.json
Outdated
Show resolved
Hide resolved
extensions/2.0/Vendor/EXT_manifold/schema/glTF.EXT_manifold.schema.json
Outdated
Show resolved
Hide resolved
extensions/2.0/Vendor/EXT_manifold/schema/glTF.EXT_manifold.schema.json
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like all of my feedback was addressed here.
Looks like we're official now - thanks all! Let's exchange some solid geometry! |
* first draft * addressing feedback * update name * rename folder * addressing feedback * optional sparsity * further simplifications * fix typo
As the long ago spec editor of 3MF, I realized that a small glTF extension would get us full interoperability with solid-modeling workflows. I'm thinking
EXT
makes sense here since the point is certainly to transfer these files between different software, but this extension is a bit niche as pure rendering workflows have little reason to care. However, implementation is also nearly trivial on the consuming side, as this extension puts the onus on the producer to create a more constrained file.I don't have my Google hat on for this one - this is related to my side project, Manifold, an open-source robust mesh geometry kernel. I have implemented reading and writing of this extension using @donmccurdy's excellent
gltf-transform
library. You can test it live here.Though I've been working with Khronos here for several years, I've never proposed an extension myself before, so I'd love any feedback on how best to proceed with this.