From a0d0b0922f7e105bc533be375b54cd50d7ba4685 Mon Sep 17 00:00:00 2001 From: "Sha..rd" Date: Sat, 15 Sep 2012 19:35:59 +0000 Subject: [PATCH] * 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 --- .../jme3/scene/plugins/blender/modifiers/ArmatureModifier.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/engine/src/blender/com/jme3/scene/plugins/blender/modifiers/ArmatureModifier.java b/engine/src/blender/com/jme3/scene/plugins/blender/modifiers/ArmatureModifier.java index 722da115f..7b5b1f6d5 100644 --- a/engine/src/blender/com/jme3/scene/plugins/blender/modifiers/ArmatureModifier.java +++ b/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); } }