markcwm / openb3d.mod

OpenB3D BlitzMax wrapper, see openb3d.docs for examples
18 stars 7 forks source link

Request: modern mesh format #13

Open Hezkore opened 5 years ago

Hezkore commented 5 years ago

It's hard to use OpenB3D without any modern model/mesh format support. Blender for example, which is the most commonly used tool today, exports to things like .fbx, .obj, .glb/.gltf and OpenB3D supports none of them.

.glb/.gltf 2.0 is a fairly straight forward format, well documented and supports animations: https://www.khronos.org/gltf/ (the .glb file format is a binary form of glTF that includes textures instead of referencing them as external images)

.obj is also a very straight forward, static, simple and commonly used file format.

Kippykip commented 5 years ago

I've been using this plugin for Blender, seems to work alright. Just keep in mind to set the blender animations "first frame" to 1, as exporting it when set to 0 crashes OpenB3D/Blitz3D/MiniB3D.

https://github.com/Kippykip/B3DExport

Hezkore commented 5 years ago

I've tried the original, but it doesn't work on any newer Blender versions. And that will always be the case; it'll need to be constantly updated. So it's more of a workaround and not really a fix. .gltf and .obj is supported by Blender straight out of the box, so they'll always be updated and work. The real fix would be to update OpenB3D to support newer formats.

markcwm commented 5 years ago

Hello, yes I quite like the sound of gltf but obj isn't a good format (no animation) but it would do I guess, as in monkey minib3d, I have been thinking ms3d would be good (and md3 as this is in Dreide) but it all depends on finding something I can port, many loaders are too obfuscated like Assimp and I haven't had the time to research this yet as I'm busy moving house so the project is on hold for maybe as long as 6 months, if you want to contribute a loader or whatever I'd be prepared to pay you for time spent but that's all I can offer for now.

Hezkore commented 5 years ago

.obj may be very simple, but it's still widely used and it's an easy to understand format and great for static meshes. The biggest downside i guess is that it only supports a single UV map per object.

And yes, .gltf is great and would probably be the best format to aim for. Monkey 2 has a .gltf and .glb loader, which might be easiest to port over.