After a discussion at NSCoder last week I thought that it might make sense to explore a couple of ideas. The first concept was to replace the rendering mechanism in Mood Board with something a little more robust. Since I’ve already got a bunch of 3d experience, SceneKit seemed like a perfect fit. Find out why after the jump.
Why Should Mood Board be 3D?
When you consider that a mood board in traditional media is really a collage of different elements it’s easy to think of it as a 3d space. Gathering together scraps of paper, drawings and found objects together on a piece of bristol, to make something entirely new.
The idea behind taking Mood Board fully into 3 dimensions comes from this concept, but also because there are many performance enhancements and features that make a lot more sense in the context of a 3d space. We might want to provide realtime cast-shadows from edges of transparently bordered shapes, or drop shadows universally. We might want to rotate things into perspective such that you can combine items into entirely new composite pieces quickly.
Why Doesn’t SceneKit Work?
Once I had the idea that 3d could work for Mood Board; I started exploring SceneKit. This is an Apple provided API that allows you to work with 3d “Scene Graph” data. Scene graphs are made up of nodes and each node is essentially a 3d transform in a virtualized 3d space. This would be perfect for my needs.
The problem starts when you want to apply texture maps to 3d shapes in SceneKit. Most of the boards that I use for work have over 100 items on them. When you start assigning images to objects in SceneKit your performance degrades quickly. I believe this is because SceneKit doesn’t understand any kind of realtime batching to the graphics card. Each object in your scene is unique. This means that memory consumption shoots up very quickly; even over what we’re already using in CoreAnimation layers.
What the Future Holds
I have a few more tricks I can try to move into a more feature-rich rendering layer and I intend to explore them. It would have been awesome if I could have replaced my view layer quickly with SceneKit but at this point it doesn’t seem to be robust enough to support the kinds of pixel pushing I want to do with Mood Board.
At least the amount of time I spent working with SceneKit has informed me enough to know how to use it at a basic level. Hopefully Apple will come back to it in their next major OS release and we’ll see something a bit more industrial strength in a year or so.
Find out More
Doing visual arts on the Mac? Buy a copy of Mood Board
Check out some more information about Mood Board right here!