---
name: studio-isometric-blockout
description: Block out a low-poly isometric scene in Blender (via bpy) with a true isometric or 2:1 game camera, clean named geometry and verified glTF/OBJ export. Use for "isometric diorama", "low-poly blockout", "iso game asset", "make a Blender scene I can import".
version: "1.1.0"
category: build
platforms: [CLAUDE_CODE, CURSOR, CODEX_CLI]
---

# Isometric scene blockout

A blockout fixes scale, silhouette and camera before detail. For isometric work the camera is part of the contract: once art is made against a projection, changing it later means redoing everything. This skill scripts the scene in Blender so it is reproducible and exports cleanly into engines.

## When to use

- Isometric diorama key art, a game tile or building, a room, an outpost on a floating island.
- A scene that will be imported into Godot, Unity, Three.js or rendered to sprites.
- Not for organic sculpting or character modeling.

## Agree on inputs first

| Decision    | Options                                                                                           | Default                                 |
| ----------- | ------------------------------------------------------------------------------------------------- | --------------------------------------- |
| Projection  | True isometric (35.264 deg tilt) or 2:1 dimetric "game iso" (30 deg tilt, 26.565 deg pixel lines) | 2:1 for pixel art, true iso for renders |
| Units       | 1 Blender unit = 1 m, or 1 unit = 1 tile                                                          | 1 unit = 1 m                            |
| Up axis     | Blender Z-up; glTF and Godot/Three.js are Y-up (exporter converts)                                | Z-up in Blender                         |
| Footprint   | Grid size, e.g. 8x8 tiles                                                                         | Snap everything to the grid             |
| Output      | Still render, glTF (.glb), OBJ, FBX, sprites                                                      | .glb plus PNG still                     |
| Poly budget | e.g. under 5k tris for a web scene                                                                | State it                                |

## Camera math

- **True isometric**: orthographic camera, rotation X = 54.736 deg (90 minus 35.264), Z = 45 deg. All three axes foreshorten equally.
- **2:1 game iso (dimetric)**: rotation X = 60 deg, Z = 45 deg. A 1x1 floor tile renders exactly twice as wide as tall, which is what pixel-art iso tiles use.
- Ortho scale sets framing. For tile sprites, set it so one tile maps to an integer pixel width (e.g. 64 px wide by 32 px tall).

## Toolchain

- **Blender 4.x** driven by Python (`blender -b -P build.py`) so the scene is code.
- Exporters: glTF 2.0 (preferred for engines and web), OBJ (simple interchange), FBX (Unity legacy pipelines).
- Verification: re-import script, `gltf-transform inspect` (npm `@gltf-transform/cli`), or `npx gltf-validator`.
- Alternatives: MagicaVoxel for voxel blockouts, Three.js `OrthographicCamera` for a web-only scene.

## Workflow

### 1. Silhouette thumbnail

Sketch three main masses (terrain base, main building, one vertical accent such as a tower or tree). At 128 px the silhouette must read as the subject. Pick the camera now.

### 2. Script the blockout

```python
# build.py  ->  blender -b -P build.py
import bpy, math, bmesh
bpy.ops.wm.read_factory_settings(use_empty=True)
scn = bpy.context.scene
scn.unit_settings.system = 'METRIC'; scn.unit_settings.scale_length = 1.0

def box(name, size, loc, coll):
    bpy.ops.mesh.primitive_cube_add(size=1, location=loc)
    ob = bpy.context.active_object
    ob.name = ob.data.name = name
    ob.scale = size
    bpy.ops.object.transform_apply(scale=True)   # no unapplied scale on export
    for c in ob.users_collection: c.objects.unlink(ob)
    coll.objects.link(ob)
    return ob

def collection(name):
    c = bpy.data.collections.new(name); scn.collection.children.link(c); return c

terrain, building, roof = collection('Terrain'), collection('Building'), collection('Roof')
box('Terrain_Base', (8, 8, 1), (0, 0, -0.5), terrain)          # top at z = 0
box('Building_Main', (3, 3, 2.5), (0, 0, 1.25), building)
bpy.ops.mesh.primitive_cone_add(vertices=4, radius1=2.4, depth=1.4, location=(0, 0, 3.2),
                                rotation=(0, 0, math.radians(45)))
r = bpy.context.active_object; r.name = 'Roof_Main'
for c in r.users_collection: c.objects.unlink(r)
roof.objects.link(r)

cam_data = bpy.data.cameras.new('IsoCam'); cam_data.type = 'ORTHO'; cam_data.ortho_scale = 14
cam = bpy.data.objects.new('IsoCam', cam_data); scn.collection.objects.link(cam)
cam.rotation_euler = (math.radians(54.736), 0, math.radians(45))  # use 60 for 2:1
cam.location = (20, -20, 20)
scn.camera = cam
bpy.ops.wm.save_as_mainfile(filepath='//blockout.blend')
```

Conventions:

