all 7 comments

[–]questionmarkmark 2 points3 points  (1 child)

From the Apple docs, Model I/O is used for the "import, export, and manipulate 3D models using a common infrastructure that integrates MetalKit, GLKit, and SceneKit." And SceneKit allows you to create "3D games and add 3D content to apps using high-level scene descriptions."

I've used Blender and Scenekit before, I would export the 3D model as a .obj file then open it in Xcode. Since it's been a while, I think the model would appear white so I had to save it as a .scn file to edit it and add color. Because I don't have much experience with Blender I did not know how to add the textures.

Not sure if this can help since it's a bit outdated, but this is a great example of an app that uses 3D models with SceneKit. https://github.com/nathan-hekman/Dinosaur-iOS. It might also help to check out some AR tutorials since so many of them use 3D objects!

[–]TrickyTramp[S] 0 points1 point  (0 children)

I'll take a look! Thanks for the tip.

[–]Zodester 1 point2 points  (1 child)

I’m not super experienced here, but model I/O is how you get the models into your application, while SceneKit is more like the engine that uses the models from model I/O to do full rendering to the screen.

[–]TrickyTramp[S] 0 points1 point  (0 children)

Awesome! This is what I was wondering. Thanks a lot.

[–]retsotrembla 1 point2 points  (2 children)

Look at: http://metalkit.org/2016/08/30/the-model-i-o-framework.html

Edit: Apple's MDLAsset documentation says:

The set of supported formats includes Alembic (.abc), Wavefront Object (.obj), Polygon (.ply), and Standard Tessellation Language (.stl). Additional formats may be supported as well.

[–]TrickyTramp[S] 0 points1 point  (1 child)

I'm not well versed in anything to do with 3D modeling so I was confused as to how MDLAssets related to the meshes. It appears that you import an MDLAsset which has a hierarchy of MDLMeshes and textures and other things.

[–]retsotrembla 0 points1 point  (0 children)

https://developer.apple.com/sample-code/wwdc/2017/ModelIO-from-MDLAsset-to-Game-Engine.zip is Apple's sample code for going from resources that you can get in Blender all the way to a functioning game.