3D Design 5-8 minutes

Exporting Blender 5.2 Models to the Web with glTF/GLB

Diego Cortés
Diego Cortés
Full Stack Developer & SEO Specialist
Share:
Exporting Blender 5.2 Models to the Web with glTF/GLB

A 60 MB FBX model can end up under 2 MB as an optimized glTF, and that is the difference between a 3D website that loads in seconds and one nobody waits for. Exporting Blender 5.2 models to the web with glTF/GLB is the direct bridge between your scene and the browser.

Why glTF/GLB Is the Format for the Web

Khronos' Open Standard and Its Ecosystem

glTF (GL Transmission Format) is Khronos' open standard for transmitting and loading 3D models in web and native applications: it shrinks file size and the runtime processing engines need to unpack and render the scene. It is the format recommended by the three.js documentation and natively understood by Babylon.js, Godot, and most viewers. When the browser is your target, glTF beats OBJ and FBX in weight, load time, and PBR material support.

GLB vs. glTF + bin + Textures: When to Choose Each

The exporter offers three output formats. glTF Binary (.glb) packs mesh, textures, and animations into one file, the usual choice for the web thanks to portability and fewer requests. glTF Separate produces a JSON file referencing a .bin and loose textures, ideal for debugging or pipelines that version each asset. glTF Embedded puts everything into a single .gltf and works for sharing prototypes. For a website, .glb is almost always the right call.

Preparing the Scene in Blender 5.2 Before Exporting

Real-World Scale in Meters and Applying Transforms with Ctrl+A

The glTF standard works with meters as its unit, so modeling at real scale avoids surprises when combining models or lighting in the engine. Before exporting, select each object and apply its transforms with Ctrl+A (Rotation & Scale): an unapplied scale translates into wrong normals and bounding boxes in the browser. This single step solves most phantom issues.

From Z-Up to Y-Up: How the Exporter Handles the Axis Conversion

Blender works with the Z axis pointing up and glTF defines Y-up with -Z facing forward; the exporter applies the conversion automatically. If the model appears tipped over in three.js, the culprit is usually unapplied transforms or a weird rest pose in the armature, not the exporter.

Naming Objects and Cleaning the Scene

Object names carry over to the exported file and are what you will see in the viewer's inspector, so name them descriptively. Also check the Orphan Data panel (Data and Mesh) and purge what you do not use: every forgotten object inflates the final file.

The glTF 2.0 Exporter in Blender 5.2

File > Export > glTF 2.0 and the Options Panel

Blender 5.2 ships with the glTF 2.0 add-on enabled by default: just go to File > Export > glTF 2.0. The options panel decides the format (GLB or Separate), what to include, and how to treat meshes. If the add-on is missing, re-enable it under Preferences > Add-ons by searching for glTF.

Meshes: Modifiers, UVs, Normals, and Tangents

In the Mesh section you can choose whether to apply modifiers, include UVs, normals, and tangents, and cap bone influences per vertex. For a predictable result, apply the final modifiers before exporting and keep normals and tangents enabled: without tangents, some browser shaders lose quality in relief details.

Including Cameras and Lights with KHR_lights_punctual

The exporter can include cameras and convert Blender lights into point, area, and directional lights thanks to the KHR_lights_punctual extension. Do not expect a photographic port of Cycles: it exists for real-time scenes that need a coherent lighting baseline on load.

Compatible Materials and Textures

Metal/Rough PBR: Which Nodes Export and Which Are Ignored

The exporter builds the glTF material from the nodes it recognizes, and the starting point is the Principled BSDF with the Metal/Rough model: base color, roughness, metallic, normal map, occlusion, and emissive export directly. Complex node groups, exotic mix shaders, or volume nodes get simplified or ignored: if a material depends on node tricks, bake it to textures before exporting.

Extensions: KHR_materials_unlit, emissive_strength, and texture_transform

The add-on supports extensions that extend the core. KHR_materials_unlit turns materials shadeless (useful for low-poly or 3D UI), KHR_materials_emissive_strength allows emissive intensities above one, and KHR_texture_transform exports texture offsets and rotations. Modern viewers understand them; very old ones may ignore them.

Packing and Compressing Textures: PNG, JPEG, and WebP

