3D Viewer
Model Optimization Guide
Blender Helper Guide

Optimize 3D Models for the Web

GLB is the best format for the 3D Viewer when exported with compatible settings. Use this ready-to-run Blender script to export a reliable GLB from Blender with faceted shading and broad viewer compatibility.

Why GLB instead of FBX? The viewer accepts individual FBX files under 100 MB and converts them automatically in your browser before loading or uploading. This quick conversion is uncompressed and may create a much larger file. For folders, smaller cloud files, larger FBX files, or complex scenes, exporting GLB directly from Blender gives you smaller files, perfect materials, and much faster load times.

How to Run the Script

  1. Open your .blend file in Blender

    Make sure all the objects you want to export are visible in the viewport.

  2. Switch to the Scripting workspace

    Click the Scripting tab at the top of Blender, or open a Text Editor panel.

  3. Paste the script below and adjust the settings

    Change OUTPUT_NAME and EXPORT_MATERIALS to suit your scene. The default settings are tuned for reliable faceted exports and compatibility.

  4. Click Run Script (or press Alt + P)

    The GLB will be saved to your Desktop. Open the 3D Viewer and drag it in, or upload to the cloud.

Tailor the Script

Adjust these controls and the script below updates live. The Copy and Download buttons will give you your configured version.

Saved to your Desktop.
Smooth is the default for polished product models. Pick Faceted for a low-poly look, or Off to leave Blender shading untouched.
Lower = harder creases. To turn smooth off entirely, change Shading above back to Faceted or Off.
Adds a temporary subdivision modifier for extra smoothness, then removes it.
85
80–90 is the sweet spot for web.
Small File loads quickest over the web. Balanced Small keeps more detail. Balanced Quality keeps high precision with Draco compression. Best Quality disables Draco.

Key Settings

The configurator above edits the most common settings. Full reference below.

Setting Default Notes
OUTPUT_NAME 'export.glb' Filename saved to your Desktop.
SHADING_MODE 'SMOOTH' Forces smoothed shading by default for polished product models. Use 'FACETED' for a flat low-poly look, or 'PRESERVE' to keep Blender's existing normals.
EXPORT_NORMALS True Disabled automatically for Faceted shading to keep files smaller. Enabled automatically when using Preserve or Smooth shading.
SMOOTH_ANGLE_DEG 89 Only used when SHADING_MODE is 'SMOOTH'. 30 = harder edges, 89 = very smooth.
IMAGE_FORMAT 'AUTO' Lets Blender choose a compatible output format. Safer as a default when validating exports across viewers.
IMAGE_QUALITY 85 0–100. 80–90 is the sweet spot for web.
EXPORT_TANGENTS False Disabled by default for broader compatibility. Enable only if you specifically need tangent-space normal map support.
EXPORT_MATERIALS 'EXPORT' Set to 'NONE' if you plan to apply all materials inside the 3D Viewer itself.
USE_DRACO True Enabled by Small File, Balanced Small, and Balanced Quality for smaller files. Best Quality disables it for maximum fidelity and compatibility.
DRACO_LEVEL 7 Small File, Balanced Small, and Balanced Quality all use 7. Ignored when Best Quality disables Draco.
DRACO_POSITION_BITS 12 Lower values usually make smaller files. Small File uses 12, Balanced Small uses 14, and Balanced Quality uses 16.
DRACO_NORMAL_BITS 10 Lower values compress shading data more aggressively. Small File uses 10, Balanced Small uses 12, and Balanced Quality uses 14.
DRACO_UV_BITS 12 Lower values compress texture coordinates more aggressively. Small File uses 12, Balanced Small uses 14, and Balanced Quality uses 16.
SUBSURF_LEVEL 0 Add a temporary subdivision before export for extra smoothness. 0 = off, 2 = recommended, 3 = max. Removed after export so your .blend stays clean.
Large scenes: Start with the defaults until the model looks correct in your target viewer. Once shading and compatibility are confirmed, you can experiment with USE_DRACO = True or lower texture resolutions to reduce file size.

The Script

blender_export.py