I'm a software developer based in the UK. I am blogging regularly about software development & Apple

Scene Kit in modern iOS applications

In the past few weeks I was looking into Scene Kit, Apple's high level 3D framework. I was really impressed by what’s possible with just a few lines of code without knowing too much about the maths behind it. It took a few years for Apple to get there. Scene Kit was introduced at 2013's WWDC event and got ported onto iOS just one year later. In the few years since then it got a lot better. Now in Xcode's 9 Scene Kit editor, it not just possible to visualize simple 3D models but to build complex 3D worlds with it.

That doesn't mean just because it's easy to do so, every app should have some form of 3D content now.

Where does Scene Kit fit in?

Before I started to work with Scene Kit, I knew of course a little about it. To me Scene Kit was a framework that had to be used in conjunction with Sprite Kit. But when Apple revealed in one of their WWDC videos this year that Xcode's view debugger was based on Scene Kit, I was kind of intrigued. Although Scene Kit & Sprite Kit are by design a good match, it's of course possible to use one without the other. But then what can you do with it?


Pic 1: A seatbooking system

Well, it's excellent for visualizing data. Pie charts, bar diagrams or graphs look stunning and more polished. Although you can use it as well for fancy entertaining HUDs like the one below, Scene Kit really shines whenever you need to reflect the real world as close as possible. Apps for architects could use it to visualise 3D models of houses, bridges or sky scrapers and apps for cinemas and airlines to provide a stunning UX to their seat reservation systems.  A 3D system not only allows us to get closer to reality but enables us also to show more information by taking advantage of the 3rd dimension.


Pic 2: A loading HUD

Scene Kit is no silver bullet to polish one's app. 3D content needs to make sense. Its use needs to align with the design language of the app. It's not a good idea to force 3D effects into apps. 3D should improve an app's UX and underline its design language.

Learning Scene Kit

Although Scene Kit is part of cocoa touch now for the past 4 years, there isn't really a lot of documentation out there. True, Apple always documents the API but this only helps when one already has a broader understanding of 3D applications. My learning curve started out with watching all WWDC videos since 2013. As I said before, what's available for Scene Kit on macOS is available for Scene Kit on iOS. Since the first few WWDC demos were written in Objective-C, there isn't a big hurdle to get them running on the latest version of Xcode.

Apart from that there unfortunately seems to be only one good book out there: "3D graphics with Scene kit" by David Rönnqvist and one excellent tutorial by the same author written for OBJC.IO. Although the book is from 2014 most of it still applies. The author does an excellent job explaining what it takes to get your 3D content onto your iPhone.

Scene Kit is not just for games. In a follow up article I am gonna talk about my experience with building a demo for a 3D seat reservation system.

A seatbooking system based on Scene Kit

Continuous Integration with Travis