jeromeetienne / AR.js

Efficient Augmented Reality for the Web - 60fps on mobile!
MIT License
15.79k stars 2.22k forks source link

aframe-ar demo problem #159

Closed michellomp closed 5 years ago

michellomp commented 7 years ago

I have a problem with aframe-ar. arjs The demo with aframe-ar show the model even when the marker isn't visible anymore. I don't have this problem with tree.js demo.

Ruion commented 7 years ago

same. The 3D object appear before webcam video is drawn on canvas.

isuruwelagedara commented 7 years ago

`https://medium.com/arjs/augmented-reality-in-10-lines-of-html-4e193ea9fdbf -->

` use this cord
wimvdc commented 7 years ago

I have encountered the same issue. Sample code to reproduce:


<html>
<script src="https://aframe.io/releases/0.6.1/aframe.min.js"></script>
<script src="https://cdn.rawgit.com/jeromeetienne/AR.js/1.5.0/aframe/build/aframe-ar.js"> </script>
  <body style='margin : 0px; overflow: hidden;'>
    <a-scene embedded arjs>
      <a-marker-camera preset='hiro'>
        <a-box position='0 0.5 0' material='color: black;'></a-box>
      </a-marker-camera>
    </a-scene>
  </body>
</html>

But when using the code below, it works as expected.

<html>
<script src="https://aframe.io/releases/0.6.1/aframe.min.js"></script>
<script src="https://cdn.rawgit.com/jeromeetienne/AR.js/1.5.0/aframe/build/aframe-ar.js"> </script>
  <body style='margin : 0px; overflow: hidden;'>
    <a-scene embedded arjs>
    <a-marker preset="hiro">
            <a-box position='0 0.5 0' material='color: black;'></a-box>
    </a-marker>
    <a-entity camera></a-entity>
    </a-scene>
  </body>
</html>

If I'm not mistaking, the code examples have the same result. But they use a different approach.

javismiles commented 7 years ago

whats the status of this? I have the same problem, the marker is out but the object remains

javismiles commented 6 years ago

this really needs fixing I agree

when using a-entity camera, 3D object disappears when marker is not recognized

when using a-marker-camera , 3D object remains after we move away from marker

problem is a-marker camera works great, much better than a-entity camera, but this is a real problem that the projected object doesnt disappear after you move away, big bug

159 and #160

thank u

aschmelyun commented 6 years ago

Anyone have an update or potential fix for this? I'm having the same issue. I'd prefer to use a-marker-camera as my application needs the marker to be static and the camera to move.

Vektorz3D commented 6 years ago

Bump for update

nfriend21 commented 6 years ago

any update on this?

nfriend21 commented 6 years ago

if anyone on this thread figured out a solution on this, would be awesome if you could post how you did it. thanks so much!

kageori commented 6 years ago

I also face the same issue now. Is it not updated yet?

armonnaeini commented 5 years ago

I have encountered the same issue. Sample code to reproduce:


<html>
<script src="https://aframe.io/releases/0.6.1/aframe.min.js"></script>
<script src="https://cdn.rawgit.com/jeromeetienne/AR.js/1.5.0/aframe/build/aframe-ar.js"> </script>
  <body style='margin : 0px; overflow: hidden;'>
    <a-scene embedded arjs>
      <a-marker-camera preset='hiro'>
        <a-box position='0 0.5 0' material='color: black;'></a-box>
      </a-marker-camera>
    </a-scene>
  </body>
</html>

But when using the code below, it works as expected.

<html>
<script src="https://aframe.io/releases/0.6.1/aframe.min.js"></script>
<script src="https://cdn.rawgit.com/jeromeetienne/AR.js/1.5.0/aframe/build/aframe-ar.js"> </script>
  <body style='margin : 0px; overflow: hidden;'>
    <a-scene embedded arjs>
      <a-marker preset="hiro">
            <a-box position='0 0.5 0' material='color: black;'></a-box>
      </a-marker>
      <a-entity camera></a-entity>
    </a-scene>
  </body>
</html>

If I'm not mistaking, the code examples have the same result. But they use a different approach.

This is the solution to this issue. If you look at A-Frame's documentation they also utilize the same methodology. You must wrap your entities with a marker and then have a separate camera entity. Do not combine the marker and camera into one entity.