I'm trying to animate face morphing with Scene Kit and assets exported from Blender using SCNMorpher/Key Shapes.
In the imported DAE file I fix 2 Key Shapes with ColladaMorphAdjuster and I can traverse them at
node?.morpher?.targets
logs as
Optional([<SCNGeometry: 0x1c4137ca0>, <SCNGeometry: 0x1c4137d40>])
But the mesh gets distorted when animated like on SCNMorpher docs site :
let animation = CABasicAnimation(keyPath: "morpher.weights[0]")
animation.fromValue = 0.0;
animation.toValue = 1.0;
animation.autoreverses = true;
animation.repeatCount = HUGE;
animation.duration = 5;
node?.addAnimation(animation, forKey: nil)
I've tried setting unifiesNormals but with no result.
I cannot find the reason why those key shapes produce wrong output in Scene Kit view.