Hi everybody!
We’re so pleased to announce the release of our newest tracking type, Curved Tracking.
Curved surface tracking expands upon Zappar’s existing image tracking (which was previously only designed for flat surfaces), opening up a world of new opportunities. This is especially true when it comes to connected packaging, allowing you to create interactive, branded experiences on a range of curved surfaces including cans, cups or bottles.
You can view a quick showcase of curved tracking in action below :
This post details how to get started with the beta version of curved tracking in a Universal AR SDK project.
What makes a good curved target image?
- Lots of unique high-contrast texture
- Good coverage over the object
- Repetitive patterns
- Largely see-through or translucent labels
- Fancy finished, e.g very shiny or colour changing
Training a curved image using the ZapWorks CLI
To begin with curved image tracking, you’ll need to install and train up a curved target with the ZapWorks CLI.
To install and use the ZapWorks CLI, first make sure you have Node.js installed, then run the following command in a terminal on your computer:
npm i -g @zappar/zapworks-cli@beta
Once installed, you can use the train
function to create a .zpt
from your PNG / JPG image, as seen in the example below:
zapworks train YOURFILENAME.jpg/png --circumference=..cm --input-height=..cm
In order for the image training algorithm to understand the curvature of your object, please specify exactly one of:
–radius=Xcm
–circumference=Xcm
For the algorithm to understand the real-world size of your target, specify exactly one of:
–input-height=Xcm
–input-width=Xcm
–dpi=X
(Image above showing example command usage)
Using the .zpt
file in your Universal AR SDK Project
Once you’ve trained your target image, you’ll have a .zpt
file in the chosen directory. To use the .zpt
file in your Universal AR SDK project, simply follow the usual image tracking implementation according to your chosen SDK.
Click the drop downs below to learn how to include your curved target image in your Universal AR SDK project.
Implementing Image Tracking: Universal AR Web-Based SDKS
Universal AR SDK for A-Frame
Universal AR SDK for Three.js
Universal AR SDK for Babylon.js
Universal AR SDK for React Three.js
Implementing Image Tracking: Universal AR for Unity & PlayCanvas
(Image above showing
package.json
for beta branch usage in a Universal AR for Three.js project)
(Image above showing example image tracker usage with Universal AR for Three.js)
Previewing
To preview your experience, simply test as you ordinarily would by following the Universal AR Testing guide, or the README
instructions if you are cloning our Bootstrap Projects or Example Projects.
Publishing
To publish your experience, do so as you ordinarily would by following the Universal AR Hosting guide.
We hope you have fun experimenting and we’re delighted to see what you create!
Team ZapWorks