---
title: "physics.bake: Bake Physics — Scene kit command — Kition"
description: "Bakes the physics simulation over the frame range; answers the cache state. Without anything simulated it fails. Nonfinite cloth/soft-body motion fails explicitly, discards the derived cache and stops automatic baking until Bake is requested again."
canonical: "https://developer.kition.ai/docs/kits/scene/commands/physics.bake"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/scene/commands/physics.bake](https://developer.kition.ai/docs/kits/scene/commands/physics.bake)

# physics.bake

**Bake Physics.** Bakes the physics simulation over the frame range; answers the cache state. Without anything simulated it fails. Nonfinite cloth/soft-body motion fails explicitly, discards the derived cache and stops automatic baking until Bake is requested again.

- Kit: Scene 0.1.0 (.kscene); reference: [Scene kit commands](https://developer.kition.ai/docs/kits/scene.md)
- Changes the document: no

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `wait` | `boolean` | no | Bake every frame now (default); false starts a bake that physics.bakeStep runs |

## Call through scene_run

```text
scene_run {
  "path": "<file>.kscene",
  "steps": [{ "command": "physics.bake" }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `wait`. scene_run answers the step’s result in `completed[i].result`.

## Result

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `error` | `string` | no | Failure detail when state is failed; retry explicitly after correcting settings |
| `frames` | `integer` | no |  |
| `state` | `"none" \| "baking" \| "baked" \| "outdated" \| "failed"` | no |  |
| `total` | `integer` | no |  |

```json
{
  "additionalProperties": true,
  "properties": {
    "error": {
      "description": "Failure detail when state is failed; retry explicitly after correcting settings",
      "type": "string"
    },
    "frames": {
      "type": "integer"
    },
    "state": {
      "enum": [
        "none",
        "baking",
        "baked",
        "outdated",
        "failed"
      ],
      "type": "string"
    },
    "total": {
      "type": "integer"
    }
  },
  "type": "object"
}
```

## Parameter schema

```json
{
  "additionalProperties": false,
  "properties": {
    "wait": {
      "description": "Bake every frame now (default); false starts a bake that physics.bakeStep runs",
      "type": "boolean"
    }
  },
  "type": "object"
}
```

Generated from the command list of @kition/scene-darwin-arm64@0.1.0 and the kit itself (scene_commands through @kition/cli@0.1.1, built from KitionAI/kition-scene@4d06faf).
