* MeshLoader will no longer generate NaN weights for vertices with no bone-weight assignments. Instead it will generate zero which will cause those vertices to remain in the bind pose.

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9727 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
Sha..rd 13 years ago
parent a2ff0ba179
commit 2bfd91ef2e
  1. 2
      engine/src/ogre/com/jme3/scene/plugins/ogre/MeshLoader.java

@ -344,7 +344,7 @@ public class MeshLoader extends DefaultHandler implements AssetLoader {
if (sum != 1f) {
weightsFloatData.position(weightsFloatData.position() - 4);
// compute new vals based on sum
float sumToB = 1f / sum;
float sumToB = sum == 0 ? 0 : 1f / sum;
weightsFloatData.put(w0 * sumToB);
weightsFloatData.put(w1 * sumToB);
weightsFloatData.put(w2 * sumToB);

Loading…
Cancel
Save