1

I am trying to generate an AR scene using Image Tracking based on the tutorial in AR.js documentation. When I was using the sample URL as provided in the demo in Codepen, it worked but when I specified the URL to be the path to my own generated image descriptors in my local machine, I got this error:

"Error in loading marker on Worker 404"

Since it was working well when I used the image descriptors provided in the demo, I assume it's something to do with the image descriptors that I generated, I am actually using the same image provided in the demo too so I don't think the problem is with the quality of the marker.

Here is my code aframe-ar.html:

<a-scene
      vr-mode-ui="enabled: false;"
      renderer="logarithmicDepthBuffer: true;"
      embedded
      arjs="trackingMethod: best; sourceType: webcam;debugUIEnabled: false;"
>
    <a-nft
      type="nft"
      url="../image_descriptors/test"
      smooth="true"
      smoothCount="10"
      smoothTolerance=".01"
      smoothThreshold="5"
    >
        <a-entity
              gltf-model='https://arjs-cors-proxy.herokuapp.com/https://raw.githack.com/AR-js-org/AR.js/master/aframe/examples/image-tracking/nft/trex/scene.gltf'
              scale="5 5 5"
              position="100 100 0"
        >
        </a-entity>
  </a-nft>
      <!-- static camera that moves according to the device movemenents -->
  <a-entity camera></a-entity>
</a-scene>

Here is my folder structure:

src 
  | -- image_descriptors
         | -- test.fset
         | -- test.fset3
         | -- test.iset
  | -- assets
         | -- aframe-ar.html

1 Answer 1

0

I test it using XAMPP. I don't know why but if you see the console, there is log

base path: http://localhost:8080

So i tried

<a-nft
    type="nft"
    url="test/image_descriptors/test"
    smooth="true"
    smoothCount="10"
    smoothTolerance=".01"
    smoothThreshold="5">

with this folder structure:

htdocs (basically http://localhost:8080)
| -- test
     | -- image_descriptors
          | -- test.fset
          | -- test.fset3
          | -- test.iset
     | -- assets
          | -- aframe-ar.html

and it works

Sign up to request clarification or add additional context in comments.

1 Comment

a little late, but it was the problem with the path, thanks!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.