Display 3D object files with natural feature tracking markers

I’m working on an Android AR project with ARToolkit and I need to show 3D object files using natural feature tracking markers. The problem is that all the sample code I found uses .osg format for NFT markers, but regular square markers work with .obj files. I want to load my .obj model but make it work with NFT instead of the traditional square markers. Has anyone figured out how to do this? I’ve been stuck on this for a while and would really appreciate any help or code examples. The documentation doesn’t seem to cover this specific case very well.

This occurs because ARToolkit treats natural feature tracking (NFT) markers differently from square ones. NFT markers require additional preprocessing that square markers do not. To get started, you should create your NFT dataset using the genTexData tool included with ARToolkit. Ensure that your rendering pipeline is capable of processing the tracking data correctly. An important consideration is that NFT markers provide different transformation matrices compared to square markers. It may be necessary to adjust your model loading code accordingly. In my experience, it’s beneficial to separate the .obj loading from marker detection, treating both as distinct processes that share transformation data.

hey, i ran into this too! u gotta convert your obj files for nft markers. try using the artoolkit nft utils to generate the markers, then just load your obj like usual. the tricky part is setting up the markers - loading the model is the easy part. good luck!

Oh interesting! Quick question - are you trying to replace the square markers completely with NFT, or use both together? I’m curious if there’s a performance difference between the approaches.

When I was messing with similar stuff, the .osg format seemed more like how the samples were set up, not a hard requirement. Have you tried just swapping the model loading part while keeping everything else?

What’s your target image for the NFT marker? Some images track way better than others - ones with lots of distinct features vs smooth surfaces. Maybe the issue isn’t .obj loading but how well your marker image gets detected?

Also, when you say “regular square markers work with .obj files” - are you using the same rendering code for both? If that part already works, couldn’t you just change the marker detection and keep the rest? Or am I missing something about how the pipeline fits together?