Can confirm that blender 2.7 export works with Inverse Kinetics

I havent used jMonkey in a while and am having Issues.

I want to export a humanoid model that has armature that uses an Inverse Kinect Constraint.

The exported addon I am using in blender is io_export_ogreDotScene.py version 0.6.0

The Model imports into jme sdk fine.

When I open up the Model in the Scene Editor and find the animControl and click the play button. It crashes with an ArrayIndexOutofBound Error -4

[java]
ava.lang.ArrayIndexOutOfBoundsException: -4
at com.jme3.animation.CompactQuaternionArray.deserialize(CompactQuaternionArray.java:97)
at com.jme3.animation.CompactQuaternionArray.deserialize(CompactQuaternionArray.java:43)
at com.jme3.animation.CompactArray.get(CompactArray.java:132)
at com.jme3.animation.BoneTrack.setTime(BoneTrack.java:231)
at com.jme3.animation.Animation.setTime(Animation.java:110)
at com.jme3.animation.AnimChannel.update(AnimChannel.java:403)
at com.jme3.animation.AnimControl.controlUpdate(AnimControl.java:332)
at com.jme3.scene.control.AbstractControl.update(AbstractControl.java:112)
at com.jme3.scene.Spatial.runControlUpdate(Spatial.java:570)
at com.jme3.scene.Spatial.updateLogicalState(Spatial.java:688)
at com.jme3.scene.Node.updateLogicalState(Node.java:145)
at com.jme3.scene.Node.updateLogicalState(Node.java:152)
at com.jme3.app.SimpleApplication.update(SimpleApplication.java:244)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.runLoop(LwjglAbstractDisplay.java:151)
at com.jme3.system.lwjgl.LwjglDisplay.runLoop(LwjglDisplay.java:185)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:228)
at java.lang.Thread.run(Thread.java:722)
[/java]

I saw this post from 2012 http://hub.jmonkeyengine.org/forum/topic/animated-model-in-3ds-max-jmonkey/
but I am not sure if the answer “jME3 only supports skeletal animation, mesh/morph/pose animations are not supported (yet)” is staill valid.

Any help would be greatly appreciated.

-Greg

no inverse kinematics is not supported. I think some people have been experimenting with it, but it is not officially “implemented” right now.

you can however bake ik animations into fk animations inside of blender though.

@icamefromspace said: no inverse kinematics is not supported. I think some people have been experimenting with it, but it is not officially "implemented" right now.

you can however bake ik animations into fk animations inside of blender though.


No!

IK through ogre pipeline works fine. the Blender loader however doesn’t reliably work with IK.

@gbluntzer I didn’t use blender 7 yet but I’m using blender 2.68a and ogre export 0.6.0 and it works fine

@nehon Just so I can eliminate that it is my models issue. Can you point me to a blender file that uses IKs that I can test the export from? I am wondering if there is some parameter that I am not turning off

Side note: Do we no longer have nightly builds? I wasn’t sure if once the transfer happened to GIT if those stopped being created or if the moved to another place

Thanks
-Greg

@gbluntzer said: Side note: Do we no longer have nightly builds? I wasn't sure if once the transfer happened to GIT if those stopped being created or if the moved to another place

No, theres no nightly builds from git yet, they wouldn’t be compatible to the current SDK anyway.

You can try with the jaime.blend available here https://code.google.com/p/jmonkeyengine/downloads/detail?name=Jaime.zip&can=2&q=#makechanges

for your second question… yeah since we moved to github the nightly builds are not working anymore. I hope they will eventually.

1 Like

Thanks @nehon.

I tried the jamie model same result with both blender 2.67b and 2.7 and 0.6.0 version of ogre exporter. Also the export gave me errors on the number of weights on each vertex. I assume the jamie model worked for other people so It must be something with my blender or jmonkey sdk. I wonder if some how I have an old version of the sdk or to new of update for the plugins and that is making the error.

here is what my about says on the sdk
[java]
Product Version: jMonkeyEngine SDK 3.0
Java: 1.7.0_11; Java HotSpot™ 64-Bit Server VM 23.6-b04
Runtime: Java™ SE Runtime Environment 1.7.0_11-b21
System: Windows 8 version 6.2 running on amd64; Cp1252; en_US (jmonkeyplatform)
[/java]

Code
[java]
Spatial enemy = assetManager.loadModel(“Models/JaimeGeom/JaimeGeom.mesh.j3o”);

    rootNode.attachChild(enemy);
    
    control = enemy.getControl(AnimControl.class);
    control.addListener(this);
    channel = control.createChannel();
    channel.setAnim("Walk");

[/java]
Where the exception is
[java]
@Override
protected Quaternion deserialize(int i, Quaternion store) {
int j = i * getTupleSize();
store.set(array[j], array[j + 1], array[j + 2], array[j + 3]);
return store;
}
[/java]
Same error
[java]
java.lang.ArrayIndexOutOfBoundsException: -4
at com.jme3.animation.CompactQuaternionArray.deserialize(CompactQuaternionArray.java:97)
at com.jme3.animation.CompactQuaternionArray.deserialize(CompactQuaternionArray.java:43)
at com.jme3.animation.CompactArray.get(CompactArray.java:132)
at com.jme3.animation.BoneTrack.setTime(BoneTrack.java:231)
at com.jme3.animation.Animation.setTime(Animation.java:110)
at com.jme3.animation.AnimChannel.update(AnimChannel.java:403)
at com.jme3.animation.AnimControl.controlUpdate(AnimControl.java:332)
at com.jme3.scene.control.AbstractControl.update(AbstractControl.java:112)
at com.jme3.scene.Spatial.runControlUpdate(Spatial.java:570)
at com.jme3.scene.Spatial.updateLogicalState(Spatial.java:688)
at com.jme3.scene.Node.updateLogicalState(Node.java:145)
at com.jme3.scene.Node.updateLogicalState(Node.java:152)
at com.jme3.app.SimpleApplication.update(SimpleApplication.java:244)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.runLoop(LwjglAbstractDisplay.java:151)
at com.jme3.system.lwjgl.LwjglDisplay.runLoop(LwjglDisplay.java:185)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:228)
at java.lang.Thread.run(Thread.java:722)
[/java]

One more update the jamie model in the jME3-testdata.jar works for me including animation.
Models/Jaime/Jaime.j3o

So there must be something I am missing in blender when I export.

I think the reason I am having problems is that the ogre export is not exporting locations in the skeleton files. It only exports rotation. Maybe because I am only rotating the bones and not moving them. Is there a way to force the exporter to fill in locations?

Thanks,
Greg

Just in case anyone else runs into this.
The issue I had was not the IK but the ogre blender exporter not putting translate into the skeleton.xml
I dont have a good solution on how to fix this other then manually going in and setting to ZERO

[java]
<translate x=“0.000000” y=“0.000000” z=“0.000000”/>
[/java]