Engineering
From Blender to Browser: A Practical glTF Pipeline
A guide to exporting, compressing, validating, and budgeting 3D assets for an indie browser game.
The door in a Blender scene swings at the right hinge. In the browser it opens from the middle, clips the wall, and takes nearly as long to load as the rest of the room. An asset pipeline is the set of decisions that catches those differences before each model reaches the game. The file format is only one piece of it.
glTF is designed for delivering 3D scenes and models to runtimes. A GLB is the binary container variant, often convenient for exporting a self-contained asset. Three.js loads glTF through its GLTFLoader add-on. A pipeline around that loader can help a small team keep art changes repeatable while controlling the price of each model in network, memory, and frame time.
Treat names, scale, and pivots as contracts
Agree on how a model is oriented and how large a unit represents before filling a level. Check the first exports in the engine. Put a character beside a doorway, view the camera at eye height, and play an animation in the browser. That catches disagreements that an isolated model viewer can make hard to see.
If code depends on a marker named for a handle or a spawn point, document it and preserve that name through export. Keep animation clips named by action and note which ones should loop. Collision often benefits from a simpler, deliberately authored shape. A high-detail mesh that looks good under a close-up light may be wasteful or feel unreliable as a collision surface. The rendered object and its collision proxy have different jobs.
Decide who owns changes to the source and to the export. A repeatable export path makes it possible to correct the original asset and re-run the same conversion instead of manually repairing the generated file.
Measure textures and meshes separately
A small polygon count can still come with large textures. Measure which files dominate transfer and which images dominate memory in the device. Reduce unnecessary texture dimensions and test reusable materials before adding a compression step to every export. For a distant prop, a smaller texture may have no noticeable effect. Inspect the same prop under the actual camera and lighting before accepting the change.
GLTFLoader supports several optional extensions with the relevant decoders configured. Geometry compression such as Draco or Meshopt and GPU texture compression via KTX2 solve different problems. Enabling them changes the loader setup and introduces decoding or transcoding work. A fast desktop download may hide issues a cold mobile load exposes. Compare transfer size and time to usable render for the same representative scene. Keep an uncompressed baseline while you test.
Watch the number of materials and mesh primitives too. Compressing a scene for download does not automatically reduce the number of objects your renderer has to process every frame. Reusing meshes or materials may help. Measure the busy camera angle, not the one where the game happens to perform best.
Make validation part of export
Run the asset through the Khronos glTF Validator and open it in the target game. The validator can flag structural problems, while the engine test can reveal differences in lighting, transparent surfaces, clip transitions, and gameplay alignment. Check one representative browser configuration for each renderer path that you support. Keep a few expected views or actions available so you can run the same checks after the exporter or engine changes.
Plan loading boundaries around use. A room the player can enter immediately should not need to wait for every prop from the last level. Shared resources need a clear owner so they are not disposed of when another scene still uses them. On repeated restarts, watch whether old resources keep accumulating.
Back in the doorway, the right result is easy to see. The handle moves with the door, the door swings at its hinge, and the player can walk through at the expected moment. A good pipeline lets another artist make that scene better tomorrow while the tests still pass. That predictability can be more valuable than the last few kilobytes saved by an obscure export setting.
Sources
Have a playable browser game?
Share it with players through the OpenPlayer.One directory.
Submit your game