Haven-King / myron

An OBJ loading library for the fabric ecosystem
MIT License
27 stars 9 forks source link

[Suggestion] GL Transition Format support #1

Open valoeghese opened 3 years ago

valoeghese commented 3 years ago

GLTF and its binary form are great, modern object formats that are 200% superior to obj. I am proposing this format be available to use.

I know what you're asking... why not just convert to OBJ? Simple. OBJ doesn't support mesh animations. GLTF does.

Haven-King commented 3 years ago

I'd be open to adding such a format. Looking at the reference guide, it seems like it would be doable to implement the infrastructure for handling the mesh element and below. Skins and animations are going to be much more difficult and require me to do a lot more research. Right now, with static OBJ's, everything can be represented as a baked model. That would obviously not be the case for animated models, and it's not immediately obvious to me what the best solution would be there.

hYdos commented 3 years ago

have you considered using the Assimp library? it handles model loading for you and is quite useful.

Haven-King commented 3 years ago

I would likely use a library of some kind for the actual model loading, yes. That still doesn't really help answer the question of how I'd bridge the gap between GLTF and Mojang's rendering abstractions that would be necessary for animated models. I could add support for static models in a weekend, probably.

valoeghese commented 3 years ago

Also if you do gltf make sure to support the binary version (which often uses the .glb extension). I have some models in that format that would be cool to use.