Armature From Blender to JME via Ogre

Hey, I’m trying to get a rigged model into Jmonkey and when I try to export it to OgreXML it says I have “902 vertices weighted to too many bones [try increasing the Trim-Weights threshold option]”. Does anyone know how to fix this? Is there a script or at least a way I can go through and choose which bones a vertex group are assigned to? Thanks,



Luke

Using envelops can cause this. To fix it you have to turn envelops off and painstakingly assign vertices to bones. That’s the only way I know how, but I am not a Blender expert so there might be a better way. You could try first by shrinking the envelope radius a lot, then turn off the envelopes and see if that assigns fewer vertices to the bones.

I’ve always preferred manually painting vertex weight to armatures and vertices, and imo it’s worth learning, since you can usually predict better in how the armature will deform the mesh during animation.

There is a VERY handy trick to know with blender when it comes to weight painting.

To attach your mesh to your armature, instead of adding an Armature modifier in the object modifier stack, select your object, then shift select your armature and hit ctrl+P/with automated weights.



This will create the armature modifier AND create vertex groups with weighs according to the armature for your mesh. Of course it’s not always perfect, but it does at least 90% to 100% of the work depending on the model complexity.



To avoid @homestargamer error, make sure your model is as much as possible in a X pose.

Then you can try what the export script suggest : increase the weight threshold. Most of the time you have some vertice weighted with a very low value(near 0), so they will only barely be affected by the bone movement. Especially when you are painting by hand (you are probably gonna “erase” some weight by painting it with a 0 values…this count as a weight).

Raising the threshold will only consider weight that are over a certain value thus reducing the problem you have

Hey guys, I faced the same problem while exporting model and later I was able to fix it. take a look at



http://hub.jmonkeyengine.org/groups/general-2/forum/topic/ogre-exporter-problem-1/?#post-182663



Regards,



Ryan.K