How To Host 3D Assets For Webflow

To host a 3D asset and embed it on Webflow, follow these steps:

1. Host the 3D Asset

Since Webflow does not natively host .GLB or .GLTF files, you need to upload your asset to a reliable hosting service. Here are some options:

  • Google Drive or Dropbox: Upload your .GLB file and get a public link.
  • GitHub or Vercel: Store the .GLB file in a repository or use a static file host.
  • Dedicated 3D Hosting Platforms:
    • Sketchfab: Allows embedding interactive 3D models.
    • Google Poly (Discontinued): Alternatives include Spline or Mozilla Hubs.
    • Objectverse Converter: If you use Objectverse Converter, it may offer a hosting feature.

2. Embed the 3D Model in WebflowThere are two main ways to embed your 3D asset in Webflow:Option 1: Using an <iframe> (For Sketchfab or Similar Services)If you use a hosting service like Sketchfab, they provide an embed code:

  1. Upload your 3D asset to Sketchfab.
  2. Copy the embed iframe code.
  3. In Webflow, add an Embed element (<iframe>) where you want the model to appear.
  4. Paste the code.

Example:html

CopyEdit

<iframe width="100%" height="500px" src="https://sketchfab.com/models/YOUR_MODEL_ID/embed" frameborder="0"></iframe>

‍

2. Using the <model-viewer> Tag (For Self-Hosted .GLB Files)

‍If you host your .GLB file yourself (e.g., on GitHub, Dropbox, or another static host), use the Webflow Embed component to insert this HTML snippet:

html

CopyEdit

<script type="module" src="https://unpkg.com/@google/model-viewer/dist/model-viewer.min.js"></script>

<model-viewer src="https://YOUR_HOSTED_LINK/model.glb"
             alt="3D Model"
             auto-rotate
             camera-controls
             ar>
</model-viewer>

‍

3. Adjust Webflow Styling

  • You can resize the model-viewer element using Webflow’s CSS settings or inline styles like:

html

CopyEdit

<model-viewer style="width: 100%; height: 500px;"></model-viewer>

  • Enable "Auto Rotate" and "Camera Controls" for interactivity.

4. Test Your Embed

  • Publish your Webflow site and check if the 3D model loads correctly.
  • If using an external hosting link, ensure it is publicly accessible.

By following these steps, you can successfully embed and display optimized 3D models in Webflow while keeping your site fast and interactive! 🚀