Skip to main content

AR markers

Ar markers are much like QR codes, a black and white (or other high contrast color combination) pattern that stores information. In AR they're used as markers that denote positions of 3D models. 

Builtin Barcode Markers


These are built into ar.js (or rather artoolkit / arcore ar.js uses). They are generally reliable and will provide stable models even on older devices. Artoolkit Barcode Markers collection (github).

Custom AR Pattern Markers

Any simple pixel art image can be converted into a marker. A marker should be:

  • not symmetric (sides need to be different)
  • very simple (16x16 px)
  • have a border in high contrast with the image

The best method was to draw 16x16 pixel art, then upscale to 1024x1024 and use the pattern trainer on ar.js github to train it and generate a patt file and an image. The patt files it generates are a simple text format file that denotes the value of each pixel. Checking the file visually for likeness with the input raster image is a good manual check to see if the training went well.

The stability of these markers is a bit worse then the builtin barcode markers but can be trained and tweaked for usability.

Markers from images - natural feature tracking (NFT) 

Any image (meaning a photograph) can be trained to become a marker using NFT (not affiliated with non fungible tokens in any way).

An image used as an NFT tracker should be:

  • large resolution
  • not a simple graphic (the process needs recognizable different parts)
  • good general explanation of AR markers here
  • good rundown of the tools used here

We generally didn't have good results (models were jittery and not very stable) with images but people have documented it in the past and it works pretty good. 

Installing the node version and running it locally didn't seem to make it go faster, so we used the online version as it seems to be tweaked for perfomance and tweaking the node version didn't provide any significantly better results.

This is the Git repository with decent documentation on training NFT markers:
https://github.com/Carnaux/NFT-Marker-Creator.

This qr code generator has nothing to do with the project but it's a decend online generator and the link to it should be here.https://qr-code-generator.org.