3
votes

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)

Distortion

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.

1
We desperately need more SceneKit Q/A, +1.Vatsal Manot

1 Answers

1
votes

Distortion was caused by applying modifiers on export from Blender (Apply Modifiers) - subsurf in my case.