How to get started with AnimComposer?

Hi All,

Fresh noob here-I am struggling with wrapping my head around getting animations into jmonkey.

Main idea - Do I want one file or two and what file types should they be and what folders should they be in???

File types and context

My brother and I are using jMonkey and blender and also Mixamo.

I have been looking through the tutorials and I also have some cool (and old) books on j monkey that I have been working through. My book that I was working through starting talking about AnimControl which I see on the docs that that is ‘old’. We now have AnimComposer although the Hello Animation tutorial is still with the old system.

How to-Animate-Mixamo-Blender Models also points me to the Hello Animation and so then I went to the forums. I found an old post from may of '21 where they mention that the old animation system is deprecated and the new animation system documentation is still a WIP. After some more digging I was able to find some more recent stuff that was working such as Ali’s “A tip for animation blending!” thread. I then ran the TestAnimSerialization code on the Animation in jME3 doc and I did get the monkey in there pounding its chest … however I am still scratching my head.

Reading in my book animation at least conceptually made sense to me because you get a Jaime.mesh.xml and a Jamie.skeleton.xml. What are those in the new animation system?

I think the model loading is just (“Models/Jaime/Jaime.j30”) but what is the equivalent of the skeleton?

This from the doc “A model should get an AnimComposer automatically when you convert your model to j3o. At the same time animations will be created and accessible in the AnimComposer. Animations will be named the same they were in your editor. “

Does this mean I get an anim composer file when I convert to j30? If so where should it be just in a folder in my models? I also saw in another thread “Best format for animated model import” that gltf converted to j3o is the best however the wiki mentions ogre but that ogre will be outdated.

So if you made it this far you have an idea of how confused I am on this and I think most helpful for me would be to figure out instead of a mesh.xml and a skeleton.xml what file or files should I have and where do I put them?

And then when I play the animations according to the wiki

AnimComposer animComposer = animatedModel.getControl(AnimComposer.class);
animComposer.setCurrentAction("Walk");

is “walk” my animation file?

Any answers or anything else helpful would be most appreciated simply even telling me what to read and where to read it at. I feel lost with the old stuff mixed with the new and not sure what route to take to keep moving forward.

Thank you all and happy adventures.

A tutorial on the flow of blender animated model → j3o would be useful. I’ll see if I can create one (if there isn’t already). I’ve also used Mixamo models recently.
In brief:

  1. Create an Action in Blender for each animation you want (Dope Sheet - Action Editor). Their names will be actions for AnimComposer, ie “Walk”.
  2. Make sure to “Push Down” each of them (button to the left). All animation you want to use should be visible in Nonlinear Animation.
  3. Export as gltf and tick the Animation and Skinning boxes.
  4. Import in jMonkeyEngine. If you open it in the SDK, it should have an AnimComposer control visible.
    I think that’s it.
2 Likes

Thank you so much for the reply, rickard.

There is a pretty good page and surrounding couple of pages on Blender Models/Mixamo although I was still feeling quite lost and some things you mentioned I have not found in there ie gltf specifically or checking the Skinning boxes.

There are also some Videos that look like they would be super helpful but they’re lost as ‘private’ on youtube (Download model, rig and animate, import to JME, and play animation].

I feel inspired enough to start taking some more stabs at this.

Thanks again!!

File->Export->Gltf… then open the options panels on the right side.

…for any relatively recent version of Blender, anyway. (last 3 years or so for sure.)

Note: i don’t have to do this… simply hitting the little “shield” icon to protect them is enough.

In fact, when I followed the steps in this tutorial then the animations imported into JME just fine through exporting/importing gltf: Key Frame Animation of Low Poly Character in Blender 2.9x - YouTube

The only issue I have is that my animations seem to have an extra frame when looping.

1 Like

ok sweet, thanks pspeed!

So I did run into issues just now with some of my animations showing up and others not… so I readdressed the below…

…some of my animations were indeed in the NLA editor but this was causing me problems. Because they were active animations then they were all layered on top of each other and bleeding through if I left some bones un-animated.

Instead of “push down”, I clicked the little snowflake “stash” button. That puts them in the NLA but not active and then all of my animations do show up in the GLTF.

So the video tutorial is good for creating an animation (that guy is a unity user but the model creation is good)… but when exporting as GLTF to JME, click the little snowflake button for your animations.

1 Like

Whatever works, I guess :slight_smile:
Stashing sounds familiar, perhaps that’s what I read on the forum a long time ago, but the NLA stuff stuck and “Push down” seems to work for my process.

We can agree then that the end result should be that:

  • Animations should be visible in the NLA editor
  • But should be inactive.

I wonder if the active/inactive state is controlled by some other setting/action.

1 Like