From 88fc2674e2e86481ec851a250050e44c2ed35c75 Mon Sep 17 00:00:00 2001 From: andi smithers Date: Wed, 19 Sep 2018 23:54:51 -0700 Subject: [PATCH 1/9] Added renormalization of mesh. Added a call to this in gltfloader --- loaders/src/glTF/2.0/babylon.glTFLoader.ts | 1 + src/Mesh/babylon.mesh.ts | 63 ++++++++++++++++++++++ 2 files changed, 64 insertions(+) diff --git a/loaders/src/glTF/2.0/babylon.glTFLoader.ts b/loaders/src/glTF/2.0/babylon.glTFLoader.ts index 0d2b1a096f3..6e18092cc5f 100644 --- a/loaders/src/glTF/2.0/babylon.glTFLoader.ts +++ b/loaders/src/glTF/2.0/babylon.glTFLoader.ts @@ -639,6 +639,7 @@ module BABYLON.GLTF2 { promises.push(this._loadVertexDataAsync(context, primitive, babylonMesh).then(babylonGeometry => { return this._loadMorphTargetsAsync(context, primitive, babylonMesh, babylonGeometry).then(() => { babylonGeometry.applyToMesh(babylonMesh); + babylonMesh.normalizeSkinWeights(); }); })); diff --git a/src/Mesh/babylon.mesh.ts b/src/Mesh/babylon.mesh.ts index 4995c6d6b68..62626ae3795 100644 --- a/src/Mesh/babylon.mesh.ts +++ b/src/Mesh/babylon.mesh.ts @@ -1674,6 +1674,69 @@ } } + /* + Renormalize the mesh and patch it up if there are no weights + Similar to normalization by adding the weights comptue the reciprical and multiply all elements. this wil ensure that everything adds to 1. + However in the case of 0 weights then we set just a single influence to 1. + We check in the function for extra's present and if so we use the normalizeSkinWeightsWithExtras rather than the FourWeights version. + */ + public normalizeSkinWeights():void { + if (this.isVerticesDataPresent(VertexBuffer.MatricesWeightsKind)) { + if (this.isVerticesDataPresent(VertexBuffer.MatricesWeightsExtraKind)) { + this.normalizeSkinWeightsAndExtra(); + } + else { + this.normalizeSkinFourWeights(); + } + } + } + + private normalizeSkinFourWeights():void { + let matricesWeights = (this.getVerticesData(VertexBuffer.MatricesWeightsKind)); + let numWeights = matricesWeights.length; + for (var a=0; athis.getVerticesData(VertexBuffer.MatricesWeightsExtraKind)); + let matricesWeights = (this.getVerticesData(VertexBuffer.MatricesWeightsKind)); + let numWeights = matricesWeights.length; + for (var a=0; a Date: Wed, 19 Sep 2018 23:54:51 -0700 Subject: [PATCH 2/9] Added renormalization of mesh. Added a call to this in gltfloader --- loaders/src/glTF/2.0/babylon.glTFLoader.ts | 1 + src/Mesh/babylon.mesh.ts | 63 ++++++++++++++++++++++ 2 files changed, 64 insertions(+) diff --git a/loaders/src/glTF/2.0/babylon.glTFLoader.ts b/loaders/src/glTF/2.0/babylon.glTFLoader.ts index b303d8bb9cb..ae42b411ba0 100644 --- a/loaders/src/glTF/2.0/babylon.glTFLoader.ts +++ b/loaders/src/glTF/2.0/babylon.glTFLoader.ts @@ -639,6 +639,7 @@ module BABYLON.GLTF2 { promises.push(this._loadVertexDataAsync(context, primitive, babylonMesh).then(babylonGeometry => { return this._loadMorphTargetsAsync(context, primitive, babylonMesh, babylonGeometry).then(() => { babylonGeometry.applyToMesh(babylonMesh); + babylonMesh.normalizeSkinWeights(); }); })); diff --git a/src/Mesh/babylon.mesh.ts b/src/Mesh/babylon.mesh.ts index 496c48d56c6..197a599f5fe 100644 --- a/src/Mesh/babylon.mesh.ts +++ b/src/Mesh/babylon.mesh.ts @@ -1672,6 +1672,69 @@ } } + /* + Renormalize the mesh and patch it up if there are no weights + Similar to normalization by adding the weights comptue the reciprical and multiply all elements. this wil ensure that everything adds to 1. + However in the case of 0 weights then we set just a single influence to 1. + We check in the function for extra's present and if so we use the normalizeSkinWeightsWithExtras rather than the FourWeights version. + */ + public normalizeSkinWeights():void { + if (this.isVerticesDataPresent(VertexBuffer.MatricesWeightsKind)) { + if (this.isVerticesDataPresent(VertexBuffer.MatricesWeightsExtraKind)) { + this.normalizeSkinWeightsAndExtra(); + } + else { + this.normalizeSkinFourWeights(); + } + } + } + + private normalizeSkinFourWeights():void { + let matricesWeights = (this.getVerticesData(VertexBuffer.MatricesWeightsKind)); + let numWeights = matricesWeights.length; + for (var a=0; athis.getVerticesData(VertexBuffer.MatricesWeightsExtraKind)); + let matricesWeights = (this.getVerticesData(VertexBuffer.MatricesWeightsKind)); + let numWeights = matricesWeights.length; + for (var a=0; a Date: Thu, 20 Sep 2018 00:24:51 -0700 Subject: [PATCH 3/9] added delcaration in preview so that we could rebuild gltfloader --- dist/preview release/babylon.d.ts | 9 ++++++++- src/Mesh/babylon.mesh.ts | 25 +++++++++++++------------ 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/dist/preview release/babylon.d.ts b/dist/preview release/babylon.d.ts index 4c8dec4dae7..be2f02c15ab 100644 --- a/dist/preview release/babylon.d.ts +++ b/dist/preview release/babylon.d.ts @@ -25072,6 +25072,13 @@ declare module BABYLON { * Normalize matrix weights so that all vertices have a total weight set to 1 */ cleanMatrixWeights(): void; + /** + * Renormalize the mesh and patch it up if there are no weights + * Similar to normalization by adding the weights comptue the reciprical and multiply all elements. this wil ensure that everything adds to 1. + * However in the case of 0 weights then we set just a single influence to 1. + * We check in the function for extra's present and if so we use the normalizeSkinWeightsWithExtras rather than the FourWeights version. + */ + public normalizeSkinWeights(): void; /** @hidden */ _checkDelayState(): Mesh; private _queueLoad; @@ -30063,7 +30070,7 @@ declare module BABYLON { /** * The SPS is a single updatable mesh. The solid particles are simply separate parts or faces fo this big mesh. *As it is just a mesh, the SPS has all the same properties than any other BJS mesh : not more, not less. It can be scaled, rotated, translated, enlighted, textured, moved, etc. - + * The SPS is also a particle system. It provides some methods to manage the particles. * However it is behavior agnostic. This means it has no emitter, no particle physics, no particle recycler. You have to implement your own behavior. * diff --git a/src/Mesh/babylon.mesh.ts b/src/Mesh/babylon.mesh.ts index 197a599f5fe..8493cba5c9c 100644 --- a/src/Mesh/babylon.mesh.ts +++ b/src/Mesh/babylon.mesh.ts @@ -1672,13 +1672,13 @@ } } - /* - Renormalize the mesh and patch it up if there are no weights - Similar to normalization by adding the weights comptue the reciprical and multiply all elements. this wil ensure that everything adds to 1. - However in the case of 0 weights then we set just a single influence to 1. - We check in the function for extra's present and if so we use the normalizeSkinWeightsWithExtras rather than the FourWeights version. + /** + * Renormalize the mesh and patch it up if there are no weights + * Similar to normalization by adding the weights comptue the reciprical and multiply all elements. this wil ensure that everything adds to 1. + * However in the case of 0 weights then we set just a single influence to 1. + * We check in the function for extra's present and if so we use the normalizeSkinWeightsWithExtras rather than the FourWeights version. */ - public normalizeSkinWeights():void { + public normalizeSkinWeights(): void { if (this.isVerticesDataPresent(VertexBuffer.MatricesWeightsKind)) { if (this.isVerticesDataPresent(VertexBuffer.MatricesWeightsExtraKind)) { this.normalizeSkinWeightsAndExtra(); @@ -1688,8 +1688,8 @@ } } } - - private normalizeSkinFourWeights():void { + // faster 4 weight version. + private normalizeSkinFourWeights(): void { let matricesWeights = (this.getVerticesData(VertexBuffer.MatricesWeightsKind)); let numWeights = matricesWeights.length; for (var a=0; athis.getVerticesData(VertexBuffer.MatricesWeightsExtraKind)); let matricesWeights = (this.getVerticesData(VertexBuffer.MatricesWeightsKind)); let numWeights = matricesWeights.length; @@ -1719,12 +1719,13 @@ // check for invalid weight and just set it to 1. if (t===0) matricesWeights[a] = 1; else{ - // renormalize so everything adds to 1 + // renormalize so everything adds to 1 use reciprical let recip = 1 / t; matricesWeights[a]*=recip; matricesWeights[a+1]*=recip; matricesWeights[a+2]*=recip; matricesWeights[a+3]*=recip; + // same goes for extras matricesWeightsExtra[a]*=recip; matricesWeightsExtra[a+1]*=recip; matricesWeightsExtra[a+2]*=recip; From fb2191dd36a165edabce16abd4d0b079636902f3 Mon Sep 17 00:00:00 2001 From: andi smithers Date: Thu, 20 Sep 2018 00:48:09 -0700 Subject: [PATCH 4/9] updated documentation --- dist/preview release/what's new.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dist/preview release/what's new.md b/dist/preview release/what's new.md index 54a664e1e25..8a6e2be6398 100644 --- a/dist/preview release/what's new.md +++ b/dist/preview release/what's new.md @@ -128,7 +128,7 @@ - Added FXAA and MSAA support to the StandardRenderingPipeline ([julien-moreau](https://github.com/julien-moreau)) - Make teleportCamera public in VR experience helper ([TrevorDev](https://github.com/TrevorDev)) - Added optional alphaFilter parameter to ```CreateGroundFromHeightMap``` to allow for heightmaps to be created that ignore any transparent data ([Postman-nz](https://github.com/Postman-nz)) - +- Added renormalization of mesh weights to babylon.mesh. This is used automatically by GLTFLoader but can be called manually as well. ([Bolloxim](https://github.com/Bolloxim)) ### glTF Loader @@ -140,6 +140,7 @@ - Added support for MSFT_audio_emitter ([najadojo](http://www.github.com/najadojo)) - Added support for custom loader extensions ([bghgary](http://www.github.com/bghgary)) - Added support for validating assets using [glTF-Validator](https://github.com/KhronosGroup/glTF-Validator) ([bghgary](http://www.github.com/bghgary)) +- Added automatically renormalizes skinweights when loading geometry. Calls core mesh functions to do this ([Bolloxim](https://github.com/Bolloxim)) ### glTF Serializer - Added support for exporting the scale, rotation and offset texture properties ([kcoley](http://www.github.com/kcoley)) From 8f98c144f4c6a0aeacee5253fc8335ac9f5fbcac Mon Sep 17 00:00:00 2001 From: andi smithers Date: Thu, 20 Sep 2018 23:09:59 -0700 Subject: [PATCH 5/9] would help to actually add the updated 'whatsnew' --- dist/preview release/what's new.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dist/preview release/what's new.md b/dist/preview release/what's new.md index 8a6e2be6398..a7911c05c8d 100644 --- a/dist/preview release/what's new.md +++ b/dist/preview release/what's new.md @@ -128,7 +128,8 @@ - Added FXAA and MSAA support to the StandardRenderingPipeline ([julien-moreau](https://github.com/julien-moreau)) - Make teleportCamera public in VR experience helper ([TrevorDev](https://github.com/TrevorDev)) - Added optional alphaFilter parameter to ```CreateGroundFromHeightMap``` to allow for heightmaps to be created that ignore any transparent data ([Postman-nz](https://github.com/Postman-nz)) -- Added renormalization of mesh weights to babylon.mesh. This is used automatically by GLTFLoader but can be called manually as well. ([Bolloxim](https://github.com/Bolloxim)) +- Added renormalization of mesh weights to babylon.mesh. Also added a validationSkin function to report out any errors on skinned meshes. ([Bolloxim](https://github.com/Bolloxim)) + ### glTF Loader From af9bc15dfa7f3931df4baab7f28811d347e6c268 Mon Sep 17 00:00:00 2001 From: andi smithers Date: Thu, 20 Sep 2018 23:53:35 -0700 Subject: [PATCH 6/9] missing @ symbol in function documentation --- dist/preview release/babylon.d.ts | 4 ++-- src/Mesh/babylon.mesh.ts | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/dist/preview release/babylon.d.ts b/dist/preview release/babylon.d.ts index 501fb6db03a..ff2441ea01f 100644 --- a/dist/preview release/babylon.d.ts +++ b/dist/preview release/babylon.d.ts @@ -25860,11 +25860,11 @@ declare module BABYLON { * We check in the function for extra's present and if so we use the normalizeSkinWeightsWithExtras rather than the FourWeights version. */ public normalizeSkinWeights(): void; - /** + /** * ValidateSkinning is used to determin that a mesh has valid skinning data along with skin metrics, if missing weights, * or not normalized it is returned as invalid mesh the string can be used for console logs, or on screen messages to let * the user know there was an issue with importing the mesh - * returns a validation object with skinned, valid and report string + * @returns a validation object with skinned, valid and report string */ public validateSkinning() : {skinned:boolean, valid:boolean, report:string}; /** @hidden */ diff --git a/src/Mesh/babylon.mesh.ts b/src/Mesh/babylon.mesh.ts index 174f290e764..d44a82a1d32 100644 --- a/src/Mesh/babylon.mesh.ts +++ b/src/Mesh/babylon.mesh.ts @@ -1762,8 +1762,10 @@ } /** - * ValidateSkinning returns a validation report along with skin metrics, if missing weights, or not normalized it is returned as invalid mesh - * the string can be used for console logs, or on screen messages to let the user know there was an issue with importing the mesh + * ValidateSkinning is used to determin that a mesh has valid skinning data along with skin metrics, if missing weights, + * or not normalized it is returned as invalid mesh the string can be used for console logs, or on screen messages to let + * the user know there was an issue with importing the mesh + * @returns a validation object with skinned, valid and report string */ public validateSkinning() : {skinned:boolean, valid:boolean, report:string} { let matricesWeightsExtra = (this.getVerticesData(VertexBuffer.MatricesWeightsExtraKind)); From ed8449da88f92f41cefb3028bfea4627c8a81077 Mon Sep 17 00:00:00 2001 From: andi smithers Date: Fri, 21 Sep 2018 21:59:19 -0700 Subject: [PATCH 7/9] renamed to cleanMatrixWeights --- dist/preview release/babylon.d.ts | 6 +-- src/Mesh/babylon.mesh.ts | 76 +------------------------------ 2 files changed, 2 insertions(+), 80 deletions(-) diff --git a/dist/preview release/babylon.d.ts b/dist/preview release/babylon.d.ts index ff2441ea01f..6223efe28c8 100644 --- a/dist/preview release/babylon.d.ts +++ b/dist/preview release/babylon.d.ts @@ -25849,17 +25849,13 @@ declare module BABYLON { */ render(subMesh: SubMesh, enableAlphaMode: boolean): Mesh; private _onBeforeDraw; - /** - * Normalize matrix weights so that all vertices have a total weight set to 1 - */ - cleanMatrixWeights(): void; /** * Renormalize the mesh and patch it up if there are no weights * Similar to normalization by adding the weights comptue the reciprical and multiply all elements. this wil ensure that everything adds to 1. * However in the case of 0 weights then we set just a single influence to 1. * We check in the function for extra's present and if so we use the normalizeSkinWeightsWithExtras rather than the FourWeights version. */ - public normalizeSkinWeights(): void; + public cleanMatrixWeights(): void; /** * ValidateSkinning is used to determin that a mesh has valid skinning data along with skin metrics, if missing weights, * or not normalized it is returned as invalid mesh the string can be used for console logs, or on screen messages to let diff --git a/src/Mesh/babylon.mesh.ts b/src/Mesh/babylon.mesh.ts index d44a82a1d32..1d25e2779c4 100644 --- a/src/Mesh/babylon.mesh.ts +++ b/src/Mesh/babylon.mesh.ts @@ -1619,87 +1619,13 @@ } } - /** - * Normalize matrix weights so that all vertices have a total weight set to 1 - */ - public cleanMatrixWeights(): void { - const epsilon: number = 1e-3; - - let noInfluenceBoneIndex = 0.0; - if (this.skeleton) { - noInfluenceBoneIndex = this.skeleton.bones.length; - } else { - return; - } - - let matricesIndices = (this.getVerticesData(VertexBuffer.MatricesIndicesKind)); - let matricesIndicesExtra = (this.getVerticesData(VertexBuffer.MatricesIndicesExtraKind)); - let matricesWeights = (this.getVerticesData(VertexBuffer.MatricesWeightsKind)); - let matricesWeightsExtra = (this.getVerticesData(VertexBuffer.MatricesWeightsExtraKind)); - let influencers = this.numBoneInfluencers; - let size = matricesWeights.length; - - for (var i = 0; i < size; i += 4) { - let weight = 0.0; - let firstZeroWeight = -1; - for (var j = 0; j < 4; j++) { - let w = matricesWeights[i + j]; - weight += w; - if (w < epsilon && firstZeroWeight < 0) { - firstZeroWeight = j; - } - } - if (matricesWeightsExtra) { - for (var j = 0; j < 4; j++) { - let w = matricesWeightsExtra[i + j]; - weight += w; - if (w < epsilon && firstZeroWeight < 0) { - firstZeroWeight = j + 4; - } - } - } - if (firstZeroWeight < 0 || firstZeroWeight > (influencers - 1)) { - firstZeroWeight = influencers - 1; - } - if (weight > epsilon) { - let mweight = 1.0 / weight; - for (var j = 0; j < 4; j++) { - matricesWeights[i + j] *= mweight; - } - if (matricesWeightsExtra) { - for (var j = 0; j < 4; j++) { - matricesWeightsExtra[i + j] *= mweight; - } - } - } else { - if (firstZeroWeight >= 4) { - matricesWeightsExtra[i + firstZeroWeight - 4] = 1.0 - weight; - matricesIndicesExtra[i + firstZeroWeight - 4] = noInfluenceBoneIndex; - } else { - matricesWeights[i + firstZeroWeight] = 1.0 - weight; - matricesIndices[i + firstZeroWeight] = noInfluenceBoneIndex; - } - } - } - - this.setVerticesData(VertexBuffer.MatricesIndicesKind, matricesIndices); - if (matricesIndicesExtra) { - this.setVerticesData(VertexBuffer.MatricesIndicesExtraKind, matricesIndicesExtra); - } - - this.setVerticesData(VertexBuffer.MatricesWeightsKind, matricesWeights); - if (matricesWeightsExtra) { - this.setVerticesData(VertexBuffer.MatricesWeightsExtraKind, matricesWeightsExtra); - } - } - /** * Renormalize the mesh and patch it up if there are no weights * Similar to normalization by adding the weights comptue the reciprical and multiply all elements. this wil ensure that everything adds to 1. * However in the case of 0 weights then we set just a single influence to 1. * We check in the function for extra's present and if so we use the normalizeSkinWeightsWithExtras rather than the FourWeights version. */ - public normalizeSkinWeights(): void { + public cleanMatrixWeights(): void { if (this.isVerticesDataPresent(VertexBuffer.MatricesWeightsKind)) { if (this.isVerticesDataPresent(VertexBuffer.MatricesWeightsExtraKind)) { From 7684063e543268730ca94f70f376686d81de17ba Mon Sep 17 00:00:00 2001 From: andi smithers Date: Sat, 22 Sep 2018 11:29:11 -0700 Subject: [PATCH 8/9] Corrected Spelling and reformated code to be consistent with style --- src/Mesh/babylon.mesh.ts | 107 ++++++++++++++++++++------------------- 1 file changed, 54 insertions(+), 53 deletions(-) diff --git a/src/Mesh/babylon.mesh.ts b/src/Mesh/babylon.mesh.ts index 2585d576bbc..713bf48734d 100644 --- a/src/Mesh/babylon.mesh.ts +++ b/src/Mesh/babylon.mesh.ts @@ -1622,8 +1622,8 @@ /** * Renormalize the mesh and patch it up if there are no weights - * Similar to normalization by adding the weights comptue the reciprical and multiply all elements. this wil ensure that everything adds to 1. - * However in the case of 0 weights then we set just a single influence to 1. + * Similar to normalization by adding the weights compute the reciprical and multiply all elements, this wil ensure that everything adds to 1. + * However in the case of zero weights then we set just a single influence to 1. * We check in the function for extra's present and if so we use the normalizeSkinWeightsWithExtras rather than the FourWeights version. */ public cleanMatrixWeights(): void { @@ -1643,17 +1643,19 @@ let matricesWeights = (this.getVerticesData(VertexBuffer.MatricesWeightsKind)); let numWeights = matricesWeights.length; - for (var a=0; athis.getVerticesData(VertexBuffer.MatricesWeightsExtraKind)); let matricesWeights = (this.getVerticesData(VertexBuffer.MatricesWeightsKind)); let numWeights = matricesWeights.length; - for (var a=0; athis.getVerticesData(VertexBuffer.MatricesWeightsExtraKind)); let matricesWeights = (this.getVerticesData(VertexBuffer.MatricesWeightsKind)); - if (matricesWeights===null || this.skeleton==null) - { + if (matricesWeights === null || this.skeleton == null) { return {skinned:false, valid: true, report:"not skinned"} } let numWeights = matricesWeights.length; - let numberNotSorted :number = 0; - let missingWeights :number = 0; - let maxUsedWeights :number = 0; + let numberNotSorted : number = 0; + let missingWeights : number = 0; + let maxUsedWeights : number = 0; let numberNotNormalized :number = 0; - let numInfluences :number = matricesWeightsExtra===null ? 4 : 8; + let numInfluences : number = matricesWeightsExtra === null ? 4 : 8; var usedWeightCounts = new Array(); - for (var a=0; a<=numInfluences;a++){ - usedWeightCounts[a]=0; + for (var a = 0; a <= numInfluences; a++) { + usedWeightCounts[a] = 0; } - const toleranceEpsilon :number = 0.001; + const toleranceEpsilon : number = 0.001; - for (var a=0; alastWeight) numberNotSorted++; - if (d!==0) usedWeights++; - t+=d; + for (var b = 1; b < numInfluences; b++) { + var d = b < 4 ? matricesWeights[a + b] : matricesWeightsExtra[a + b-4]; + if (d > lastWeight) numberNotSorted++; + if (d !== 0) usedWeights++; + t += d; lastWeight = d; } // count the buffer weights usage usedWeightCounts[usedWeights]++; // max influences - if (usedWeights>maxUsedWeights) maxUsedWeights = usedWeights; + if (usedWeights > maxUsedWeights) maxUsedWeights = usedWeights; // check for invalid weight and just set it to 1. - if (t===0) - { + if (t === 0) { missingWeights++; } - else{ + else { // renormalize so everything adds to 1 use reciprical let recip = 1 / t; let tolerance = 0; - for (b=0; b toleranceEpsilon) numberNotNormalized++; @@ -1759,12 +1762,10 @@ let matricesIndices = (this.getVerticesData(VertexBuffer.MatricesIndicesKind)); let matricesIndicesExtra = (this.getVerticesData(VertexBuffer.MatricesIndicesExtraKind)); let numBadBoneIndices : number = 0; - for (var a=0; a=numBones||index<0) numBadBoneIndices++; + for (var a = 0; a < numWeights; a++) { + for (var b = 0; b < numInfluences; b++) { + let index = b < 4 ? matricesIndices[b] : matricesIndicesExtra[b-4]; + if (index >= numBones || index < 0) numBadBoneIndices++; } } @@ -1772,7 +1773,7 @@ // log mesh stats var output = "Number of Weights = " + numWeights/4 + "\nMaximum influences = " + maxUsedWeights + "\nMissing Weights = " + missingWeights + "\nNot Sorted = " + numberNotSorted + - "\nNot Normalized = " + numberNotNormalized + "\nWeightCounts = [" +usedWeightCounts+"]" + + "\nNot Normalized = " + numberNotNormalized + "\nWeightCounts = [" + usedWeightCounts + "]" + "\nNumber of bones = " + numBones + "\nBad Bone Indices = " + numBadBoneIndices ; return {skinned:true, valid: missingWeights===0 && numberNotNormalized===0 && numBadBoneIndices===0, report: output}; From 0816574537abaf1687856d30310e9dcb5e677570 Mon Sep 17 00:00:00 2001 From: David Catuhe Date: Mon, 24 Sep 2018 08:24:19 -0700 Subject: [PATCH 9/9] Update babylon.mesh.ts --- src/Mesh/babylon.mesh.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mesh/babylon.mesh.ts b/src/Mesh/babylon.mesh.ts index 713bf48734d..30e6ab23fae 100644 --- a/src/Mesh/babylon.mesh.ts +++ b/src/Mesh/babylon.mesh.ts @@ -1622,7 +1622,7 @@ /** * Renormalize the mesh and patch it up if there are no weights - * Similar to normalization by adding the weights compute the reciprical and multiply all elements, this wil ensure that everything adds to 1. + * Similar to normalization by adding the weights compute the reciprocal and multiply all elements, this wil ensure that everything adds to 1. * However in the case of zero weights then we set just a single influence to 1. * We check in the function for extra's present and if so we use the normalizeSkinWeightsWithExtras rather than the FourWeights version. */