Blender/SkinPartition

From NifTools
Jump to: navigation, search

Skin Partition Warnings

Explanation

Sometimes when exporting a skinned model you get the following type of warning:

 WARNING: lost 0.064491 in vertex weights while creating skin partition

Most hardware implementations for skinning require that the number of bones influencing a single vertex cannot be more than 4. If you get this warning then this means that the exporter had to throw away some bone influences to meet this hardware constraint. Usually, the result in the game is not observable, but if it is, you need to reduce the number of bone influences per vertex.

Solution

Fortunately, the Blender scripts come with an extra script exactly aimed at reducing the number of bone influences per vertex.

  • save a backup of your model just in case
  • select all your skinned meshes
  • run the weight squash script

Screenshot.png

  • choose a sensible value for weight cutoff
    • for weight cutoff, take a number slightly higher than the highest number you got in the skin partition warnings; in our example that would be 0.07, which is slightly larger than 0.064491.
    • for minimum bones, leave it at 3; in very extreme cases it might have to be lowered to 2 or even 1
  • check the console: it will tell you which vertices were affected
  • check your meshes in edit mode: the affected vertices are selected
  • move a few of the bones in armature pose mode to make sure that the skinning is still the way you want it; for a very quick checkup, select all bones in pose mode, grab them, and move them around: any vertex that lost all bone influences (which can happen if your cutoff value is too large) will not move along and in this case you should run the script again with a smaller cutoff value or larger min bones value
  • re-try the export, if you still get warnings then run the weight squash script again, with a larger the weight cutoff value, until the warnings are gone (0.01 is a sensible increment)
Personal tools