# 03 — Improve Your Room

Add textures, external 3D assets, loot markers, and decorative details.

Prerequisite: a working room from [02-simple-room.md](02-simple-room.md).

---

## Materials and textures

### Create a material

1. In the **Project** panel, right-click → **Create → Material**
2. Name it after what it represents: `Stone`, `WoodFloor`, `RustyMetal`
3. Drag it onto any object in the Hierarchy or Scene View

### Flat colour

- Click the rectangle next to **Albedo** → colour picker
- Set **Metallic** `0`, **Smoothness** `0.1` for matte stone

### Image texture

1. Drag a `.png` or `.jpg` into the **Project** panel
2. Select the imported image → set **Wrap Mode** to `Repeat` → **Apply**
3. Select your material → drag the texture onto the **Albedo** slot (or click the circle to the left of Albedo)

> Free seamless textures: search "ambientcg stone" or "poly haven stone" for free CC0 PBR textures.

### Tiling

Without tiling a 1m texture stretched across a 20m wall looks wrong.

1. Select the material
2. Under **Albedo**, set **Tiling X / Y** to match the surface size:
   - A 20m × 5m wall with a 1m texture → `X = 20, Y = 5`
   - If unsure, try `X = 8, Y = 8` and adjust

### Normal map (surface bumps)

1. Import a `*_Normal.png` file
2. Select it → set **Texture Type** to `Normal map` → **Apply**
3. In the material, assign it to the **Normal Map** slot
4. Adjust strength (1 = standard, 2 = more pronounced)

### Metallic / Smoothness reference

| Surface | Metallic | Smoothness |
|---|---|---|
| Rough stone | 0 | 0.05 |
| Worn wood | 0 | 0.1 |
| Wet stone | 0 | 0.4 |
| Polished metal | 0.9 | 0.7 |
| Rusty metal | 0.5 | 0.1 |

> **Textures are bundled automatically.** Any texture assigned to a material used on objects in your bundle is packed into the bundle — no manual label needed.

---

## Importing external 3D assets

Unity 2018 is not compatible with most Unity Asset Store packages (they require Unity 2019+). Use **Blender FBX export** or free `.fbx`/`.obj` assets instead.

### Blender FBX workflow

**In Blender:**

1. Model your asset (crate, barrel, pillar, archway…)
2. **File → Export → FBX (.fbx)**
3. Settings:
   - **Apply Transform** ✓ (under Geometry)
   - **Forward**: `-Z Forward`
   - **Up**: `Y Up`
   - Scale: `1.00`

**In Unity:**

1. Drag the `.fbx` into the **Project** panel
2. It appears as a model asset — drag it into the scene
3. Assign a material by dragging onto the mesh

### Free asset sources

- Search for free `.fbx` dungeon props: barrels, crates, pillars, torches
- Sites like **Kenney.nl** offer free game-ready 3D assets under CC0

### Scale check

Blender uses metres by default; Unity 2018 with FBX import also uses metres. A player is roughly 1.8m tall. If an imported asset looks gigantic or tiny, adjust the **Scale** field on the FBX import settings (Inspector when the `.fbx` is selected) and click **Apply**.

---

## Loot markers

Place `LootSpawner` empty objects where loot can drop (gold coins, XP books):

1. Right-click on root → **Create Empty** → rename `LootSpawner`
2. Place 5–10 around the room, spread across the floor
3. The game decides randomly whether loot appears at each point (roughly 1 in 50 chance per marker per run)

---

## Decoration ideas

| Object | How to make it |
|---|---|
| Stone column | Narrow tall Cube: Scale `(0.6, 5, 0.6)` |
| Wall alcove | Two thin Cubes forming an inset recess in the wall |
| Crate | Cube ~`(0.8, 0.8, 0.8)` with a wood material |
| Rubble pile | Several small irregular Cubes at the base of a wall |
| Torch bracket | Thin Cube + Point Light child with orange colour |

> **Performance tip**: avoid more than ~200 objects in a single room prefab. Each object adds a draw call.

---

## Next

→ [04-enemies.md](04-enemies.md) — add enemy spawns and NavMesh
