« All posts

Forge3D Spaces: Text-to-3D Building CAD Running in the Browser

Forge3D Spaces converts text prompts into 3D buildings in-browser using an LLM-to-solver pipeline, WebGPU fallback, and real-time CSG wall cutting.

Forge3D Spaces turns a plain-language building brief — "a 4-bed duplex with a garage" — into a walkable 3D house, measured floor plans, DXF export, and a cost estimate, all generated client-side in seconds. The key architectural choice is that the LLM never touches geometry directly: it emits a structured JSON room program, which a deterministic slicing-tree solver — a technique borrowed from chip floorplanning — resolves into non-overlapping, gap-free rectangular rooms with real dimensions. Because the 2D plan, 3D model, elevations, and bill of quantities are all views of one underlying data structure, there's nothing to desynchronize.

Rendering runs on React Three Fiber with a WebGPU renderer, but the build treats the happy path as unreliable by default: driver-specific init failures, in-app browsers misreporting GPU capabilities, and mobile Safari dropping the GPU device on tab suspend all get handled with a cached per-canvas init and a clean fallback to WebGL. Cutting door and window openings into walls is solved with actual CSG (constructive solid geometry) — three-mesh-bvh plus three-bvh-csg with per-node brush caching, without which boolean operations melt performance once a project grows past a handful of walls.

The AI editor follows the same pattern as generation: chat commands don't move meshes directly, they emit a batch of operations (add_item, move_node, add_roof, delete_node) against a scene summary, validated against the real scene graph and applied as a single Zustand transaction — so a multi-step edit is one undo. For engineers, the interesting takeaway is the general pattern: constrain the LLM to a validated intermediate representation and hand geometry to a deterministic solver, rather than asking a model to reason about 3D space directly.