Fix using AssetManager.loadModel() with .fbx file (previously, you should use SceneKey to load fbx model, now you can use any ModelKey, but model will be loaded without animations)
Added loader for new file format .fba which is text file format to wrap .fbx file and animations mapping, sample is:
#Use "#" at the start of line to add comments
#Fist not commented line is always model name, will be resolved from .fba file location
my_model.fbx
#All other lines are animations in format "<start frame> <end frame> <animation name> [layer name]", quote string if using spaces
0 40 run "BaseLayer"
You can load .fba simply buy using loadModel() function in AssetManager, all listed animations will be imported, so this is universal format with no special code needed.
I guess, some one should integrate it into SDK ā i donāt know how it is working, but changing jme3-plugins lib in sdk is not working ā still canāt import fbx (still uses blender) or fba files.
Nobody is getting the current SDK updates or uses the SDK as it is in trunk anyway, no need to rush there. First some people can test the importer via the engine.
Yes it does, but it is a bit tricky. You need to create file .fba with format i described 4 posts above, and simply load it as any other model by calling AssetManager.loadModel(āpath/to/model.fbaā).
@Eirenliel said:
Yes it does, but it is a bit tricky. You need to create file .fba with format i described 4 posts above, and simply load it as any other model by calling AssetManager.loadModel("path/to/model.fba").
Weāre girls, actually
By the way, have you heard about this project?
It converts FBX models to another format which is much easier to read. It does this via the official Autodesk FBX SDK. If youāre having issues loading some models, you can try to compare your results with this tool to see if thereās any difference and why.
@Momoko_Fan said:
By the way, have you heard about this project?
https://github.com/libgdx/fbx-conv
It converts FBX models to another format which is much easier to read. It does this via the official Autodesk FBX SDK. If youāre having issues loading some models, you can try to compare your results with this tool to see if thereās any difference and why.
@pspeed said:
You mean you are using that library or have something custom? The library looks pretty interesting.
We are using simple converter from json to yaml to see structure and MAYA for testing. I think @tort32 will use more tools if required. Any way, we heard about that converter.
Hi,
I would just like to mention that the FBX importer is undergoing a lot of work at the moment. The objective is to be able to support all features exported by Blender. If Blender can export it, jME3 will support it.
The number of features and stability of the FBX content pipeline will be much greater than that of the existing OgreXML pipeline.
Originally this work was supposed to go into jME 3.2 but due to delays with the 3.1 release, this may end up falling into 3.1 instead. Weāll seeā¦
I have seen long ago some one refactored our FBX importer and even added few features it it. Itās cool.
I have been working on our importer for past two years too and implemented, like, dozens of features and fixes, including animation support and stuffā¦ So, i have been thinking to contribute all this changes, but the thing isā¦ It is based on the old codeā¦ I did a lot of refactoring, ofc, but itās still have no common code with current FBX importer in JME, so the only way I can commit it is to replace our old code with new one, making it yet again second FBX importer in JMEā¦ And it can go on foreverā¦
Well, the question is pretty tough: what should I do?
I donāt even know, is this even needed to someone?
And I donāt know what features are present in the new importer, I added this in past two years:
Implemented support to up to 8 UV layers
Load face culling
Support of axis signs
Loading animations from FBX without any additional data (multiple animations can be loaded from different animation layers)
Thatās great! I think we should add both importers and try to merge them, thus having the feature set combined. The importer which I wrote does not have skeletal animation support, and this is definitely the killer feature which is needed for our FBX import right now.
Cool. I will send pull request after I implement proper transformation loading and acquire some free time. Like, all that pre- and pos-rotations, it just happens to be very much required for me now and a total mess
By the way, what features are supported in your importer that are not present in mine? I would love to āstealā 'em but itās not easy to see them in the codeā¦
Primarily I wanted to support loading models from Blender, so I try to support whatever Blender can export. Of course skeletal animation importing is not something I was able to get to work yetā¦
Load animations without any additional data (no SceneKeys or fba files) ā animations are loaded from separate animation layers (currently not supported by Maya)
Huge code refactoring. It is possible to work with now and add new features (looks like @shadowislord 's :))
Added support for not baked transformations (like pre/post-rotations/translation/scale and pivots), all euler rotation orders are implemented too
More accurate bone animation
Up to 8 UV-layers
ByPolygon material data is loaded correctly (without buffer overhead too)
Textures are loaded by name from the same folder, if present and no better way found
Added support of FaceCullMode.Off
Support of axis signs
Fixes, tons of them!
Important thing and potential problems:
Iām working with very outdated JME version, so some things might have changed in current version and iām doing them wrong (like Image creation, AlphaTesting etc).
I also use Trove collection to store most of importer data and have change them to JRE collections while transferring code, I hope i didnāt broke something on a way.
I canāt test it in JME, so please :3
(I will add a video showcase tomorrow, just for fun)