浏览代码

* ArmatureModifier now sets 0.0 weight if the vertex should not be influenced by any bones. This fixes "disappearing" object issues in animated models.

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9732 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
Sha..rd 13 年之前
父节点
当前提交
a0d0b0922f
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      engine/src/blender/com/jme3/scene/plugins/blender/modifiers/ArmatureModifier.java

+ 2 - 1
engine/src/blender/com/jme3/scene/plugins/blender/modifiers/ArmatureModifier.java

@@ -338,8 +338,9 @@ import com.jme3.util.BufferUtils;
 						}
 						bonesGroups[0] = Math.max(bonesGroups[0], weightIndex);
 					} else {
+						// 0.0 weight indicates, do not transform this vertex, but keep it in bind pose.
 						for (Integer index : vertexIndices) {
-							weightsFloatData.put(index * MAXIMUM_WEIGHTS_PER_VERTEX, 1.0f);
+							weightsFloatData.put(index * MAXIMUM_WEIGHTS_PER_VERTEX, 0.0f);
 							indicesData.put(index * MAXIMUM_WEIGHTS_PER_VERTEX, (byte) 0);
 						}
 					}