All projects
BabylonJS ThreeJS WebGL GLSL

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.

AO Lightmapper — main interface
Main interface — drag a GLB, configure, bake

How it works

UV2 unwrap via XAtlas (WASM), then a multi-pass WebGL2 pipeline:

  1. G-Buffer pass — render world position + normals to textures
  2. AO pass — hemisphere ray sampling in tangent space per texel (WebGL2 fragment shader + BVH)
  3. 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
Embedded export result
Embedded export — single GLB with lightmap in occlusion channel

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:

SiteURL
BabylonJS Sandboxhttps://sandbox.babylonjs.com
Three.js Editorhttps://threejs.org/editor
Chrome Extension in BabylonJS Sandbox
BabylonJS Sandbox integration
Chrome Extension in Three.js Editor
Three.js Editor integration

Built by

Viseni Design Studio

3D, WebGL, interactive & VR/AR experiences

Visit viseni.com