asny / three-d-asset

General input/output functionality for 3D assets
MIT License
35 stars 19 forks source link

FBX format (deserialize) #5

Open asny opened 2 years ago

melMass commented 1 year ago

I came to ask instructions on implementing custom "parsers", I did not look closely in an IDE, but by glancing on GH I'm not sure how the loaders resolve to one type or another. Could you give pointers?

Thanks, I just started using three-d and I love its flexibility

EDIT: Found the entry: https://github.com/asny/three-d-asset/blob/0850040c21bbc7f0d7354a5a98e2735da9b7a6b8/src/io.rs#L155-L183

Just not 100% sure about the wasm part but it seems to be handled at an higher level, anyhow I'll give it a go

asny commented 1 year ago

Thank you for the kind words 🙏 Sounds great you want to give it a go and yes, you found the right spot. And I think you should not worry too much about wasm. Of course there are some limitations on web (no threads for example) but if it works on native, it should be straight forward to get it to work on web.

melMass commented 1 year ago

Nice I got a very basic version working (no object transforms, no materials) using the fbxcel crate. I just found Amient's implementation: https://github.com/AmbientRun/Ambient/tree/main/crates/model_import/src/fbx It looks quite feature complete and I will take inspiration from it for the materials this weekend! I'll propose a PR then or early next week

asny commented 1 year ago

Super nice 💪 Sounds like a good plan! 🙂