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

Separate meshIO from manifold bundles #128

Closed
elalish opened this issue Jun 4, 2022 · 6 comments · Fixed by #190
Closed

Separate meshIO from manifold bundles #128

elalish opened this issue Jun 4, 2022 · 6 comments · Fixed by #190
Labels
enhancement New feature or request

Comments

@elalish
Copy link
Owner

elalish commented Jun 4, 2022

meshIO is not really a core part of this Manifold library. It is the only part that depends on Assimp (a large, complicated dependency) and it is unlikely to fit into other libraries well, as they probably have their own mesh input/output anyway. I only included meshIO as a means to quickly test this library, but the functionality is lacking (no texture/property support for one thing). I don't want to focus on that, as it's a complicated area in its own right and others do it better. For C++, it's easy enough to not include that part, but for building bundles like WASM and Python, I think it's important to keep this separate.

I'm fine with either removing meshIO from these bundles to focus only on our core library, or if we find it to be really useful, then making a separate bundle for meshIO. There is no dependency between meshIO and manifold since they communicate via Mesh, so the separation should be pretty clean.

@elalish elalish added the enhancement New feature or request label Jun 4, 2022
@pca006132
Copy link
Collaborator

For testing, I guess we can just write a simple function to read/write ply files? We don't need to support the spec, just make sure that the output can be read by other 3D programs for debugging should be enough.

@elalish
Copy link
Owner Author

elalish commented Jun 4, 2022

I think meshIO is working fine for testing our C++. For WASM, I'd prefer to write a bridge to an existing library like three.js that already supports lots of 3D format I/O. For Python, a Blender integration is probably a good equivalent as suggested by @rsaccon, since that's another project with lots of 3D format I/O support. These integration bridges can serve as code samples for anyone who wants to integrate the library elsewhere.

@fire
Copy link
Contributor

fire commented Jun 4, 2022

https://github.com/ddiakopoulos/tinyply has some good support

https://github.com/nmwsharp/happly is great too. I have personally used nmwsharp's projects!

@makc
Copy link
Contributor

makc commented Jun 16, 2022

@elalish

For WASM, I'd prefer to write a bridge to an existing library like three.js that already supports lots of 3D format I/O.

as much as I love three.js, I would think this is a user's job to pick a js lib and use it? what they could use is a cpp file for embind that exposes basic Mesh and Manifold methods.

@elalish
Copy link
Owner Author

elalish commented Jul 26, 2022

This is now complete for web, since we have a WASM bundle that doesn't include meshIO and has an example linking it to three.js. I'm tempted to remove meshIO from the python bindings too, but that would only make sense if we could find an existing python library for 3D file import/export that we could hook into.

@elalish
Copy link
Owner Author

elalish commented Sep 1, 2022

I like the look of https://github.com/nschloe/meshio for a Python library for 3D file import/export. If I can manage to hook that up into our Python examples, then I'll remove our own export function from the bindings and remove the Assimp dependency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants