Exported blender model throws "Num components must be between 1 and 4"

Hey guys! :slight_smile:

Another day, another problem. :smiley:
I created my first model of a robot which has an armature and two animation actions in it, “walk” and “stand”. I exported this model with the latest blender2ogre exporter plugin (my Blender version is 2.69, plugin version is 0.6.0) like this:

  1. Select the armature of my model:
    Image showing the selection of the armature

  2. Ogre export plugin settings:
    Image showing the ogre export plugin settings applied

  3. Result are the files “Robobob.mesh.xml” and “Robobob.skeleton.xml” (no errors).

I added both to my assets, now when loading my model with the Asset-Manager, I get this exception:

SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]
java.lang.IllegalArgumentException: Num components must be between 1 and 4
at com.jme3.scene.VertexBuffer.createBuffer(VertexBuffer.java:907)
at com.jme3.scene.Mesh.extractVertexData(Mesh.java:1176)
at com.jme3.scene.plugins.ogre.MeshLoader.compileModel(MeshLoader.java:776)
at com.jme3.scene.plugins.ogre.MeshLoader.load(MeshLoader.java:892)
at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:288)
at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:374)
at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:378)
at de.my.game.MyGame.makePlayer(MyGame.java:59)
at de.my.game.MyGame.simpleInitApp(MyGame.java:43)
at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:226)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:130)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:207)
at java.lang.Thread.run(Unknown Source)

Does anyone have an idea whats wrong with my model?

Thanks in advance! :slight_smile:

My guess based on that error message is that you have more than 4 bones influencing the position of a vertex in your animation.

Hmm, I checked this, and I can’t see a vertex that could be influenced by more than 4 bones… another question - is this even the right way to export models with a skeleton from blender? Is it correct that there is a “.mesh.xml” AND a “.skeleton.xml”, and does the asset manager get this automatically?

I also added this question to StackOverflow (i think some public appearing of jme is good) :wink:

@maxdev said: is this even the right way to export models with a skeleton from blender? Is it correct that there is a ".mesh.xml" AND a ".skeleton.xml", and does the asset manager get this automatically?
Yes.

For your initial issue, could you please upload the model?
I’d like to know what buffer have more than 4 components.

EDIT : Actually it could be a buffer that has less than 1…Try to uncheck “Pose animation”.

I did link it in my initial post ^-^ click this link

Okay, I’ll give that a try

BTW: directly loading the model as a “.blend” file works, converting it to “.j3o” and then loading it works, too…

Oh sorry, I didn’t see it.
Will check it out.