Matthew Matthew - 1 month ago 10x
Objective-C Question

Easiest method to export a SceneKit scene as a Collada .dae file?

I have an algorithmically-generated SceneKit scene that I'd like to be able to export as a Collada .dae file, e.g. for use in iBooks Author. Since SceneKit can import Collada files, I thought there might be a way to export them too, but couldn't find anything in the API.

Is there an easier way of doing this short of writing my own exporter that iterates over every node/geometry etc?


SCNScene has a writeToURL:options:delegate:progressHandler: OS X-only method that exports DAE. Keep in mind that DAE doesn't handle all features of SceneKit, though. Also note this method isn't available in iOS. (Though if you're preparing content for iBooks Author that's probably not a concern.)