Same model loaded multiple times executing different animations

Sorry if this has already been asked, not even sure how to word the question. i have a model that i am trying to load up multiple times and have different animations executing. when i load up the model twice and play an animation on one it plays it for both instances, here is my test case:


import com.jme3.animation.AnimChannel;

import com.jme3.animation.AnimControl;

import com.jme3.animation.AnimEventListener;

import com.jme3.animation.LoopMode;


import com.jme3.light.DirectionalLight;

import com.jme3.math.Quaternion;

import com.jme3.math.Vector3f;

import com.jme3.scene.Node;

public class AvatarTestCase extends SimpleApplication{

public static final String avatarModelLocation = “Models/avatars/businessman/My_Avatar__1.j3o”;

public static void main(String args[]){

AvatarTestCase app = new AvatarTestCase();




public void simpleInitApp() {

DirectionalLight sun = new DirectionalLight();

sun.setDirection(new Vector3f(-0.1f, -0.7f, -1.0f));


Node avatar1 = (Node) assetManager.loadAsset(AvatarTestCase.avatarModelLocation);



AnimChannel avatar1Channel;

AnimControl avatar1Control;

avatar1Control =avatar1.getControl(AnimControl.class);

avatar1Control.addListener(new MyAnimationListener());

avatar1Channel = avatar1Control.createChannel();



Node avatar2 = (Node) assetManager.loadAsset(AvatarTestCase.avatarModelLocation);



AnimChannel avatar2Channel;

AnimControl avatar2Control;

avatar2Control = avatar2.getControl(AnimControl.class);

avatar2Control.addListener(new MyAnimationListener());

avatar2Channel = avatar2Control.createChannel();





class MyAnimationListener implements AnimEventListener{

public void onAnimCycleDone(AnimControl control, AnimChannel channel, String animName) {




public void onAnimChange(AnimControl control, AnimChannel channel, String animName) {




Let me know if its something obvious with my code or if its something with my model, ill up the model if ya’all think its something wrong with that.

Thank you in advance


Update to the latest stable version (Help->Check for Updates)

Thanks for the quick reply normen,

When i update to the lates stable i get an exception when i try to load up my models:


java.lang.IllegalArgumentException: No enum const class com.jme3.scene.VertexBuffer$Type.BindPoseTangent

at java.lang.Enum.valueOf(

at com.jme3.export.binary.BinaryInputCapsule.readEnum(


at com.jme3.export.binary.BinaryImporter.readObject(

at com.jme3.export.binary.BinaryInputCapsule.resolveIDs(

at com.jme3.export.binary.BinaryInputCapsule.readIntSavableMap(


at com.jme3.export.binary.BinaryImporter.readObject(

at com.jme3.export.binary.BinaryInputCapsule.resolveIDs(

at com.jme3.export.binary.BinaryInputCapsule.readStringSavableMap(



at com.jme3.export.binary.BinaryImporter.readObject(

at com.jme3.export.binary.BinaryInputCapsule.resolveIDs(

at com.jme3.export.binary.BinaryInputCapsule.readSavableArray(

at com.jme3.export.binary.BinaryInputCapsule.readSavableArrayList(


at com.jme3.export.binary.BinaryImporter.readObject(

at com.jme3.export.binary.BinaryImporter.load(

at com.jme3.export.binary.BinaryImporter.load(

at com.jme3.export.binary.BinaryImporter.load(

at com.jme3.asset.DesktopAssetManager.loadAsset(

at com.jme3.asset.DesktopAssetManager.loadModel(

[catch] at com.jme3.gde.core.assets.SpatialAssetDataObject.loadAsset(

at com.jme3.gde.scenecomposer.OpenSceneComposer$



@Momoko_Fan, is there some incompatibility with animations within beta? @allman: Try re-converting the model from ogre or whatever the original format was as a workaround.

1 Like

Reconverting works to let me load up the model but it does not let me play the model animations now :confused:

Working! just had to restart the IDE for each model :slight_smile:

Procedure for binary Ogre xml files:

update lates stable JMP

update to lates ogre tools

user@comp / $ OgreXMLConverter MyModel.skeleton

user@comp/ $ OgreXMLConverter MyModel.mesh

in JMP import MyModel.mesh.xml

restart JMP



Thanks normen for the speedy reply


How do you mark a topic solved? im not good with computer :confused:

1 Like

Ok good. If you copy the binary ogre files to the project assets directory you can convert them directly, the ogre command line tools are integrated in the SDK.

1 Like

This error happens if a new model is being loaded on old jME3