# World art guide: coastal and modern worlds

The companion to WORLD_ART_GUIDE.md (the medieval iamar city look) for worlds that
are not medieval: a beach, a sea you can swim in, a modern house and its rooms. It
is for an AI agent building a world package with the developer kit
(WORLD_FORMAT.md, AGENT_KIT.md in iamar-ai/iamar-kit). Every number was measured in
the iamar browser's own renderer (Godot 4.7 Compatibility, the one every visitor
gets, with the linear tonemap the world builder sets); the colour and light numbers
were measured on screenshots of sample worlds, the rest is the city's practice. It
asks for no scene field that does not exist.

![A beach world (sand #b8a77c, the lightest that keeps colour): clear water with ripples, a deck, a coral sunshade and a teal towel](world_art_coastal/beach_above.jpg)

---

## 1. Colours that survive the tonemap

Package worlds use a **linear tonemap**: white is 1.0 and nothing rolls off, so a
colour lit past 1.0 in any channel becomes flat white or flat yellow. Bright
beach colours are exactly the ones that clip: sand `#e9dbb4` and water `#3fc1c9`
from a first-time creator's beach both rendered as white.

**Measured rule.** Under the scaffold's default light (`iamar-world new`: sun
`#fff4e0` energy 1.0 at 10:30, ambient from the procedural sky, energy 1.0), a
surface facing up in the sun renders at about **1.36 times its hex value** in red
and green and **1.45 to 1.5 times** in blue (the blue sky adds to it). Measured on
cubes of each colour:

| Colour | Renders as | |
|---|---|---|
| `#3fc1c9` water | `(94, 255, 255)` | clipped: flat cyan-white |
| `#e9dbb4` / `#d2c09a` sand | `(255, 255, 232)` | clipped: white |
| `#c9b58a` sand | `(247, 246, 208)` | pale cream, almost white |
| `#b8a77c` sand | `(226, 227, 188)` | light sand, still has colour |
| `#d6d1c6` plaster | `(246, 255, 255)` | clipped |
| `#e0b84a` yellow | `(255, 250, 122)` | clipped |
| `#d06a50` coral | `(254, 151, 129)` | red clipped |
| `#7a8a4a` dune grass | `(158, 191, 122)` | good |
| `#2b7f8f` sea | `(76, 175, 214)` | good |

So:

* Anything in full sun: keep red and green at or under **`#b8`** and blue at or
  under **`#a8`**; a colour you want to read as "white" (plaster, a towel) at about
  `#b0b0a8`.
* Or keep brighter colours and lower the light (sun and ambient energy together),
  then check a preview shot: every channel you see at 255 has lost its colour.
* Shade (under a roof, inside a room) is lit by ambient and lamps only: there light
  colours are fine and often needed (section 4).

![Cubes of the tested colours in the sun: the first sands, the cyan water, the plasters, the yellow and the coral clip](world_art_coastal/palette_clip.jpg)

`iamar-world validate` warns about colours that clip and suggests a darker one
(scripts/kit/world_checks.gd). It currently under-estimates how bright a colour
renders (every clipped colour in the table passes it; an internal task); until that is
fixed, use the rule above and look at your shots.

### 1.1 Palette (tested under the scaffold light)

| Use | Colour | Notes |
|---|---|---|
| dry sand | `#a89770` | `#b8a77c` is the lightest that keeps colour (pale, as in the beach pictures); `#c9b58a` reads as cream, `#e9dbb4` as white |
| wet sand, sea floor | `#a08c66` | the bed under water is seen through the water colour |
| dune grass | `#7a8a4a` | |
| palm and shrub green | `#5f7a3a` | |
| deck and dock wood | `#8a6a48` | pale driftwood `#a88a64` |
| modern plaster, sunlit | `#b0aca4` | reads as white in the sun; in shade use `#d6d1c6` |
| interior walls | `#d6d1c6` | lit by lamps and ambient only (section 4) |
| slate or metal roof | `#5a5f66` | |
| terracotta roof | `#b0623e` | |
| accents (door, shutters) | `#2f6f73` teal, `#2c3e5c` navy | |
| sunshade, towel, cushions | `#b0503c` coral, `#b09030` yellow | saturated, not bright: `#d06a50` and `#e0b84a` clip |

Avoid pure white (`#ffffff`, `#eeeeee`) on anything in the sun: it clips under
any daylight.

## 2. Water

A clear sea is the heart of a beach world. Set it with the water look fields
(WORLD_FORMAT.md 4.3; browsers from iamar fb3ba5d2 on):

```json
"water": [{"id": "sea", "position": [0, 0, -15], "size": [80, 40], "depth": 3,
           "color": "#2b7f8fcc", "clarity": 22, "deep_color": "#1d6f80",
           "shallow_color": "#58b9b4", "waves": {"height": 0.15, "speed": 1}, "foam": 0.8}]
```

* **Colours.** `deep_color` `#1d6f80` and `shallow_color` `#58b9b4` read as a
  tropical sea; `color` alone (`#2b7f8f`) gives the same hue everywhere. Never
  `#3fc1c9` or brighter: the surface adds the sky's reflection on top.
* **Clarity.** 20-30 m for a clear sea where the sand, rocks and fish show from
  above; 8-12 m for a lake; 4-6 m for a muddy river. Clarity also sets how far you
  see under water.
* **Depth.** The surface measures the ground under every point: put a sea floor
  (terrain or a box) under the water. Over sand 0-1 m deep the water is nearly
  clear; over 3 m it takes `deep_color`. Where land rises above the surface the
  shore line gets foam.
* **Waves.** 0.1-0.2 m for a calm bay, 0.4-0.6 m for open sea. The swell calms at
  the shore by itself.
* **Under water** the browser draws fog in the water's deep colour over the
  floor and fish (no sky), as in the city's ponds. Fish (`creatures` kind `fish`)
  swim just under their entry's `y`: put that entry below the surface over water
  at least 1 m deep.

![At the waterline: ripples, the floor and fish through clear water](world_art_coastal/beach_waterline.jpg)
![Under water: fog in the sea's colour, the floor, rocks and a school of fish](world_art_coastal/beach_underwater.jpg)

## 3. Sky, sun and fog for the coast

* Time of day 9:30-11:00 or 15:00-16:30: shadows long enough to show shape,
  sun high enough that the sea is lit.
* Sun `#fff4e0` at energy 1.0 with sky ambient 1.0 (the scaffold's) suits the
  palette above; with lighter colours lower both and check the shots (section 1).
* Fog: light and cool, `#c8d4e0` at density 0.002-0.004, so the far edge of the
  sea fades instead of ending. A warm fog tints the whole scene yellow (the city
  learned this, WORLD_ART_GUIDE.md 1.7).
* Sky: the procedural sky's defaults (`#3d6ea8` to `#a9c3dc`) suit a clear day.

## 4. Interiors: rooms are dark until you light them

A room built from walls and a ceiling gets no sun: the ceiling and walls cast the
sun's shadow over the whole floor, and the sky ambient alone leaves it dim and flat.
Light every room you want people to see:

```json
"environment": {"ambient": {"color": "#8a8f99", "energy": 0.6, "source": "color"}},
"lights": [
  {"id": "ceiling_lamp", "type": "point", "position": [0, 2.5, -0.5], "color": "#ffd9a0",
   "energy": 1.6, "range": 7, "attenuation": 1},
  {"id": "window_fill", "type": "spot", "position": [0, 2.2, 2.6], "rotation": [-25, 0, 0],
   "spot_angle": 60, "range": 9, "color": "#dfe8f5", "energy": 1.0}
]
```

* One warm point light (`#ffd9a0`, 2700-3000 K) per room, 0.3 m under the
  ceiling, `range` a little more than the room's longest side. At energy 1.6 it
  burns a white spot onto a light ceiling right above it (the picture below); hang
  it 0.5 m down or use 1.2 if that matters.
* A cool spot (`#dfe8f5`) from each window into the room fakes daylight; aim it at
  the floor 2-3 m inside.
* A colour ambient (`source: "color"`) at 0.5-0.7 instead of the sky ambient keeps
  shaded corners from going black in a house with many rooms.
* Only the nearest few lamps get a real light (WORLD_ART_GUIDE.md 1.6), so for a
  house with many rooms give each room one lamp, not several.
* Interior colours can be lighter than outside ones: walls `#d6d1c6`, ceiling
  `#e3ded4`, a wooden floor `#8a6a48`, and one or two saturated pieces (a teal sofa
  `#2f6f73`, a terracotta rug `#b0623e`).

![The same room: sky ambient only (left) and with a ceiling lamp, a window fill and a colour ambient (right)](world_art_coastal/room_dark_lit.jpg)

## 5. Shapes and scale for modern buildings

* Doors 0.9 x 2.2 m, windows 1.2-3 m wide with sills at 0.9 m, ceilings
  2.6-2.8 m, stairs 0.18 m rise and 0.28 m tread. `iamar-world assets building
  house --rooms bedroom:3,living,kitchen,bath:2` makes a house with these
  (docs/HOUSE_ROOMS.md in the kit).
* A beach house reads as one by its roof and deck: a low-pitched or flat roof with
  a deep overhang (0.6-1 m), a wooden deck on the sea side, large windows.
* Palms lean away from the wind and never stand in rows; a few loungers and an
  umbrella together on the sand say "beach" more than many scattered props.

## 6. Self-check (on your own preview shots)

Take `iamar-world preview` shots from above the beach, at the waterline
(camera y 0.2 m over the surface) and under water (camera 1 m below the surface),
and one in each room:

- [ ] No flat white or flat yellow surface in the sun (section 1).
- [ ] From above, the sea floor shows through near the shore and the sea darkens
      offshore; foam sits on the shore line.
- [ ] Under water there is no sky, and fish and the floor are visible.
- [ ] Every room you can enter is lit (section 4); no black corners.
- [ ] Doors and stairs fit a 1.8 m person.
- [ ] The far edge of the world fades into fog or sky, not into a hard edge.
