How to update normals while morphing geometry?

Hey guys !

Am trying to morph a plane into a sphere by following this fiddle. What am finding it difficult is how to update normals after setting the morphTargetInfluences. For reference, I have setup the mesh with MeshNormalMaterial to give more idea. Also sharing how it should be in the third image.

Never mind. Just got it working. Probably a noob issue.

For anybody who’s facing same issue, just had to put this in animation function

geometry.setAttribute('normal', computeMorphedAttributes( mesh ).morphedNormalAttribute);

1 Like