I'm trying to figure out how to import .dae
files with animations into Xcode and SceneKit.
It works somewhat, but it's really buggy, I can't preview files, and Xcode sometimes crashes when trying to preview the .dae
files in Xcode.
Here's how I'm importing the animated models
- I download an animated character from Mixamo, as a Collada file, with the settings below.
- Create a brand new SceneKit iOS project, import
.dae
file, and select the file in the Xcode file list to preview it. The result can be seen below. I have zoomed all the way out to make sure I'm not just viewing the model from the inside of the mesh. The lines extend infinetly it looks like.
- If I use the ConvertToXcodeCollada workflow, and verify that the .dae XML only has one
<animation>
tag with corresponding closing tag, and then import it into Xcode, it won't open at all. See image below.
- If I import the
.dae
file version not converted using ConvertToXcodeCollada, and the add.dae
file as a sub reference in a.scn
Scene file, the model displays correctly, and the animation is playing correctly. Image below.
So how should I do this properly?
I have also tried to import animated models into Blender and then export it to Collada from there (with unstructions from tutorials on youtube), and same results. Is there a way I can do this a proper way, where it works like it should, without Xcode behaving buggy? It would be easier if I could actually preview and edit materials etc of the .dae
files directly, without having to always add them to an existing .scn
Scene Kit Scene.