I have read every documentation and watched every video about animating models i could find in documentation and forum.
I am working with blender and created all animations as seperate actions there.
Now every tutorial/documentation shows that the animation is imported using ogrexml export. But i allready created a jo3 file from the blender model, do those not include the animations allready ?
I am trying to have all assets in formats best suited for jm3, so jo3 would have been best i guess.
Or am i missing something ?
When i am trying to get the AnimControl class from the loaded model node i get null, so it seems there is no animation in the jo3 file.
I made sure that i followed every detail explained in the tutorials, so the model should be fine.
On a sidenote, this documentation: https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:external:blender tells you to check that rotation, location and scale should be (0,0,0) / (0,0,0) / (1,1,1), but does not tell you what you can do if it is not. I have had a problem with a model that scale was not normed and when i just entered 1 in all the fields the model got distorted, but you can simply use ctrl + a to aply transformations, wich then sets the current transformations/scale to be default.
no but j3o files can support animation fine ;). If you are using the blender importer, make sure you are using nightly and not using constraints (they are still a W.I.P). Also make sure your animations are on a separate layer 1 after each other in the NLA editor
Ah, ok, figured it out, can’t get the AnimControl directly from the loaded node, but from the child that is actualy the armature or mesh. Somehow one animation was on the armature and one was on the mesh, have to check why that is.
Also it seems the animation is inverted on the xy-plane.
I created a switch and animated the lever of it so it movers in an arc, but in jm3 this arc is inverted, so the lever gets stretched at the switched on and switched off state.
As I said I have read that page and all other concerning blender.
I've noticed that when you do the blender import you get 2 animation controls.
One has every animation and is on the mesh. The other is on the layer above (iirc) and has only the currently selected animation in blender.
Yes i have seen the too, also a tutorial says to put all actions on a single band in NLA Editor, but even without doing that they appear on the mesh node.
Anyway, the animation in blender is fine, but the animation in jm3 is strange. Hard to explain it in english as it is not my native language. When switching the lever the top part should move in a semicircle arc arround the base of the lever maintaining distance to the turn point so the lever itself has allways the same length, this works in blender fine because the lever is a bone and i just use rotation on it. In jm3 it seems this semicircle is somehow inverted along the y axis, so at the end points of the turning the knob is further away from the rotation point wich stretches the lever at its end points.