SceneKit DAE animation not appearing in attributes
The SceneKit editor in Xcode does not display the root node in the scene graph view, and it might be the one that holds the animation.
You should be able to retrieve the root node's animation programmatically.
How to import complex .dae model to SceneKit?
It's obvious that you must export complex models from 3D packages divided into smaller parts. And, of course, you do not necessarily need to export all your 3D models separately (per one model basis). In any case, a preparation of all your 3D models for using in Game Engine
is extremely time consuming process. There's no one button solution.
Complex scenes like city could be logically divided to groups of static objects: skyscrapers, posts, asphalt, houses, benches, etc. But animated objects, like people, trees or cars, must be exported from Blender and imported into SceneKit separately.
Remember, all corresponding textures for these 3D objects (whether it's a single object or a group of objects) must be saved as UV-mapped square jpeg
or png
files (like 512x512 or 1024x1024 pix). And do not forget about low-poly collision meshes for dynamics.
Look at WWDC 2015 SceneKit session. You'll see how to build 3D scene in Xcode's Scene Editor.
To accomplish your goal you need to export smaller parts (logically divided, as I mentioned earlier) of your 3D scene from Blender, import all the parts into SceneKit's (ARKit) project and then combine them all through Swift code. Also, many 3D packages can export multiple animations as a single animation with, so called, sub-animations. In this SO post you can find how to handle it.
SceneKit – Animation with DAE file format
It was my mistake, I need to save rig in initial model. Previously I saved rig only for animation. Now animation works fine.
Common export format between OpenGL and scene kit
SCNRenderer
will allow you to use your SceneKit model and code in your GL ES project.
https://developer.apple.com/reference/scenekit/scnrenderer
The Model I/O framework may be of use to you as well. An MDLAsset
can be created from a SceneKit scene, saved to file, and then loaded in an Open GL project. See MDLAsset(SCNScene: scene)
.
Related Topics
What's the Difference Between Struct Based and Class Based Singletons
Swift 2/iOS 9 - Libz.Dylib Not Found
Any Way to Iterate a Tuple in Swift
Swift Repl: How to Import, Load, Evaluate, or Require a .Swift File
Different Ways to Initialize a Dictionary in Swift
How to Create a View-Based Nstableview Purely in Code
Show Am/Pm in Capitals in Swift
How to Add Alamofire Url Parameters
How to Create a Generic Array Extension That Sums Number Types in Swift
One-Line Closure Without Return Type
Every Uialertcontroller Disappear Automatically Before User Responds - Since iOS 13
Swift: 'Hashable.Hashvalue' Is Deprecated as a Protocol Requirement;
Difference Between 2 Dates in Weeks and Days Using Swift 3 and Xcode 8
Simple Way to Read Local File Using Swift
Why Are Doubles Printed Differently in Dictionaries
In Swift, How to Cast to Protocol with Associated Type
Swift 5: What's 'Escaping Closure Captures Mutating 'Self' Parameter' and How to Fix It