Replies: 1 comment
-
@mikeemm Thanks for the nice diagram and description of the proposal, |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there, wasn't sure if this is something that should be proposed in a PR, so I thought I'd float the idea around here first.
Raylib currently supports loading models in various formats (OBJ, GLTF, and a few others). However, exporting only supports OBJ through ExportMesh(), and while said function is made to be able to be extended with other formats, it is restricted in a number of ways:
For OBJ, this means we can't pair exported meshes with an MTL file, which would also need to be generated separately. When implementing GLTF/GLB, it not only means we won't be able to include images in them, but even if we did, we also couldn't let the user choose the way data is to be included (embedded buffers or stored separately as .bin and .png/jpg). I don't know how it is for .m3d, .iqm and .vox, but I'd bet at least one of those will also be affected by these restrictions one way or another once they are implemented.
I think the way to get over these restrictions would be to...
Below's a rough idea of what this would look like (please excuse my tragic mockery of UML):
I personally need to implement more export functionality for the program I am working on, so I thought I might as well offer to build it directly in Raylib. This would however require adding new functions and restructuring an existing one, so I thought it'd probably be best to share my idea and get feedback before starting work on it. Obviously @raysan5 but I also want to see what other people think about it all. I understand model exporting is not a commonly used feature, but I feel that given the use of Raylib not just for videogame development but also for the creation of other kinds of graphical applications, it could greatly help those making programs in any way related to 3D model editing.
Anyway thanks for reading, have a great day!
Beta Was this translation helpful? Give feedback.
All reactions