f3d icon indicating copy to clipboard operation
f3d copied to clipboard

assimp supported formats enabled by default

Open incompetentcoder opened this issue 10 months ago • 11 comments

Hello, thanks for f3d first of all! I have been playing around with assimp formats for some time and I found the following to be working fine without issue and easy to enable by default maybe? adding them to the xml and config and cmakelists isn't much work for sure but i haven't found a single failing model for the following formats:

  • md2
  • md3
  • pmx
  • vrm
  • smd

mdl is a bit trickier since there's many differend kinds of mdl and assimp does not support them all.

incompetentcoder avatar Mar 10 '25 02:03 incompetentcoder

adding them to the xml and config and cmakelists isn't much work for sure but i haven't found a single failing model for the following formats:

Nice! To be fair we focused on specific formats and I dont thing we ever tried these formats. If you want to add them to supported formats, you are very welcome to do so! Please open a PR with the changes.

Please note you will also need to find a small data to test with and add a test, as well as finding out the right configuration for the format.

mdl is a bit trickier since there's many differend kinds of mdl and assimp does not support them all.

As long as assimp report an error and does not crash, its fine I suppose.

mwestphal avatar Mar 10 '25 05:03 mwestphal

Related to #38

mwestphal avatar Mar 10 '25 05:03 mwestphal

BTW we have a discord if you want to discuss the way forward: https://discord.f3d.app

mwestphal avatar Mar 10 '25 05:03 mwestphal

mdl is a bit trickier since there's many differend kinds of mdl and assimp does not support them all.

If this Quake MDL ?

It is currently being adressed here: https://github.com/f3d-app/f3d/pull/1591

mwestphal avatar Mar 10 '25 06:03 mwestphal

Ah no i just meant .mdl as an extension is murky because you have QMDL and HLMDL which is then split again in source1 mdl and source2 mdl for valve source engine versions - assimp also only supports quake mdl - but if that's handled on the vtk side i guess it really doesn't need to be enabled on the assimp plugin side then!

incompetentcoder avatar Mar 10 '25 12:03 incompetentcoder

Good! Then I take it that you will try to expose the formats you listed ? @incompetentcoder

mwestphal avatar Mar 10 '25 14:03 mwestphal

I simply added them to the formats.xml and assimp.json and cmakelists - i haven't verified the mimetype information and smd probably needs z up in the config but here's the simple thing i just did to check

https://gist.github.com/incompetentcoder/2de014a6545a67a8b0cfbd4010940676

incompetentcoder avatar Mar 10 '25 19:03 incompetentcoder

Thanks! I meant to open an actual PR though, and to follow to contribution process: https://github.com/f3d-app/f3d/blob/master/CONTRIBUTING.md

What do you think ?

mwestphal avatar Mar 10 '25 20:03 mwestphal

Ah, I can fork and submit a PR, sure. Mostly my intention was just asking whether it's even an option to just enable more formats via assimp plugin or whether the goal is to provide more via f3d/vtk itself. I suppose it would be prudent to then have cmake flags to enable/disable all the assimp plugin formats individually and maybe test all formats assimp supports for whether they work and have a comprehensive list

incompetentcoder avatar Mar 11 '25 02:03 incompetentcoder

Mostly my intention was just asking whether it's even an option to just enable more formats via assimp plugin or whether the goal is to provide more via f3d/vtk itself.

Interestng approach but no, we dont plan to have assimp specific options to turn on or off formats. We want to provide well tested formats through assimp in f3d and in the f3d binaries we ship.

This is why we only enabled the one that mattered a lot and that we were able to test.

If you are able to test the format you mentionned and to provide good test file for CI, then its good to enable them!

mwestphal avatar Mar 11 '25 07:03 mwestphal