3D Floorplan Generator
Design 3D layouts and floorplans in your browser. Export to JSON for game engines like Godot or Unity. Instant isometric rendering.
About
This tool is a browser-based isometric level editor designed for rapid prototyping of tile-based environments. Unlike complex CAD software, it focuses on the fundamental logic of grid maps - specifically binary states (1 for floor, 0 for void). It automatically calculates wall placement based on neighbor adjacency, a technique commonly used in procedural generation algorithms like Wave Function Collapse.
The generator utilizes a custom Painter's Algorithm to render the 3D scene directly onto an HTML5 Canvas without heavy WebGL libraries. This ensures the output is lightweight and mathematically transparent. The resulting data structure is a raw JSON array, making it universally compatible with game engines such as Godot, Unity, or custom Python backends.
Formulas
The core of the visualization relies on projecting 3D world coordinates P(x, y, z) onto a 2D plane S(u, v). We use an isometric projection matrix approximation:
v = (x + y) × sin(θ) − z
Where θ is typically 30° (0.523 rad). To handle occlusion (hiding objects behind others), faces are sorted by their distance d from the camera before rendering:
Reference Data
| Parameter | Symbol | Standard Value | Description |
|---|---|---|---|
| Grid Width | W | 10 - 50 | Number of cells along the X-axis. |
| Grid Depth | D | 10 - 50 | Number of cells along the Z-axis. |
| Cell Size | s | 32px / 1m | Visual scale of a single voxel/tile. |
| Iso Angle | θ | 30° | Standard isometric projection angle. |
| Wall Height | h | 2.5 units | Relative height of generated walls. |
| JSON Format | Array[] | Binary | 0=Empty, 1=Floor/Occupied. |