So I’ve created a node animation in 3ds max and exported my file with ogremax and loaded it in jme, however when I attempt to get the animation control for the model it is missing thus throwing an NPE. I’ve looked in the debugger and there are no controls on the model anywhere, however I do see the animation information in the XML file that ogremax generates. There is no skeleton file though. Can one do simple node animations with JME? All I want is for buttons to push in and out. So nothing that fancy.
Which file has the animations? You mean the mesh.xml file?
Yes, the mesh file.
Since my original post I’ve also tried using bones and do get a skeleton file but the animations are still in the mesh file and although now I see a control at the ogremesh level in the node hierarchy in JME, it seems to have no animations attached to it. Again, even in this scenario the animation is in the mesh file.
So I take it node animations are not possible from 3ds to jme? Can I get a definitive answer on that so I can stop banging my head on my desk?
Further, has anyone successfully exported any animations from 3ds to jme using any method?
No, it definitely works, people have created working ogrexml from 3gds max using the ogrexml exporter. Guess you have to research your export settings and what/how the exporter supports the 3ds functions. Remember 3ds is made for static rendering and in live rendering not all material etc. options are supported. Same accounts for animation, your animation has to be a bone animation. The obj format might support other forms of animation but they are quite ineffective for live rendering as the obj format uses one complete mesh per frame.
Ah, thank you. No node animations, but bones are ok as I just got it to work.
I now have another question regarding the import of an ogremax model. Although I did get it working, I had to use a work around as the tutorial examples did not work. As I mentioned earlier in the thread, the animation control is appearing on the parent of the geometry. This makes it difficult to have grouped spatials controlled by the same bone. For example I have two parts grouped in 3ds max and controlled by the same bone. But when I load the model in JME, I have to drill down to the parents of all the geometries to get the controls and then create the channels for them individually, otherwise all parts will not animate. This seems overly convoluted and as I stated, far more complex than the tutorial where you just get the controllers for the entire model easily.
I’ve looked at the model in the tutorial and it has the animations at the top level for the model. You can just call getControl on the top level loaded model node and the animations are right there. In my instance, all the animations are burried down near the geometries (on their parent nodes). Does anyone have any idea what is causing this? I’ve tried about every export configuration for ogremax with no luck. Is it possible I’m missing a step somewhere or is this a bug?
No, all animations are available via the AnimControl on the root spatial. You have to create different channels etc. Its just a difference between the logic in Max and Ogre/jME3.
But the thing is, they are not there. When I getControl on the root spatial it just returns a null. Instead the controls are burried down 3 or 4 levels in the node hierarchy.
Oh, so you do have multiple armatures… Then join them in max.
So here’s what my structure looks like when I load a model in JME:
(object name) (control)
model-scene_node (null) <—the controls should be here from what I understand
box02-ogremesh (AnimControl) (id=101)<—here is where the control is located
Well you get one control for each armature, the exporter combines what would be single models into one node. One skeleton is one AnimControl, if you lay it out this way in max you’ll have to deal with it ;).
Just join the bones as one armature and it should be fine, I don’t know how to do that in max tho, I can’t afford it ^^
Btw when you load the model in jMP its easier to look where stuff is located and what name it has.
Well I see what the problem was and it was a bonehead mistake on my part. I was exporting the model as a scene instead of a mesh. When exporting as a mesh the controls now appear at the correct location on the loaded model. Now I just have to figure out why the animation is moving the buttons much further in jme than in 3ds. Ugh.
You should apply all scales and rotations before you export…