I’m stuck with ARToolKit on Android. I want to use an NFT marker instead of the default hiro marker in the ARSimple sample app. Here’s what I tried:
int markerID = ARToolKit.getInstance().addMarker("nft;Data/custom_marker");
But I’m getting this error:
E/libar: Error: unable to open file 'Data/custom_marker.iset' for reading.
E/libar: Error opening file 'Data/custom_marker.iset'.
E/libARWrapper: ARController (native): [error]Error reading data from Data/custom_marker.fset
E/libARWrapper: ARController (native): [error]Error: Failed to load marker.
I’ve put the marker files (custom_marker.fset, custom_marker.fset3, custom_marker.iset) in the assets/Data folder. I’ve also tried uninstalling and reinstalling the app.
The marker seems to load, but queryMarkerVisible() doesn’t detect it, and SimpleRenderer#draw() is never called.
hey there PixStar54! nft markers can be tricky, but don’t worry - we’ll figure this out together have you tried using the genTexData() method before loading your marker? sometimes that helps with file access issues. also, just curious - what kind of nft marker are you using? is it a complex image or something simpler? might be worth experimenting with different marker designs to see if that affects detection. oh, and random thought - have you checked if ARToolKit is properly initialized before adding the marker? sometimes that can cause weird issues too. keep us posted on how it goes!
try double-checking your file paths. android sometimes has issues accessing assets. ensure your marker files are in the proper folder and try using absolute paths. also, verify file permissions. hope this helps and good luck troubleshooting!
I encountered a similar issue when integrating NFT markers in ARToolKit. One crucial step that’s often overlooked is ensuring the marker files are properly compressed and optimized for mobile devices. Large file sizes can cause loading issues and poor detection performance.
Try running your marker images through ARToolKit’s genTexData utility again, adjusting the parameters for better optimization. Also, double-check that your ARToolKit version fully supports NFT markers on Android - some older versions had limited functionality.
If problems persist, consider temporarily reverting to a standard marker to isolate whether the issue is specific to NFT implementation or a broader ARToolKit configuration problem. This methodical approach often reveals the root cause more quickly.