Problems with animations

Hello everybody.



I’m trying to display animated models in android but I’m having problems. Here is the source code:



[java]

viewPort.setBackgroundColor(ColorRGBA.LightGray);



DirectionalLight dl = new DirectionalLight();

dl.setDirection(new Vector3f(-0.1f, -1f, -1).normalizeLocal());

rootNode.addLight(dl);



player = (Node) assetManager.loadModel(“Models/Oto/Oto.mesh.xml”);

player.setLocalScale(0.5f);



rootNode.attachChild(player);



control = player.getControl(AnimControl.class);

control.addListener(this);

channel = control.createChannel();



channel.setAnim(“Walk”);

channel.setLoopMode(LoopMode.Loop);

channel.setSpeed(1.0f);

[/java]



The program runs flawlessly on desktop, however, in android the model is displayed but not animated. The render loop is working well since I can move the camera. I tested the program in a Galaxy S (2.3) and in a eee pad transformer (3.1)



Any idea?



Thanks in advance,

eskor.

Hi again,



I’ve been working on the problem, and using an older version of jMonkeyEngine3.jar it works fine. I suppose that some bug could be introduced in a recent update of the engine.



Regards,

eskor.

Try converting the model to j3o and loading that instead.

The same problem with j3o models.

oO Theres really no difference in the animation system on android or desktop, you really tried j3o or you just wanted to bump the thread? :wink:

It doesn’t work. Believe me. The latest version of the engine doesn’t play any animations. As I said in a previous post, I’am still working with an old version of the engine that works with mesh.xml models, but raises an exception when I try to start an animation in a j3o saying that the animation doesn’t exist. However, the AnimationControl object gives me correctly the list.



(I am not bumping anything, just giving my time as beta tester.)

I have the same problem. I tried the Tutorial 7, Hello Animation, in my Nexus S (official OS). I believe it is almost the same code as eskor’s post. Up to tutorial 6 everything works just fine. For tutorial 7, the only thing that I changed is instead of registering KeyInput.KeySpace, I use MouseInput.LeftButton. Here is my observation:


  • The frame rate is 15. Usually it is about 45 in all other tutorial examples.
  • There is no animation, even though the model is loaded and displayed just fine.
  • The piece of code that should initiate the animation was actually executed (I put a System.out.println in the same place and I see it in the log):



    channel.setAnim(“Walk”, 0.05f);

    channel.setLoopMode(LoopMode.Loop);



    I tried this tutorial in jMOndeyEngine SDK.I assume I run the latest version of android stuff as of December 02 2011. I installed the latest SDK 3.0 beta, went to Tools–>Plugin–>Settings and checked jMonkeyEngineSDK Nightly. And I updated (Help–>Check for Updates) on December 02 2011.



    eskor, do you know what version are you running it successfully?



    Thanks

that’s strange i’m gonna look into this

OK i have the same issue.

Apparently bone animation does not work on android right now…

I’ll keep looking

@eskor I’m having a hard time narrowing down which revision caused the issue.

Could you tell me with which nightly it’s still working?

for the record the issue seems to be between r8492 and r8562 (not included)

For if it helps, attaching a geometry node in a bone of the skeleton works properly. It seems that the problem is related to the skinning process rather to the skeleton itself.

Thank you that’s helpful.

ok i found the issue.

It’s a change in IntMap that is messing iterations over the buffers in the renderer.

I’ll commit a fix soon

It fixed in SVN

I updated the SDK on 12/06 and run my test again. Looks like it works! I now see the robot walking. Thanks a lot.

Thanks a lot nehon.