[SOLVED] ImportMixamo: How do you use generated j3o files with animComposer controls?

Probably I’m doing something wrong but I cannot get any controls from a generated j3o file.
What I did is: cloned the MonkeyWrench project, uploaded a makehuman model to mixamo and downloaded a t-pose as well as a simple walking animation. Both were processed by ImportMixamo and the resulting scene.j3o allegedly contains the animation. It says: version-2 J3O model asset with 5 meshes, 2 animation clips, and 16797 vertices.
Now when I try to load this j3o file back into the engine there is only the model without any controls - at least a debug output shows the list of controls is empty. Isn’t it supposed to contain a control for the animation clip (an AnimComposer I guess)?
This is the code to check for attached controls:

        playerModel = this.app.getAssetManager().loadModel("Models/scene.j3o");
        LOG.info("playerModel is " + playerModel.getClass());
        for (int i = 0; i < playerModel.getNumControls(); i++)
            LOG.info(" with control " + playerModel.getControl(i));

The controls may be down in the node hierarchy somewhere.

1 Like

The AnimComposer is likely attached to another Spatial that’s attached to the playerModel spatial.

You can check this if you open an animated model in the SDK’s scene composer, here’s an example of one of my animated models that has the AnimComposer nested about 5 nodes deep:

image

Or if you aren’t using the SDK, you could also use a SceneGraphVisitor to check all of the other Spatials attached to the one you loaded:

Ah, thanks. That’s it. It was one level deep and I found it now.

1 Like