guillaumechereau / goxel

Goxel: Free and Open Source 3D Voxel Editor
GNU General Public License v3.0
2.8k stars 223 forks source link

Model 3D export #189

Closed bztsrc closed 3 years ago

bztsrc commented 4 years ago

Hi,

This patch adds support for exporting from Goxel into a new voxel format.

You haven't replied to issue #187, so I decided to go on the dependency-less route, implementing everything from scratch. A new file added under src/formats, that's all, should be straightforward to merge (I've also added the signed individual cla as you requested).

Really great editor, btw!

Cheers, bzt

bztsrc commented 4 years ago

Hi,

I'm just curious since I didn't get any response from you. Is this PR ok the way it is? Do I need to change something in the code? Just let me know.

Thanks, bzt

guillaumechereau commented 4 years ago

Sorry I didn't take much time to check your patch. Can you explain what is this new format? Is that something used in real world? I am mostly betting on the glTF2 format for exporting 3d model, so I would like to focus the effort on only supporting this one well. Of course obj/ply is also important.

bztsrc commented 4 years ago

Hi,

No worries! This is an engine and application neutral format to store 3D models. It is quite new, but used in more and more applications every day, mostly in home-made game engines. It is also supported by assimp and blender. I'm using Goxel to export voxel images into this format, and I had requests from others that they want to do so as well, hence the PR. You can find further information on it here: https://bztsrc.gitlab.io/model3d/ (click on Models, Geometry, then Notre Dame, that's a voxel model for example.)

I am mostly betting on the glTF2 format for exporting 3d model, so I would like to focus the effort on only supporting this one well.

The glTF2 is nowhere near adequate as this format :-) You'll never be able to load a glTF2 from a single file without tons of dependencies (json, png etc.). The good news is, no effort on your side required, the export is already implemented and tested, you just need to merge. Think of it as an alternative to VOX format (which is not glTF2 either, and also used by other applications).

If Goxel could export in M3D, then I could recommend it to my users as the best option for creating voxel images (they now use Magicavoxel and then m3dconv to convert from VOX to M3D).

Cheers, bzt

bztsrc commented 4 years ago

Any follow ups? Do I need to modify anything to get this PR accepted? Right now it is dependency-free and clean, well-tested, no effort required on your part (other than to merge).

As I've said, my users will never use glTF2, they want M3D. glTF2 is not suitable for engines, said Carmack, who am I to argue with him? For my Linux users, this is a non-issue as they have to compile Goxel anyway. But recently I'm getting more and more requests from Windows users too.

Cheers, bzt

guillaumechereau commented 4 years ago

Ni bztsrc,

Sorry I am not really interested in adding support for this format in Goxel as it is too niche at the moment. I have been thinking of adding plugin support for goxel. When this is done you should be able to add export for your format as a plugin.

bztsrc commented 3 years ago

More and more people are asking for this. So much that I really need this. Let's make a deal. If you accept this PR then in return I'll fix some of the file import/export issues with obj and vox files.

Deal?

Cheers, bzt