# allyhub scenery bake

> Bakes a 3D scenery's light into a lightmap once, kept in .allyhub/cache/bake/ and laid on it each time it is built; one baked on a GPU is laid only by that GPU, one baked on the CPU (ALLYHUB_GPU=0) by every renderer

Source: https://allyhub.com/docs/reference/cli/scenery-bake · AllyHub 0.10.0
Index of all docs: https://allyhub.com/llms.txt

## Usage

```bash
allyhub scenery bake [item]
```

## Arguments

| Argument | Type | What it is |
| --- | --- | --- |
| `<item>` | string | The scenery: its id in allyhub.yaml, or its module's file, listed or not |

## Global options

`--dir <value>`: the project's folder; default the one around where it is run. `--json`: print the result as JSON.

## Output

With `--json`, the command prints an object with these fields:

| Field | Type | What it is |
| --- | --- | --- |
| `file` | string |  |
| `bake` | string |  |
| `report` | string |  |
| `digest` | string |  |
| `renderer` | string |  |

## Examples

```bash
allyhub scenery bake room
ALLYHUB_GPU=0 allyhub scenery bake room
```

## Exit codes

`0` when it succeeds; the others are listed in [Exit codes](https://allyhub.com/docs/reference/cli/exit-codes.md).

## In the work

**3d**: Building a 3D scenery and its cameras

[`add search`](https://allyhub.com/docs/reference/cli/add-search.md) → [`add`](https://allyhub.com/docs/reference/cli/add.md) → [`scenery`](https://allyhub.com/docs/reference/cli/scenery.md) → [`scenery view`](https://allyhub.com/docs/reference/cli/scenery-view.md) → [`scenery map`](https://allyhub.com/docs/reference/cli/scenery-map.md) → [`scenery see`](https://allyhub.com/docs/reference/cli/scenery-see.md) → [`scenery measure`](https://allyhub.com/docs/reference/cli/scenery-measure.md) → [`scenery motion`](https://allyhub.com/docs/reference/cli/scenery-motion.md) → [`scenery solve`](https://allyhub.com/docs/reference/cli/scenery-solve.md) → `scenery bake` → [`inspect fidelity`](https://allyhub.com/docs/reference/cli/inspect-fidelity.md) → [`dev`](https://allyhub.com/docs/reference/cli/dev.md)
