AO Lightmapper — BabylonJS / ThreeJS
Ambient Occlusion lightmap baker running in the browser. Uses BabylonJS and Three.js render-to-texture to compute per-mesh AO maps without any server-side processing.
GPU-accelerated AO lightmap baker that runs entirely in the browser. Load a GLB or FBX, bake, download PNG lightmaps — no Blender, no server.
How it works
UV2 unwrap via XAtlas (WASM), then a multi-pass WebGL2 pipeline:
- G-Buffer pass — render world position + normals to textures
- AO pass — hemisphere ray sampling in tangent space per texel (WebGL2 fragment shader + BVH)
- Bilateral blur pass — reduces noise without losing edges
FBX conversion runs on a local Node server (port 3001) via fbx2gltf.
Bake settings
Texture size, AO samples, radius, and denoising are all configurable. 64 samples ≈ 1.2s for 1024². Supports batch processing — add files to queue, click Bake All.
Export modes
- Separate GLB + lightmap PNG
- Single embedded GLB with lightmap baked into occlusion texture
Apply in BabylonJS
mesh.material.lightmapTexture = new Texture('./baked_AO.png', scene)
mesh.material.useLightmapAsShadowmap = true
Desktop App (Electron)
Packages the full web app as a standalone .exe (Windows) or .app/.dmg (macOS). Electron starts the FBX converter backend automatically — no terminal needed.
- Run in dev mode:
npm run desktop - Build executable:
npm run pack
Windows note: packaging requires symlink permissions. Run as Administrator or enable Developer Mode in Windows Settings → Privacy & security → For developers.
Chrome Extension
Bake AO directly inside BabylonJS Sandbox and Three.js Editor — no file upload, no local server.
Currently in active development. Not yet on Chrome Web Store.
Supported sites:
| Site | URL |
|---|---|
| BabylonJS Sandbox | https://sandbox.babylonjs.com |
| Three.js Editor | https://threejs.org/editor |