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 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. ABORTING! - Exporting root node: Lamp - Exporting root node: Camera Exported Ogre Scene: /home/dark/Documentos/Desarrollos/jME/Blender/myGolem/EXPORT.scene ________________________________________________________________________________ Report: WARNINGS: - 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 MESHES: 1 LIGHTS: 1 CAMERAS: 1 ARMATURES: 1 ARMATURE ANIMATIONS: 1 Extended Report: MESHES: . Golem LIGHTS: . Lamp CAMERAS: . Camera ARMATURES: . rig ARMATURE ANIMATIONS: . 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(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:744)
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: https://www.dropbox.com/s/0km0krzkhbtxv79/myGolem.zip?dl=0
Here I leave images of several things mentioned on the post, as I can only post 1 image: http://imgur.com/a/QGSWW
Thanks for your time, and keep the good work with the community!