0

We have developed an AR experience with model-viewer, and it works ok with iOS and all Android models we have tested, except the Samsung S22 Ultra, on which the AR experience seems to work (show the AR placemente symbol and the 3D object ), but the background is completely black instead of showing the content of the camera.

This happens in Chrome and not only with our AR experience, but also with the model-viewer examples. (https://modelviewer.dev/examples/augmentedreality/index.html)

It is also verified that Chrome has permission to access the camera, and that device Privacy allows access to the camera.

Our AR experience code:

<!doctype html>
<html lang="en">
  <head>
    <title>&lt;model-viewer&gt; template</title>
    <meta charset="utf-8">
    <meta name="description" content="&lt;model-viewer&gt; template">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link type="text/css" href="./styles.css" rel="stylesheet"/>
    <!-- OPTIONAL: The :focus-visible polyfill removes the focus ring for some input types -->
    <script src="https://unpkg.com/focus-visible@5.0.2/dist/focus-visible.js" defer></script>
  </head>
  <body>
    <!-- <model-viewer> HTML element -->
    <model-viewer bounds="tight" enable-pan src="cubo60x80_texture.glb" ar ar-modes="webxr scene-viewer quick-look" camera-controls environment-image="neutral" poster="poster.webp" shadow-intensity="1">
      <div class="progress-bar hide" slot="progress-bar">
          <div class="update-bar"></div>
      </div>
      <button slot="ar-button" id="ar-button">
          View in your space
      </button>
      <div id="ar-prompt">
          <img src="ar_hand_prompt.png">
      </div>
    </model-viewer>  
    <script src="script.js"></script>
    <!-- Loads <model-viewer> for browsers: -->
    <script type="module" src="https://unpkg.com/@google/model-viewer/dist/model-viewer.min.js"></script>
  </body>
</html>
cuicmex
  • 23
  • 1
  • 5

1 Answers1

0

The issue was generated when in ar-modes="webxr scene-viewer quick-look", the webxr option was first in the priority list. For some reason the webxr option was trying to reproduce the experience, but with the black background error. If it is changed to ar-modes="scene-viewer quick-look webxr", try scene-viewer first and it works fine.

cuicmex
  • 23
  • 1
  • 5