Image Tracking

The Zappar Image Tracking Target lets you attach digital content to a physical image as it moves around in the camera view. It's great for putting 3D content onto posters, business cards, flyers, etc.

The Zappar package can detect and track content to a Target Image. Before developing an image tracked project in Unity you must first train an image into a Target Image (.zpt file).

Zappar Image Trainer

To train an image using the Zappar Image Trainer, follow the steps below:

  1. Open the Zappar Image Trainer window in from the Editor tab in the Zappar Menu entry.
  2. Add an image to the Source image path field.
  3. We recommend setting default parameters for the first use of the image trainer but please note that you will need to enable ZPT Overwrite explicitly if the file already exists in the StreamingAssets folder.
  4. You can also decide not to include an image preview with your .zpt file to minimize your build size.
  5. maxWidth and maxHeight refers to the training model parameters and won't resize your source or preview image. We recommend keeping it unchanged for optimum usage.
  6. Click Start.

Zappar Image Trainer

The resulting image will be automatically added to your StreamingAssets folder.

ZapWorks CLI

If you'd prefer, you can use the ZapWorks CLI tool to generate a target image easily via the following command:

zapworks train myImage.png

The ZapWorks CLI will generate a .zpt file (i.e. myImage.png.zpt) that should be placed in a folder named StreamingAssets in the root level of your project.

Please note that you will have to manually drag and drop the .zpt file into the StreamingAssets folder, as Unity will not recognize it as a file type that can be imported using "Import New Asset".

You will need to create a StreamingAssets folder inside the main Asset folder, if one doesn't already exist.

Image Tracking Target


  1. Add the Image Tracking Target into your Hierarchy.
  2. Select on the Zappar Image Tracking Target in the Hierarchy.
  3. Update the Target property to the recently trained Target Image (found in the StreamingAssets folder).
  4. Drag and drop digital content on top of the Zappar Image Tracking Target in the Hierarchy.


This content should become a child of the Image Tracking Target and appear tracked to it in the viewport.

Curved Image Tracking Target

While training a flat image is straightforward, curved images require a few extra parameters such as:

  • top_radius
  • bottom_radius
  • side_length
  • circumference

However, training an image for a cylindrical target with the Zappar Image Trainer is identical to training one for an ordinary flat target, except for step 6.

Cylindrical Targets

  1. Open the Zappar Image Trainer window in from the Editor tab in the Zappar Menu entry.
  2. Add an image to the Source image path field.
  3. We recommend setting default parameters for the first use of the image trainer but please note that you will need to enable ZPT Overwrite explicitly if the file already exists in the StreamingAssets folder.
  4. You can also decide not to include an image preview with your .zpt file to minimize your build size.
  5. maxWidth and maxHeight refers to the training model parameters and won't resize your source or preview image. We recommend keeping it unchanged for optimum usage.
  6. Make sure the Curved image target box is checked and Cylindrical target is selected (see screenshot below)
  7. Click Start.

Cylindrical target training settings

Please note that the maxWidth and maxHeight refers to the training model parameters and doesn't resize your source or preview image. We recommend keeping it unchanged for optimum use.

Conical Targets

For conical targets, most of the steps are once again the same except for step 7 and 8.

  1. Open the Zappar Image Trainer window in from the Editor tab in the Zappar Menu entry.
  2. Add an image to the Source image path field.
  3. We recommend setting default parameters for the first use of the image trainer but please note that you will need to enable ZPT Overwrite explicitly if the file already exists in the StreamingAssets folder.
  4. You can also decide not to include an image preview with your .zpt file to minimize your build size.
  5. maxWidth and maxHeight refers to the training model parameters and won't resize your source or preview image. We recommend keeping it unchanged for optimum usage.
  6. Make sure the Curved image target box is checked and Conical target is selected (see screenshot below).
  7. Enter the Top radius, Bottom radius and Side length parameters.
  8. Click Start.

Conical target training settings

Conical targets can either have a larger top or bottom radius. The outlines shown below represent the case where the top radius is larger than the bottom radius. The conical target will be a cone in the unique case where either the top or bottom radius is 0.

Again, the training image must be adjusted to match (i.e. the inner circle in the image below wouldn't exist and the diagonal lines would meet in the middle).

Conical targets top and bottom radius

All physical units specified are converted to default coordinates such that one unit is equal to half the height of the input image.

On Seen and On Not Seen Events

The Zappar Image Tracking Target triggers events when the physical target image enters and exits the camera view (On Seen and On Not Seen, respectively). With these events, you can specify something to happen when either of these events is triggered. For example, showing and hiding content:

On Seen and On Not Seen Events

Please refer to the Advanced Usage article for further details.

zapcode branded_zapcode i