I'm using Maya to create animations to use in SceneKit.
I'm exporting as COLLADA file (.dae) using Maya's built-in FBX DAE exporter.
Animations on the node transform all work perfectly. For example, if we have an animation of the translation, rotation, or scale -- or a combination of those -- the animation imports correctly with the node.
However, when I import an animation based on keyed blend shape inputs, the animation doesn't play.
Within Xcode, if I click on the .dae and start looking at attributes, the node is there and has the blend shape (geometry morpher) attached, and it is manipulable.
Additionally, an animation is listed, and if I look at attributes within the node, the animation is listed there as well.
If I iterate through the SCNNode's animationKeys property, an animation is there and it has the correct amount of time associated with it. But I can't seem to get it to work.
On the Xcode side of things, I have tried:
- Saying "Update" when prompted to update the .dae file within Xcode.
- Not updating the .dae file when prompted
- Applying Jon Allee's Collada Morph Adjuster to the .dae file, before giving it to Xcode.
- Loading as SCNSceneSource instead of SCNScene
On the Maya side of things, I've tried several variations on the creation/export process:
- Tried the "remove single key" checkbox (with and without)
- Tried the "bake animation" setting in the export window
- Tried checking and unchecking "Deformed models" and "Blend Shapes"
- Under the Collada option in the export window, I've tried with and without "Single Matrix" checked. I usually check "Single Matrix" now or I get a bunch of animations within Xcode. However, checking or not checking this option does not appear to have any effect on SceneKit's behavior. The transform animations work either way, and the blend shape animations don't work either way.
I've also looked at dozens of Stack Overflow questions carefully -- this is not a duplicate question, as well as ones in Apple's forums and am pretty out of ideas.
I put together a quick sample project that demonstrates both the working and non-working, and includes the source Maya files as well as a couple of explainer videos.
I'm using:
Maya 2018.2 (Cut ID: 201711281015-8e846c9074)
Xcode 9.3 (9E145)
macOS High Sierra 10.13.4
iOS 11.3.1
Thanks!