소스 검색

* 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);
 						}
 					}