World Effects with Spark AR
For many the dancing, Snapchat hotdog was their first glimpse into augmented reality. This Snapchat filter would place an animated dancing hotdog in the user’s environment, this filter was great for entertaining the nephew who was always asking if there were any games on your phone but beyond the novelty there are layers of data to place this effect on your living floor.
World effects such as the dancing Hotdog rely on the devices camera to locate a plane, adding a second layer of interaction on top of our physical world. Instead of the filter moving with the devices camera, the filter is stationed in world space.
World Space Vs Camera Space
In World space an object becomes more interactive and behaves like an object in physical space. This allows the user to move their device camera without the object changing its location. It’s fixed to a position in our physical world. Do this by moving the object out of camera space, and adjust the size of the 3D object.
Companies like Ikea or Amazon use Augmented reality to let the user try out the furniture before they buy. Placing digital models of items they sell into the customers enviroment. Devices that come equipped with a lidar sensor have a more accurate placement of the 3D model in their room.
Placement of world effects onto our physical world require a plane tracker. Plane trackers locate a horizontal surface and any object that is placed within the plane tracker will be seen on that surface. In Spark AR,
Camera Space
Camera space is not set in a fixed location instead it moves with the camera. Filters that are located in camera space don’t allow the user to view the effect in a 3D environment, instead the filter is laid on top of what the camera is viewing.
Both world and camera space have their own specific uses. Objects in World space are more interactive. Camera space filters are great for promotional media. Depending on which space to work in will effect how the user interacts with the filter. Both have some form of interaction within them, but dive deeper in AR interaction with target tracking.
Target Tracking
Target tracking allows the user to use their device camera and point at a specific target in the real world, this will then trigger an effect.
In order for this to work, the camera must know what to look for before applying effect. Using target tracking in Spark AR requires a fixed target. Once the camera detects the target, an effect will be triggered. Change your target tracker texture to the image you want the effect to be applied too.
When the user is trying to locate a physical world object, they must know what exactly they are looking for. Target markers help the user locate the object and disappear when target is found.
To make it easier for the camera to detect the target there are some basic requirements, the image must be detailed, high contrast, sharp, in a fixed position, and best applied at eye level. Target tracking in a moving car on a highway isn’t the best, more like positioning your poster in a room at a appropriate height.
Sources