Hey everyone, I’m having trouble with AR.js and NFT markers. When I use a regular AR marker, everything works fine. The object shows up where it should and looks good. But with NFT markers, things go weird.
The object ends up way below the marker and it’s tiny! I can’t figure out why this is happening or how to fix it. Has anyone else run into this problem?
Here’s what I’ve tried:
<a-scene embedded arjs='sourceType: webcam; debugUIEnabled: false;'>
<a-nft type='nft' url='./marker/kanji' smooth='true' smoothCount='10' smoothTolerance='.01' smoothThreshold='5'>
<a-entity gltf-model='./asset/magnemite/scene.gltf' scale='5 5 5' position='50 150 0'>
</a-entity>
</a-nft>
<a-entity camera></a-entity>
</a-scene>
Any ideas on how to get the object to appear correctly with NFT markers? Thanks in advance for any help!
hey there OwenGadget78! i’ve been tinkering with AR.js too and ran into similar issues with NFT markers. it’s a bit of a head-scratcher, right? 
have you tried adjusting the position and scale values? sometimes the default settings can be way off for NFT markers. maybe try something like:
<a-entity gltf-model='./asset/magnemite/scene.gltf' scale='0.1 0.1 0.1' position='0 0 0'>
start with smaller values and work your way up. also, double-check your NFT marker file - is it high contrast and detailed enough? that can make a big difference.
oh, and stupid question, but are you sure your camera is positioned correctly? sometimes that can throw things off too.
let us know if any of that helps! what kinda cool AR stuff are you working on anyway?
I’ve encountered similar issues with NFT markers in AR.js. One thing that often helps is adjusting the transformation matrix. Try adding a custom matrix4 to your a-nft element like this:
<a-nft type='nft' url='./marker/kanji' smooth='true' smoothCount='10' smoothTolerance='.01' smoothThreshold='5'>
<a-entity matrix4='1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1'>
<a-entity gltf-model='./asset/magnemite/scene.gltf' scale='0.1 0.1 0.1' position='0 0 0'></a-entity>
</a-entity>
</a-nft>
This can help reset the positioning. Also, ensure your NFT marker image has sufficient feature points for tracking. If issues persist, consider using a different NFT marker generation tool or adjusting your marker’s design for better detection.
yo OwenGadget78, NFT markers can be tricky. have u tried tweaking the smoothCount and smoothTolerance? sometimes those need adjusting. also, check ur camera position - it might need tweaking too. and make sure ur NFT marker image is high-quality. keep us posted on how it goes!