Is it possible to morph two buffergeometries in three.js? Is there a good example to reference? I am especially interested in manually morphing using morph target influences.
3
votes
1 Answers
1
votes
One possible solution is to literally manually do the morphing.. below is what I did, I'm also looking for a more elegant solution. Besides, I'm not so sure about the performance issues here.
for (var b = 0; b < 5; b++) { // iterate through 5 morph targets
var deltaVertices = blendshapes[b].children[0].geometry.attributes.position.array;
for (var i = 0; i < vertices.length; i++) {
// blend other shapes as delta to the Neutral one
3D_Model.children[0].geometry.attributes.position.array[i] += weight_b * deltaVertices[i];
}
}
"blendshapes" are loaded OBJ 3D Models using OBJLoader.js