Introduction
In this tutorial I will explain the step by step creation of NFT markers to use with the jsartoolkit5 augmented reality project. This article is intended for all creators who want to create their augmented reality web applications. A minimum knowledge of some concepts is however necessary to face the topic.
NFT (Natural Feature Tracking) markers are markers that are used to trace predetermined images. In essence it is a markerless technology, that is, without the use of markers. For a distinction on the types of markers I refer you to this article and at the bottom you will find other useful resources.
Materials needed
For the creation of the NFT markers it is essential to have a image in jpg or png color format and the necessary software: NFT-Marker-Creator.
Although it is possible to create NFT markers with different resolutions and pixel dimensions, it is strongly recommended to generate the NFT markers with an optimal resolution and size: a total size in pixels (base x height) between 3,300,000 - 3,500,000 pixels and dpi of at least 200 optimal 300.
You can use the online version of the application or the command line version. Below I will explain the two ways.
Generate the NFT marker
Via Webapp
You can use the Web App by going to this site: carnaux.github.io/NFT-Marker-Creator the page will look like this:
click on Upload Image a window will open where you can access the folder containing the image file. For example in this case we are going to use the reference image pinball.jpg in the jsartoolkit5 project:
at this point your window will look like this:
the page also shows the confidence level
, that is, an evaluation of the image on the basis of which the image is more or less suitable: the more stars there are, the better. Let’s say it is better that I have at least 3 to have enough descriptors.
You just have to click on the button Generate, the program will start immediately and in a short time three files will be created in this case: pinball.fset pinball.iset and pinball.fset3.
Via command line
You can also generate your own NFT markers with the command line application (i.e. via the console). In this case, however, it is necessary to install nodejs follow the instructions for installation on the site. You also need to download NFT-Marker-Creator: you can download the entire project as a .zip
file or via git
.
Download NFT-Marker-Creator as a .zip
Navigate to the main page of github.com/Carnaux/NFT-Marker-Creator, at the top right click on the green button Clone or download
should appears a window like this:
click on Download ZIP
, the package will be downloaded shortly. Extract the files in a folder of your choice and in a command window (console) type:
cd NFT-Marker-Creator-master
then go to Launch the node app.
Download the project with git (advanced level)
Git is a distributed version control program used by developers. In this way, updates can also be periodically downloaded. First of all install git. Once installed in the folder where you want to download NFT-Marker-Creator, type in a command line terminal:
git clone https://github.com/Carnaux/NFT-Marker-Creator.git
in this way the entire project will be downloaded, enter the folder:
cd NFT-Marker-Creator
Launch the node app
Launch the node app (with - i you can indicate the path of the image), in this case the pinball.jpg resides in the same folder as app.js:
node app.js -i pinball.jpg
see also in the example image:
send and the program will ask you for the exif data type Yes (Y):
then the program will ask you to enter the image’s width (W) and height (H) data:
In this case W=1637 and H=2048, the window should look like this:
in the next step you will be asked to enter the dpi:
Once these final data have been entered, the program will start processing the image to create the files:
In a short time the software will generate the files and ask you to save them:
In the end the confidence level
is also shown as for the web app.
Final conclusions
The easiest way to create your own NFT markers is to use the Webapp. Or you can take the one present in the repository. It is possible also to generate a NFT marker with the PWA app powered by WebARKit.org go to the tools page.
It is strongly recommended to generate your own NFT markers with the best possible image in terms of pixels numbers (width and height and therefore total pixels) and dpi:
- pixels > 3.000.000 (optimal 3.500.000)
- dpi > 200 (optimal 300)
Low values of these variables do not ensure that the image will always be traced …
Another very important factor is the confidence level
: I recommend reading this article in the wiki of the project.
Useful resources
NFT-Marker-Creator wiki: github.com/Carnaux/NFT-Marker-Creator/wiki
Artoolkit-docs:
- web version kalwalt.github.io/artoolkit-docs
- github repository github.com/kalwalt/artoolkit-docs
marker-nft-utilities: github.com/kalwalt/artoolkit-docs/blob/master/3_Marker_Training/marker_nft_utilities.md