I’ve created a model in Blender, and added an animation for a part of that model. When I try to run that animation in jMonkeyEngine, the part that I am trying to animate is displaced and overlaps with the main body. I am still trying to figure out what has gone wrong, I thought that if I run the animation in jMonkeyEngine I should get the same result as in blender.
Anyway, my questions are ,
Are there any guidelines that I should follow while creating a blender model and adding an animation to it so that it would work properly with jMonkeyEngine?
Did anyone face a similar problem and knows what might cause this?
I’ve imported the model .blend file directory, does it work or should I export through OgreXML? I’ve just animated a part and parented it, is that enough or should I create an armature?
JME also supports spatial animation so if your animation consists of basic transformation (translation/rotation/scale) of the object, it should work.
Mesh animation (aka Pose animation) is not supported atm.
Sorry but I got a little bit confused. just to make sure I understand everything, my options are (please correct me if I am wrong):
1- You can add a skeleton to your model, animate it, import the .blend file to your workspace and you can run the created animation
2- you can animate the object through jme and just supply a model through blender
are there any advantages to exporting the model through OgreXML exporter? I’ve tried importing the .blend file and it seemed to work for another simpler model.
does the importer has any limitation on the complixity of files being imported? I’ve downloaded a complex model for a tank in 3ds format, imported it in blender and it had heaps of verticies, parts, materials, added a simple animation to it and tried importing it into jme sdk with no luck… I cant provide the stacktrace right now but I will add it later on.
The direct blend import works very well for simple models, however I’m not sure what the state is on importing animations. Last I heard for skeletal animations you had to go blender->ogre->jme3 to get the skeletal animations across.
@oskanaan said:
So I've gone through the whole thing again, I've tried to follow the links normen posted in the thread " http://hub.jmonkeyengine.org/forum/topic/importing-models-with-animations-from-blender/". what happens now is that I imported the model successfully, and I can see it when I run the application, but I still have two problems,
when I attach a debugger to the skeleton I only see the base bone, although I have one other child bone.
when I query the control for the animations, I get one which has the name “my_animation” which is not the animation that I have in the nla track
I’ve checked the skeleton xml file, I can find the missing bone and animation there… What am I missing? any help would be much appreciated
is normal, JME Bones are more joints actually, so basically you see 2 dots linked by a line, that’s normal.
is because you didn’t pack your animation as an NLA track. check out this video tutorial (NLA setting is discussed around 2:30) blender to jme3 though ogre XML - YouTube
I’ve seen that for the animation to be exported to ogre xml, it must be active… That is it must play within Blender.
If your timeline contains twice your animation, this animation will be exported twice also.
Its working now, but how did it work that I dont know :), all I did was playing the animation in scene composer and then when I inspect the value of getAnimationNames I get my animations there, this doesnt make sense but if I come across the same problem again and find the solution for that I will post it back on this thread …