Problems importing Blender model (Blender Import & OgreXML)

Hello all!
I am trying to import my first Blender model into jME3. I am using SDK 3.0 Stable and Blender 2.77a. My model uses Riggify addon.
I already tried Importing .blender file directly and exporting to OgreXML from Blender.

Using .blender import

The jME Blender importer renders the model correctly on the import screen, but when imported, it enters a high CPU state that never ends. (I let it run for 5m+ and nothing). If I restart the SDK, the j3o is created, but there are some things messed up. The animation play badly as seen in the image below (low framerate is due to recording tool), and moreover animations can’t be found on Java. I think this is due to the large number of objects imported and the strange hierarchy of them.

Using OgreXML

Using this I had a higher degree of success, although OgreXML Exporter for Blender logs some errors:

Processing Scene - /home/dark/Documentos/Desarrollos/jME/Blender/myGolem/EXPORT
  Processing Materials
TRG: /home/dark/Documentos/Desarrollos/jME/Blender/myGolem/golem FEXT: rock_tex.JPG
INFO:root:skip copy (/home/dark/Documentos/Desarrollos/jME/Blender/myGolem/rock_tex.JPG). texture is already up to date.
      - Exporting root node: rig
      - Generating: Golem.mesh.xml
      - Writing shared geometry
        Done at 0.36 seconds
      - Writing submeshes
        Done at 0.40 seconds
WARNING: vertex 44 is in more than 4 vertex groups (bone weights)
(this maybe Ogre incompatible)
WARNING: vertex 45 is in more than 4 vertex groups (bone weights)
(this maybe Ogre incompatible)
      - Created .mesh.xml at 0.61 seconds
INFO:root:      - Created .mesh in total time 1.06 seconds
NLA track: Actions
   strip name: Walk_baked
   action name: Walk_baked
FATAL ERROR: Exceeded the maximum number of bones per skeleton.
      - Exporting root node: Lamp
      - Exporting root node: Camera
  Exported Ogre Scene: /home/dark/Documentos/Desarrollos/jME/Blender/myGolem/EXPORT.scene
    - Mesh has 154 vertices weighted to too many bones (Ogre limits a vertex to 4 bones)
[try increaseing the Trim-Weights threshold option]
  Original Vertices: 495
  Exported Vertices: 3488
  Original Faces: 452
  Exported Triangles: 1798
Extended Report:
    . Golem
    . Lamp
    . Camera
    . rig
    . rig : Walk_baked [start frame=1.0  end frame=32.0]

The j3o is correctly created in jME3 and the object graph is much cleaner. The textures are somewhat different, although for this model i don’t care it can be a problem with more detailed models. I think it has to be some problem with the UV map, because until I created it, the model appeared untextured.
But, the main problem with this approach is that I cannot play the animation, it fails with the following error:

java.lang.ArrayIndexOutOfBoundsException: -4
    at com.jme3.animation.CompactQuaternionArray.deserialize(
    at com.jme3.animation.CompactQuaternionArray.deserialize(
    at com.jme3.animation.CompactArray.get(
    at com.jme3.animation.BoneTrack.setTime(
    at com.jme3.animation.Animation.setTime(
    at com.jme3.animation.AnimChannel.update(
    at com.jme3.animation.AnimControl.controlUpdate(
    at com.jme3.scene.control.AbstractControl.update(
    at com.jme3.scene.Spatial.runControlUpdate(
    at com.jme3.scene.Spatial.updateLogicalState(
    at com.jme3.scene.Node.updateLogicalState(
    at com.jme3.scene.Node.updateLogicalState(
    at com.jme3.system.lwjgl.LwjglAbstractDisplay.runLoop(
    at com.jme3.system.lwjgl.LwjglDisplay.runLoop(

I saw a similar error on a post yesterday, but the solution was to bake the animation, which I think I’ve done correctly.

I hope you can help me, as I am sure is just a little thing I forgot to do, because I surfed a lot of similar posts on this forum and I tried all the solutions.
Here you have my Golem model if you need it: Dropbox - - Simplify your life
Here I leave images of several things mentioned on the post, as I can only post 1 image:

Thanks for your time, and keep the good work with the community!

I had a quick look at your model, unfortunatly I couldn’t find the real cause of your Problem. I just noticed that when you remove your armature modifier your model gets exported correctly but without animations. Maybe there is a Problem with those inverse kinematic animations. Might be Google can help … Good luck, anyway !

I don’t have the time to check right now, but if what Domenic said is right, I have seen this problem before. That means you must bake your animations. Ali_RS did a really nice video explaining it, here the link.

Edit : just readed the whole thing, might have been wrong whit the baking, i’ll look it up tonight if i can.

Thanks everyone for the effort! I hope you can finally help me.
Otherwise maybe starting all over with a new model may solve the problem.

I will take a look to model soon.
I am a bit busy this weekend.

After 3 hours of trying unfortunately I could not import it correctly.
There was many armature layers on your model ( more than 4 different rig for one model) and it made debugging very hard.
But what i can guess is, it may related to animation weight painting . I tried to edit bone weight paints on scratched parts but no success.
I also noticed there is driver on rig (i have never worked with drivers in blender) which may cause problem when importing to JME.

Hope someone with more knowledge with using blender can help.

I am very sorry that I am so bad modelling at Blender :unamused:
But there are some things that I don’t correctly understand…

  1. I have more than 4 different rig for one model? What this means? It seems kinda unnecessary from my POV. Could you please expand on this?, so I can correct this.

  2. According to the driver… No idea… I didn’t do it on purpose, and I don’t know why it is there.

I think he best way to proceed is to fall back to the plain model and to rig all again.

Thank you for your time!!


Ok, I definitely have to fix all that mess. I hope that will fix the remaining errors. Thanks again for your effort!

You are welcome.
Also you may not need to rig it yourself and avoid all that mess by letting Mixamo to rig your model for you .
I recommend to see these tutorials : (you can skip part 1)

1 Like