Exporting DAE animations for Scenekit

I checked out the FOX2 example for Scenekit that showcases the new animation protocol. I was rooting around in the character files trying to

discover how they were organizned, and noticed that the following files had no geometry only the rig for the animation and hence the animation

data as well.


These are the files that I'm referring to:


•max_idle.sc

•max_jump.scn

•max_spin.scn


How were these created and exported for Scenekit and with which exporter? Maya, Max, C4D? OpenCollada?

What are the recommended settings? How do you export just rigs and animation data for Scenekit without the model?


A shoutout to the Scenkit dev team: you guys are creating an amazing game engine(thank you), it's well organized and easy to use.


However but you're neglecting a very important aspect. There are no tutorials on how to export authored content files(modles with rigs and animation) for Scenekit. This is super important information, and without putting some more thought into how to teach people how to do this, your framework will continue to see very little adoption.

Please, please begin to address this. With ARKit combined with Scenekit you have good chance of seeing many people use this framework.

And as always, feel free to file feature requests via the bug reporter for things you like to see going forward.

This has been my major complain also, year after year they dont explain or post a clear workflow to export and import 3D assets to Scenekit

I could not agree more. This tech has great potential and yet there is barely anything that I have been able to find in the developer docs, or anywhere else for that matter, that clearly explains the recommended workflow to export 3d assets (with animation and rigs/deformers) into scenekit and how best to troubleshoot the inevitable bumps on the way.


Please, please, please Apple, help the people who want to help put your amazing tech on the pedestal it deserves.

Were you able to come up with a usable workflow?


I'm looking to try to export animations from Maya to .dae file to use in SceneKit.


So far whenever I try to do that, I get a "file could not be opened" error -- in Xcode, when opening the .dae.


Any solution?

I'm having the same problem and it's really frustrating because I got it to work with XCode 9 for a short while. Now, XCode 10 can't even open my 3DS Max exported .dae files. For the models, exporting into alembic files (.abc) then to collada (.dae) seems to work, but it looks like the model looses it's "skin" and the mesh doesn't get animated by animations copied from a second collada file. Like everyone here, I'm asking Apple to give us a hint on a workable workflow from 3ds Max (as it is an industry standard tool) to Scenekit. Scenekit is amazing but the documentation isn't great and it's a major pain point!

  1. Download Blender for macOS

https://blender.org

  1. Install Collada Exporter plugin

https://github.com/godotengine/collada-exporter

  1. Download a .blend file containing animations

https://opengameart.org/content/bird

  1. Open the .blend file and click the Editor Type icon

  1. Select Nonlinear Animation

  1. Make sure the NLA Action strip (the animation) is unmuted by clicking the check icon next to the Animation Name.

DAE models only support one animation, so only one can be checked.

  1. Click File > Export > Better Collada (.dae)

  1. Toggle the Export Animation option and click Export DAE

Collada (DAE) only supports one animation per .dae file.

From Blender, save each animation (NLA Action strip) as a unique .dae file.

For example:

Bird_Idle.dae Bird_Walk.dae Bird_Fly.dae

Once you have the various .DAE files, each containing a single animation, you load the animation from a .DAE file with animation and play it in another without the animation:

// MARK: - Animations -
func loadAnimation(sceneName: String, extensionName: String, targetNode: SCNNode) {
// source of .dae with animation
let sceneURL = Bundle.main.url(forResource: sceneName, withExtension: extensionName)
let sceneSource = SCNSceneSource(url: sceneURL!, options: nil)
for key in sceneSource?.identifiersOfEntries(withClass: CAAnimation.self) ?? [] {
if let animationObj = sceneSource?.entryWithIdentifier(key,
withClass: CAAnimation.self) {
if animationObj.isKind(of: CAAnimationGroup.self) {
animationObj.repeatCount = .infinity
animationObj.fadeInDuration = CGFloat(0)
animationObj.fadeOutDuration = CGFloat(0.0)
// play animation in target .dae node
playAnimation(animation: animationObj, node: targetNode)
return
}
}
}
}
func playAnimation(animation: CAAnimation, node: SCNNode) {
let player = SCNAnimationPlayer.init(animation: SCNAnimation.init(caAnimation: animation))
node.addAnimationPlayer(player, forKey: "myAnimation")
player.play()
}

Example

// idle
self.loadAnimation(sceneName: "assets.scnassets/models/bird/bird_idle", extensionName: "dae", targetNode: birdNode)
// walk
self.loadAnimation(sceneName: "assets.scnassets/models/bird/bird_walk", extensionName: "dae", targetNode: birdNode)
// fly
self.loadAnimation(sceneName: "assets.scnassets/models/bird/bird_fly", extensionName: "dae", targetNode: birdNode)
Exporting DAE animations for Scenekit
 
 
Q