- Names are `Category_Part` (Terrain_Base, Building_Main, Roof_Main, Prop_Barrel_01). Engines show these names; make them meaningful.
- Ground plane top at z = 0. Scene centered on the origin. Object origins at the base center so props drop onto the grid.
- Snap dimensions to the grid unit; half-units only when intentional.

### 3. Flat-shaded low poly

- Flat shading is the default look: `bpy.ops.object.shade_flat()`. For hard edges with smooth curves, use Shade Auto Smooth (Blender 4.1+ modifier) at 30 deg.
- Clean geometry before export:

```python
for ob in scn.objects:
    if ob.type != 'MESH': continue
    bm = bmesh.new(); bm.from_mesh(ob.data)
    bmesh.ops.remove_doubles(bm, verts=bm.verts, dist=1e-4)
    bmesh.ops.recalc_face_normals(bm, faces=bm.faces)
    bm.to_mesh(ob.data); bm.free()
```

- Delete hidden faces (bottoms of buildings sitting on terrain) to save tris.
- Use a flat-color palette material per category, or a single palette texture (a 16x16 PNG) with UVs collapsed onto swatches. This is the standard low-poly trick: one material, one draw call.

### 4. Render a still

```python
scn.render.engine = 'BLENDER_EEVEE_NEXT'   # Blender 4.2 to 4.4; use 'BLENDER_EEVEE' on 5.x
scn.render.resolution_x, scn.render.resolution_y = 1600, 1600
scn.render.film_transparent = True
scn.render.filepath = '//still.png'
bpy.ops.render.render(write_still=True)
```

### 5. Export

```python
bpy.ops.export_scene.gltf(filepath='//outpost.glb', export_format='GLB',
                          export_apply=True, export_yup=True)
bpy.ops.wm.obj_export(filepath='//outpost.obj', forward_axis='NEGATIVE_Z', up_axis='Y',
                      export_materials=True, apply_modifiers=True)
```

`wm.obj_export` is the Blender 3.2+ exporter; the old `export_scene.obj` is gone in 4.x.

## Common variants

- **Sprite renders for a 2D iso game**: 2:1 camera, transparent film, render each building separately with the same ortho scale; pixel-snap by keeping ortho scale and resolution in a fixed ratio. Downscale with nearest neighbor only if rendering at an exact integer multiple.
- **Four facings**: rotate the scene root by 90 deg steps around Z and render four stills.
- **Turntable**: animate root Z rotation 0 to 360 over 120 frames, key linear interpolation, render frames 1 to 120 (not 121).
- **Web viewer**: load the .glb in Three.js with `OrthographicCamera`, positioned at `(d, d, d)` looking at the origin for true iso.
- **Godot**: import .glb; Y-up is automatic. Set root scale only if the unit contract differs.

## Quality checks

- Re-import into an empty scene and print a report:

```python
bpy.ops.wm.read_factory_settings(use_empty=True)
bpy.ops.import_scene.gltf(filepath='outpost.glb')
for o in bpy.context.scene.objects:
    if o.type == 'MESH':
        print(o.name, tuple(round(d, 3) for d in o.dimensions), len(o.data.polygons), tuple(o.scale))
```

Dimensions match the spec, scale is (1, 1, 1) everywhere, names survive.

- `npx gltf-validator outpost.glb` reports 0 errors.
- Triangle count under budget: `gltf-transform inspect outpost.glb`.
- No flipped normals: render with backface culling on (Material settings) and look for holes.
- Isometric check: in the still, verticals are perfectly vertical and parallel floor edges stay parallel (ortho, no perspective).
- Silhouette: the still thresholded to black and white reads as the subject at 128 px.

## Pitfalls and fixes

| Problem                             | Fix                                                                                  |
| ----------------------------------- | ------------------------------------------------------------------------------------ |
| Asset imports 100x too big or small | Unit mismatch; keep 1 unit = 1 m and scale_length 1.0; never fix scale in the engine |
| Lying on its side in the engine     | Up axis; export glTF with `export_yup=True`, OBJ with `up_axis='Y'`                  |
| Lighting looks faceted wrong        | Unapplied negative scale or flipped normals; apply transforms, recalc normals        |
| Z-fighting on coplanar faces        | Offset decals by 1 to 2 mm or delete the hidden face                                 |
| Sprites shimmer or blur             | Ortho scale not mapped to integer pixels per tile; recompute                         |
| Materials missing after OBJ export  | .mtl not shipped next to .obj, or textures not relative; prefer .glb                 |

## Deliverables

- [ ] `build.py` that regenerates the scene, and the saved `.blend`
- [ ] Still render (transparent PNG) from the agreed camera
- [ ] `.glb` (and `.obj` + `.mtl` if requested) with documented unit and up axis
- [ ] Re-import report: object names, dimensions, tri counts
- [ ] List of details that exist only in the illustration or paint-over, not in geometry

[Cloudbreak Outpost reference](https://skills-hub.ai/showcases/projects/cloudbreak-outpost)
