I was testing JiggleArmature animation which i mentioned in my other post
Using Xbuf importer i am getting different result. Using direct JME blender importer it works OK.
See this video :
Using direct blender importer the cube animation has both bending and stretching but using Xbuf importer cube has only bending but no stretching.
Can you please help ? Any way to fix this ?
You can download blender file along with .j3o’s from here
Edit : You can download JiggleArmature add-on from JiggleArmature
You can bake the simulation clicking Bake in the panel Jiggle Scene in the scene tab, it will record the simulation from the start frame to the end frame into key frames. for more info see JiggleArmature
I’ll take a look later today after work, or tomorrow.
Thanks for your report with all the info.
I just noticed the scale axises orientation are different when exporting to Xbuf.
Xbuf already exported scaling (stretching), but the axises are different though.
I will take further look.
side look :
Played a bit with different settings in blender but could not fix it.
It seems it is Z , Y Axises orientation issue due to difference between Blender and JME axis mapping ? It seems xbuf not map scaling in Z axis in blender to Y axis in JME when exporting ?
@david_bernard_31 will appreciate if you can confirm it. And if you think this is an issue with JiggleArmature add-on in blender please let me know so i can report issue to this addon’s developer
blender orientation != xbuf orientation so a rotation is applied during export.
Maybe some transformation is missing (in blender exporter), it is a tricky part of the exporter.
Thanks for your investigation.
I created a very simple test case without using JiggleArmature add-on. I created a simple bone scaling key frame animation in blender and imported it to JME :
Start frame :
End frame :
This seems to be an issue with Xbuf exporter.
Are you going to apply a fix ?
If you want i can open an issue for this in github page.
Note: JME’s support for non-uniform scaling is very limited… in the interest of being a game engine.
If it’s possible then you might want to see if it still works with the ogre exporter. That would at least rule in or out an xbuff specific issue.
Tested with Ogre exporter and it works fine :
This small change fixed the issue.
David i can make a PR if you are agree with change.
Thanks for your time, investigation and a solution. Before, include the fix, I’ll complete the unittest.blend with the missing sample about bone’s scale on Z, Y, X to first reproduce, before fixe. and check non-regression.
I did some test, and the existing code works with single bones in unittest.blend (I updated it). But during the investigations, tries,… I got other behaviors on some case, I was not able to reproduce and find the cause.
So until, better understand of the issue, I’ll keep the code of the exporter as is (vs apply the change from @Ali_RS) .
Yep, in single bone it works fine. That problem happens when there is more than one bone.
It’s why, I’ll add more samples in unittest with 2 bones.