Skip to content
07-848 2005

KeyShot Studio, Working With Models

Sharing and embedding USDz and GLB files

Use GLB and USD exports from KeyShot Studio to embed models on a website or prepare them for AR viewing.

On this page
  1. Embed a 3D model (GLB) in a browser or on mobile using <model-viewer>
  2. How to embed a 3D model (GLB)
  3. What you need
  4. Provide a single QR code for iOS and Android
  5. Provide a single link for iOS and Android
  6. Device viewing requirements

Use GLB and USD exports from KeyShot Studio to embed models on a website or prepare them for AR viewing.

Embed a 3D model (GLB) in a browser or on mobile using <model-viewer>

Use <model-viewer> to embed GLB files for the widest compatibility when viewing 3D models on the web and in AR. The <model-viewer> web component provides:

  • An interactive 3D model view in the browser.
  • A source link to view GLB files on Android devices.
  • A source link to view USD files on iOS devices.
  • Other attributes.

How to embed a 3D model (GLB)

Export a GLB file from KeyShot Studio and use <model-viewer> to embed 3D models on your webpage. Visitors can view 3D models in desktop and mobile browsers, or in AR on supported iOS and Android devices.

What you need

  1. A GLB file exported from KeyShot Studio
    In KeyShot Studio Pro, go to File, Export and select Export to GLB/GLTF. To offer AR viewing on iOS devices, also export a USD file using the same method and selecting Export, Export to USD.
  2. The <model-viewer> embed code
    Add the embed code to your webpage's HTML where you want the 3D model to appear. See the model-viewer documentation for usage and attributes. The following example shows the code used to embed the 3D model on the KeyShot Envoy page:
<script type="module" src="https://unpkg.com/@google/model-viewer/dist/model-viewer.min.js"</script>> <div style="height: 600px; flex: 1; display: flex; justify-content: center; border: 0px; box-sizing: border-box;"><model-viewer style="width: 100%; height: 100%; background-color: #eee;" src="https://media.keyshot.com/scenes/envoy/envoy-opt.glb" ios-src="https://media.keyshot.com/scenes/envoy/envoy.usdz" poster="https://media.keyshot.com/scenes/envoy/envoy-scan.jpg" alt="3D Export from KeyShot" ar-modes="webxr scene-viewer quick-look" ar-scale="auto" ar auto-rotate camera-controls></model-viewer></div>

Notes:

  1. Replace the src URLs with the locations of your GLB, USD and image files (jpg, png, gif or other image formats).
  2. Host your files on the same domain as the webpage displaying the 3D model. If the model does not appear, ask your hosting provider or web administrator to check that Cross-Origin Resource Sharing (CORS) is enabled for your site.

Provide a single QR code for iOS and Android

Use an HTML file with header redirects for different mobile devices and browsers. Download the example HTML file used for the KeyShot Envoy page.

  1. Upload the HTML file to your web server.
  2. Use a free QR code generator to create a QR code with your HTML file's location as the URL.

Use <ar-button>, a web component similar to <model-viewer>. Leonardo Cavaletti created it, and it is available on GitHub.

The following example comes from the KeyShot Envoy page:

<script type="module" src="https://unpkg.com/@leoncvlt/ar-button"></script> <ar-button src="https://media.keyshot.com/scenes/envoy/envoy.glb" ios-src="https://media.keyshot.com/scenes/envoy/envoy.usdz" link="https://manual.keyshot.com/keyshot11/envoy" title="3D view of the Envoy Helmet">Click to view in your space!</ar-button>

Device viewing requirements

To view models in AR Quick Look on iOS devices, check these requirements:

  • Use an iOS device with iOS 11.0 or later, or an A9 or later processor.
  • Keep USD files under 50MB for the best viewing experience. Complex textures and large images increase file size and may slow loading.
  • See Apple's USDZ examples for reference.

To view a GLB file in AR using Scene Viewer on Android, your device must:

  • Be an ARCore supported device running Android 7.0 or later.
  • Have an up-to-date version of Google Play Services for AR.
  • Have an up-to-date version of the Google app.
  • GLB files have a maximum size of 15MB (10MB recommended) and a maximum of 100,000 triangles. Files with more triangles may work if they stay below 15MB.

If these requirements are met, the AR view should appear on your mobile device. Otherwise, the device downloads the file, asks you to download it or, on Android, opens Google Play Service for AR in the Google Play Store.

Procadsys customer support

Still need help?

Licences, renewals and billing

Our New Zealand team looks after your KeyShot licences, renewals and invoices.

Monday to Friday, 9:00 am to 4:30 pm NZ time, excluding New Zealand public holidays.

Technical problems

Installation errors, crashes and other technical problems with KeyShot are handled by KeyShot support.