1

When I click the AR quick look icon on my website it doesn’t show the 3d model and I get the message “object could not be opened”. The USDZ is currently hosted in a google bucket. Could the problem be with the way im hosting the USDZ? If so is there a recommend place for me to host USDZ files?

michaelm682
  • 11
  • 1
  • 3
  • Good morning: Same problem here. Along its development cycle, in order to share a webapp with our client, meanwhile it is also kept non-public, we have opted by protect the hosting server folder. Thanks for your time. – MAML Sep 01 '23 at 08:37

3 Answers3

2

I'm posting this answer here since this question is the first Google result for the problem I had:

When referencing the usdz file exactly like Apple's documentation proposes, the AR button is rendered on top of the teaser image. When clicking the linked image, Safari opens the Quick Look screen, but the message "Object could not be opened." pops up. However, when I access the usdz file directly by its URL, the AR model does get rendered properly.

The problem was that the complete site was protected by HTTP Basic Auth configured with an .htaccess file. Apparently, Safari will not use the existing session to access the usdz file and thus the file cannot be loaded.

In my case, it helped to remove the HTTP Basic Auth protection from the site. As soon as the site was publicly accessible, the AR model could be loaded without any problems.

Martin
  • 534
  • 4
  • 14
0

Hosting the USDZ file in a Google Storage bucket should work just fine, as long as the permissions on the bucket are set correctly so you can access the file. Safari will display the "Object could not be opened" message if there is any reason for not being able to open the USDZ file, and I haven't found a way to easily get more details than that.

Have you tried accessing the USDZ file url directly from Safari? It should show as zip file in the browser if the link, permissions, etc. is all correct.

Also, make sure that there isn't an issue with the USDZ file itself by downloading the USDZ file using the URL on a Mac and making sure that the file displays as expected in Quick Look in Finder.

If you can share some more details of what your code looks like and what you have tried it would be helpful. The minimal code that I used for testing is below and it works fine in Google Storage.

<html>
  <body>
    <a href="example.usdz" rel="ar">
      <img src="example.png"/>
    </a>
  </body>
</html>
rodhan
  • 633
  • 7
  • 12
0

Embed a link to USDZ Files for direct AR-scenes usage.

Here's a code for multiple usdz files:

<html>
    <head>
        <meta charset="utf-8">
        <title>Augmented Reality</title>
    </head>

    <body>
        <div>
            <a href="yourDirectory/ar_pixar_file_01.usdz" rel="ar">
                <img src="ar_image_01.png" alt="AR Image" width="360" height="240">
            </a>

            <a href="yourDirectory/ar_pixar_file_02.usdz" rel="ar">
                <img src="ar_image_02.png" alt="AR Image" width="360" height="240">
            </a>

            <a href="yourDirectory/ar_pixar_file_03.usdz" rel="ar">
                <img src="ar_image_03.png" alt="AR Image" width="360" height="240">
            </a>
        </div>
    </body>
</html>

The most important part of this code snippet is rel="ar" attribute, indicating that the link attached to the image is referring to content usable with the iOS AR-Viewer.

Andy Jazz
  • 49,178
  • 17
  • 136
  • 220