ARToolKit iOS app only recognizes first NFT marker from markers.dat file

I’m working on an iOS application using ARToolKit and I need to track several NFT markers at the same time. I’ve created the feature set files (.fset) and image set files (.iset) for my target images and updated my markers.dat configuration file to include both markers.

The problem I’m running into is that my app only shows the 3D object on whichever NFT marker is listed first in the markers.dat file. The second marker gets completely ignored. If I swap the order of the markers in the configuration file, then the object appears on the other marker instead.

Has anyone else encountered this issue before? Am I missing something in my setup or is this a known limitation?

This sounds like a memory allocation issue I’ve dealt with before. ARToolKit tends to only load the first marker configuration properly when you’ve got multiple NFT markers defined. Check your initialization code - you need each marker loaded into separate tracking instances instead of overwriting the same memory space. I’ve seen this happen when people don’t properly increment the marker ID assignments or don’t allocate enough memory for multiple concurrent tracking processes. Make sure you’re calling the initialization functions for each marker individually and that your tracking loop checks against all loaded marker IDs, not just the first one. Also check that your .fset and .iset files aren’t corrupted or too similar in their feature patterns - this can cause conflicts during recognition.

Interesting - sounds like it might be how your camera feed processes detections. Are you running a single detection thread that stops scanning once it finds the first marker?

I’ve seen this in other AR frameworks where the detection algorithm exits early. Quick test: cover the first marker while the second one’s visible. Does it detect the second marker or show nothing?

Also curious about your markers.dat setup. How are you defining the marker entries? Different tracking IDs for each marker, or could there be config overlap causing conflicts?

One more thing - which iOS device are you testing on? Older devices had memory constraints that caused weird behavior with multiple NFT tracking (usually crashes though, not ignored markers).

Can you share a snippet of your markers.dat file? Obviously remove any sensitive stuff first.

had this exact issue last year. you need to enable multi-marker mode in your artoolkit config before loading the markers.dat file - by default it only processes the first entry. look for a flag like AR_MULTI_PATTERN_DETECTION_MODE in your initialization code. also check your device’s processing power since tracking multiple nft markers is pretty intensive.