Inspired by Minecraft and LEGOs, we created an app to promote creativity on smartphones. Many people like being creative but find a blank canvas daunting. "Recipes" inside the app let users create like the most talented individuals -- similar to how a cooking recipe lets anyone cook like Thomas Keller.

The problem so far is users say the app doesn't look "3D" enough.

Here's the relevant code that creates the scene and creates blocks: https://gist.github.com/panabee/dca88a591f94a3904023dacabd020ad9.

What they mean is they expect the app to look more like apps like this:

enter image description here enter image description here enter image description here

With encouragement from one of the admins, these screenshots from our app illustrate the disparity in "3Dness":

enter image description here enter image description here

We're using SceneKit on iOS, but are having trouble identifying what is needed to make the app look more like the images above. We played with lighting and textures, but are new to 3D graphics as well as SceneKit and are unsure what to do.

We have tried to find consultants on StackOverflow, LinkedIn, Github, but this expertise appears not so common.

A few questions:

1) For iOS, is SceneKit capable of producing the images above, or do we need to use something like Metal?

2) If SceneKit is capable, what are the key concepts to learn?

3) (Happy to strike this question if it's considered off-topic) Which websites/forums could we find people to help provide advice if we get stuck?

  • $\begingroup$ @trichoplax ok just wanted to err on the side of caution regarding spam, will upload screenshots. re what i'm asking, questions #1 and #2 aren't specific enough? $\endgroup$
    – Crashalot
    Jun 25 '16 at 20:55
  • $\begingroup$ Incidentally, thank you for erring on the side of caution regarding spam - this is much appreciated. I think it's quite clear this is a genuine question rather than advertising - so you need not worry. $\endgroup$
    – trichoplax
    Jun 25 '16 at 22:21
  • $\begingroup$ @trichoplax ok thanks will upload within 15-20 minutes. thanks again for the help! $\endgroup$
    – Crashalot
    Jun 25 '16 at 22:26
  • $\begingroup$ @trichoplax uploaded with screenshots from our app. thanks! $\endgroup$
    – Crashalot
    Jun 25 '16 at 22:37

What is missing?

Now that we can see images from your app, the difference that stands out most to me is the lack of shadows and ambient occlusion. This gives a very flat look as the colour of a surface does not vary according to its surroundings. This makes a big difference to how much an image appears to have depth.

Another effect which may be less important is that the surfaces are crystal clear all the way up to the horizon. Adding a mist/fog effect so that objects become gradually more obscured the further they are from the camera helps to give the impression of distance.

Both these effects can be seen most obviously in the first example image in the question. The nearest building shows ambient occlusion on top of the stepped red roof, and also the grass is in partial shade near to the buildings and animals. The trees in the distance look more obviously far away due to the distance fog making them only partially visible.

Can SceneKit provide these?

I haven't used SceneKit myself, but a search online reveals that both ambient occlusion and distance fog effects are both possible using SceneKit.

Another effect not used in the example images, but that you might like to look into, is depth of field. The example images all have everything in focus at the same time, whereas photographs often have a focal distance at which everything is in clear focus, with anything nearer or farther being out of focus. It seems SceneKit can also handle this. Since your competitors don't appear to be using this, you could either view this as unimportant, or as a feature that could give you an advantage.

I'd expect narrow depth of field to make a building app awkward, as parts of the object you are building would be out of focus. You may be interested in a wide depth of field that only creates a subtle blur for objects too distant to be part of what is currently being built, if that suits your purposes.

As you guessed, asking for off site resources is off topic. However, you can ask further questions about computer graphics programming here on this site, if you run into any problems implementing these effects.

  • 1
    $\begingroup$ Take a look at the SCNTechnique Class Reference... $\endgroup$
    – rebusB
    Jun 26 '16 at 20:20
  • $\begingroup$ Great answer! I completely agree with shadows and ambient occlusion being the main factors contributing to the "3D-ness" of the other apps. Fog is less important for small, enclosed spaces but is required for performance in large, open spaces and is rather trivial to implement. $\endgroup$
    – Dan
    Mar 7 '17 at 13:51

1) Drawing a bunch of 3d cubes with simple textures? Yes, SceneKit can do that.

2) Way too broad a question... try reading the docs.

3) Since this is a platform specific question try the scenekit and scene-kit tags on stackOverflow and Game Development, but see answer 2 first.

good luck!

  • $\begingroup$ OK will try narrowing the question, thanks. $\endgroup$
    – Crashalot
    Jun 25 '16 at 20:54
  • 2
    $\begingroup$ Looks like you are more up to speed on scene kit than I thought. Trichoplax has the answer, its about the lighting/shadowing. $\endgroup$
    – rebusB
    Jun 26 '16 at 2:06

SceneKit, as of iOS 9/OS X El Capitan, can handle all of the suggested lighting changes from @trichoplax. The newly announced (June 2016) Physically Based Rendering (PBR), and support for Pixar's Universal Scene Description, make some stunningly beautiful images, if you can required iOS 10 (hint: you should).

SceneKit is using Metal or OpenGL (your choice) as the renderer. What SceneKit gets you is a higher level of abstraction. I think that's a good approach for the problem you're trying to solve.

I particularly recommend the videos of the SceneKit presentations at WWDC 2014, 2015, and 2016. The What's New presentation for 2014 was written in SceneKit, and is available as sample code. I haven't seen 2016's code yet but it's been promised. Also take a look at the ModelIO framework, which is designed for loading various standard 3d, texture, and lighting formats and making them available for SceneKit, Metal, and OpenGL.

David Rönnqvist's SceneKit book (on iBook Store) steps through the different texture, material, and lighting controls. It's a bit outdated now because of the PBR and ModelIO enhancements, but it's valuable in learning how to manipulate the scene.

Chris Language's book 3D iOS Games by Tutorials has two sections you should work through. Section II is, as far as I know, the only written documentation on using the Xcode Scene Editor. In the process, he covers the fundamentals of lighting and materials. Section III goes into more details on lighting and shadows. The book is pretty good at making render-related terminology and concepts accessible. I'm not a fan of its jumbling of view controllers and game logic, though.

I think ultimately you're going to need to develop some intermediate level skill with a 3D modeling tool like Maya, Blender, or Cheetah3D, if only to understand the common challenges and paradigms for 3D rendering.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.