【发布时间】:2018-04-27 08:42:51
【问题描述】:
我正在尝试使用 Scene Kit 和使用 SCNMorpher/Key Shapes 从 Blender 导出的资产为面部变形设置动画。
在导入的 DAE 文件中,我使用 ColladaMorphAdjuster 修复了 2 个关键形状,我可以在以下位置遍历它们
node?.morpher?.targets
记录为
Optional([<SCNGeometry: 0x1c4137ca0>, <SCNGeometry: 0x1c4137d40>])
但是当像SCNMorpher docs 网站上那样动画时,网格会变形:
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)
我尝试设置 unifiesNormals 但没有结果。
我找不到这些关键形状在 Scene Kit 视图中产生错误输出的原因。
【问题讨论】:
-
我们迫切需要更多 SceneKit Q/A,+1。
标签: ios scenekit blender collada