Week 1: ARKit
ARKit is Apple’s augmented reality framework for iOS devices. It allows you to create AR experiences for iPad and iPhone. I want to create a small app with which the user can choose a model and place it in their own living room. In order to do this I will need to take a look at different things. Firstly I have to get a single model in my own room, for this I will need to look at World Tracking. This creates a rear-camera experiences and tracks surfaces and objects.
ARWorldTrackingConfiguration tracks the device’s movement with six degreed of freedom 6DOF. (rotation and movement). In order to get a surface to place something on I will need to use planeDetection.
planeDetection is a property that attempts to detects flat surfaces, these surfaces you can then use to place models on. Tip: This property can be given .horizontal, .vertical or an array for both!
let configuration = ARWorldTrackingConfiguration()
configuration.planeDetection = [.horizontal, .vertical]
Debugging
A very handy trick is to set .showStatisctics to true, this displays various information about scene rendering performance and GPU resource usage, such as frames per second.
With .debugOptions you can get even more in depth and you can draw overlays with SceneKit that helps with debugging.
sceneView.debugOptions = [ARSCNDebugOptions.showFeaturePoints]
I found that the example above was the most efficient. It showed the points that the AR view found and used to connect to find flat surfaces.
These are the first major points I’ve found scrolling through the documentation. In my next post I’ll try to have finished a small demo where I test out all of these properties.
Thanks for reading! See you in the next post.