Blender animation distorted complaining to more than 4 weights in bone index

I’m trying to find appropriate method for animations in blender that can be exported to jmonkey. There is no much said about animation capabilities of jmonkey engine, I only get know that is keyframe and is very basic. So I’ve tried to find the best technology available starting from the simplest and most time-consuming without any automation and get stock with model distorting after importing. Warnings reports “something has more than 4 weight on bone index somenumber” several times and the model becomes distorted after starting an animation.

What can be done to overcome this situation?

There is another question. It seems that blender is popular here and many peoples have they own ways of using it. What is the best known practice for creating animations in blender?

There are plenty of blender animation manuals that relies on much more advanced technology that jmonkey can handle. There are few tutorials for keyframes animations I’ve tried them all and none can be imported to jmonkey, Than I’ve tried to build most simple animation possible, it has exported smoothly but distorts when animation starts playing.

There are some positive reports about importing, but they doesn’t provide precise information about blender capabilities that may be used and may be not used in jmonkey and what options exactly should be set to make it jmonkey compatible.

it seems you use blender 2.49? Use blender 2.61, please.

About animations:

I recommend you to use:

Non animated models: blend files.

Animated models: ogre files.

Ogre.xml is the best for importing animations to JME. Just get blender 2.61 and “blender2ogre” exporter.


I’m using blender 2.61.

I’ve tried to follow fabiano tutorial from the pointed discussion and get import error: “Unknown constraint type: bTransLikeConstrained”

I doesn’t know what do with your advice about transformation, for the sample animated model I haven’t used any modifiers for testing purposes. It has imported to sdk normally but get distorted after starting animation.

Just export your model to ogre.xml.

Working example (ogre):

I’ve downloaded blender2ogre and installed it. I’m using blender 2.61, and I can export to ogre only models withou UV-layout. Once I’ve added UV-layout to a model, the “export->Ogre3d” button becomes grey. Is there any trick about blender2ogre?

4 weights is the max you can have. Limitation of graphic cards.

@ayvango What is UV-layout? Show a screenshot.

@tralala I don’t know about limitations… but my models can have more than 4 weights, as far as i remember.

JME uses CPU-skinning. Not GLSL-skinning.

ogre has that specific 4 weights, I think, requirement, 2.49 had weight normalizing script for such cases that would “clean up” a model for export, I think the 2.6 one is supposed to have that built in as an option or something :? , can’t remember, not interested in converting my project to 2.6 though so I never explored the 2.6 ogre stuff for very long.

as far as i know… 2.6 has no such a limitation.

@mifth said:
as far as i know... 2.6 has no such a limitation.

ogre has or had that limitation as I said the weights are probably "normalized" automatically before export in the 2.6 script in 2.49 u have to do it manually with another script or u get a bunch of errors in the console and distorted model animations in jme3

blender2ogre exporter has that limitation too.

in blender2.49 you have a seperate normalize script which you have to do it manually

in blender2ogre that script is embed and called trim weights

I tried 0.5 and had a hole in my character and changed it to 0.12 and it works.

So i think it is a limitation of ogre.

UV-layout is set of UV-coordinates mapped to mesh. I’m presenting two screenshots. First shows a primitive model with attached UV-map, blender has ogre export option disabled. Second shows the model without UV-map and ogre export option become enabled.

There are some questions towards 4-weights vertex linking. Does jMonkey actually has this limitation? Does it use CPU skinning or GPU skinning? Where does limitations origin from? There were different answers to this questions in the thread and I’d like to know which of them are true.

You need to be in Object Mode to export your object. Not in Edit Mode. Just press “Tab” and export your model.

bledner2ogre works in object mode. thanks.

I’m found limitation of 4-weights per vertex in com.jme3.scene.plugins.blender.modifiers.ArmatureModifier in ArmatureModifier.getBoneWeightAndIndexBuffer method. More than 4-weights are dropped.

I am not able to find analogue in ogre importer code but it doesn’t mean ogre importer has no limitations, only I’m not familiar with jMonkey internals enough.

I’ve tried to load followed model to jMonkey direct from blender and over the blender2ogre, but neither way gives positive result. Although model is imported it can’t play animaition properly.


What is wrong with this model?

@mifth said:
You need to be in Object Mode to export your object. Not in Edit Mode. Just press "Tab" and export your model.

-JME has no limitation of 4 weights per vertex. As far as i remember, core devs removed the limitation. <

- JME uses CPU skinning. If you want GPU skinning, so have a look at this:

that is not a jme requirement it is a set rule of the ogre format, the fact the u do not encounter this error is may well be due to the way you skinned the model or the extra weights if any aren't significant enough a loss to see visible distortions but if u enable the console in blender while trying to export a model ogre considers to be badly weight u will get this error, additional, how on earth would jme be aware of that error much less how to deal with it, its a blender > ogre issue

Possibly, i’m wrong about 4 weights per vertex…

@ayvango try this model:

Hey, you use russian service. Hehe… i’m russian.

Here is blender2ogre options

And the result is shown below

4-weight linkage is said to be limitation of ogre format. Why is same limitations applied to .blend format?

I had a model that morphed all weird like that once, I needed to change the “swap axis” in the ogre exporter, or reset the rotation of the armature and model, one of the two, but I think the first.

It seems I solved the prolem:

I applied scale to Mesh(Ctrl+A) and added “Master” bone.

@ayvango how did you make inverse kinematics for bones? It seems you did not use any constraints. Very interesting.