Textures travel inside the .glb when packed, and their resolution drives the final size. Export at the right resolution: 2K for hero shots, 1K or less for secondary assets. Choose PNG for maps with alpha or data maps (normal, roughness) and JPEG or WebP for albedo without transparency. An unnecessary 4K texture weighs more than the whole geometry.

Animations and Shape Keys

Exporting NLA Strips and Sampled Animations

In the Animation section you can group actions by NLA strips, so each strip becomes an independent animation track in the file. The sample animations option samples keyframes at fixed intervals, smoothing complex curves and normalizing results across engines. For character loops, this is the setting that makes the difference.

Bone Influences and Shape Keys

The exporter respects per-vertex bone influences and exports shape keys as morph targets, the foundation of facial blendshapes or character deformations in the browser. Keep shape key names clear: you will consume them from code to drive expressions.

Compressing for the Web: Draco and Friends

Draco Compression Built into Blender's Exporter

Under Geometry > Compression the exporter includes Draco, a geometry compression algorithm that dramatically reduces mesh weight. Enable it with a balanced position and normal quality (10-14 is a good starting point). The trade-off: the loader needs the Draco decoder, which three.js serves as a downloadable worker.

gltfpack and gltf-transform: Post-Export Optimization

After exporting, tools like gltfpack (from the meshoptimizer project) and gltf-transform let you fine-tune the result: they reorder buffers, strip redundant data, quantize attributes, and apply Meshopt. In documented cases, a 60 MB .glb dropped to a third with the exporter's Draco and down to 1.8 MB (97 percent less) after a further pass. It is the last weight push before publishing.

Draco vs. Meshopt: When to Use Each Decoder

Draco compresses more in final size and is the option built into Blender; Meshopt (KHR_mesh_quantization) offers faster CPU decompression at a slightly larger size. For games and configurators with many meshes, Draco usually wins; for scenes that must load instantly on mobile, Meshopt can be better. three.js supports both out of the box.

Loading the Model in three.js

GLTFLoader and DRACOLoader in a Few Lines

In three.js, loading a .glb is a matter of importing the loader, registering the Draco decoder if you used it, and firing the request. The minimal pattern looks like this:

import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';
import { DRACOLoader } from 'three/examples/jsm/loaders/DRACOLoader.js';

const draco = new DRACOLoader();
draco.setDecoderPath('https://www.gstatic.com/draco/versioned/decoders/1.5.7/');

const loader = new GLTFLoader();
loader.setDRACOLoader(draco);
loader.load('/models/character.glb', (gltf) => {
  scene.add(gltf.scene);
  mixer = new THREE.AnimationMixer(gltf.scene);
  gltf.animations.forEach((clip) => mixer.clipAction(clip).play());
});

The Complete Example: Scene, Camera, Light, and the Character GLB

With the stylized character from the sculpting and retopology tutorials exported as a .glb, setting up the scene is straightforward: a perspective camera, a directional light with shadows, and the model at the center. If you exported animations, the AnimationMixer plays them in a loop; if you used Draco, the DRACOLoader handles the rest. In fewer than fifty lines your character is running in the browser.

Performance Best Practices

Draw Calls: Combining Meshes and Using Instancing

Every object exported as a separate mesh is one more draw call in the browser. Merge pieces that share a material into a single object and use instancing for repeated elements (trees, rocks, props). A model with hundreds of loose meshes loads slowly even when it is light.

Texture Budget and Memory in the Browser

Textures are decompressed on the GPU: a 4K texture takes about 64 MB of memory for albedo alone. Set a per-scene budget (for example, 100-200 MB on mobile) and split it between albedo, normal, and roughness. The simple rule: lower resolution on secondary textures and compression where alpha is not needed.

Final Checklist Before Publishing

Before uploading the model, review: transforms applied with Ctrl+A, real-world scale in meters, modifiers applied, textures at the right resolution, Draco enabled with balanced quality, animations sampled, and clean names. Test loading on a slow connection and on a mobile device. If the scene weighs under 5 MB and loads in a few seconds, it is production-ready.

Conclusion

Exporting Blender 5.2 models to the web with glTF/GLB turns your modeling work into content any browser can display: prepare the scene at real scale, configure the exporter for PBR and animations, compress with Draco, and load the result with GLTFLoader in three.js. It is the same pipeline used by portfolios, product configurators, and web games. To go deeper on the art side, check out the UV mapping and procedural materials tutorials on this blog, and keep reading so you do not miss the next steps of the 3D-to-web workflow.

Categories