Skip to content

3D engine that AI agents drive

Correct the fog light and smoke and fire lines in the docs (#2251)

Nguyen Xuan An91749cc31d4f
diff --git a/changes/2251.md b/changes/2251.md
new file mode 100644
index 00000000..41f48a4b
--- /dev/null
+++ b/changes/2251.md
@@ -0,0 +1 @@
+- The scene skill now says point and spot lights scatter in volume fog (up to 8, no shadows), and the physics guide names the baked gas solver behind `add-explosion` and grid volumes instead of saying smoke and fire are not built (#2251).
diff --git a/docs/physics.md b/docs/physics.md
index c49e9529..8e9f50ae 100644
--- a/docs/physics.md
+++ b/docs/physics.md
@@ -785,6 +785,6 @@ No Blender parity is claimed for either kind: Blender's particle physics, force
### Decision: smoke, fire and liquid in the browser
-Smoke and fire: not built. The grid solver is the cost, not the volume look. A naive CPU step (semi-Lagrangian advection of density plus 20 pressure passes, unoptimised JavaScript, measured on the dev machine) takes about 0.09 s on a 32 cubed grid, 0.14 s on 48 cubed, 0.46 s on 64 cubed and 1.3 s on 96 cubed. A 10 second clip at 60 frames is 600 steps: about 4.6 minutes of baking at 64 cubed, and 157 MB of density frames at 4 bytes a cell, before velocity and temperature. That does not fit an agent's tool call or the package budget. A recipe can already use the depth-clipped volumetric fog, and emitter particles with `scale: "grow"` for puffs. If smoke or fire becomes a goal, bake a density sequence outside the browser, as Spume does for liquid, and play it back through a volume object, which needs the volume rendering work first.
+Smoke and fire: one baked solver ships, behind `add-explosion` only. `src/gas-sim.js` (Stable Fluids advection and pressure projection, buoyancy, vorticity confinement, a fuel to flame burn) bakes one ground blast at 32 cubed for 72 frames, keyed by fuel and seed and cached on disk, and the grid volume's box scales it to the asked `size` (`src/explosion-grids.js`, `docs/agent-scene.md`). A grid volume (`shape: "grid"`, `docs/volumetric.md`) also draws density, temperature and flame grids baked by EmberGen, Houdini or Blender. There is no general smoke or fire tool with free emitters, colliders or wind. The solver stays one fixed, cached bake rather than a simulation per call because the solver is the cost, not the volume look. A naive CPU step (semi-Lagrangian advection of density plus 20 pressure passes, unoptimised JavaScript, measured on the dev machine) takes about 0.09 s on a 32 cubed grid, 0.14 s on 48 cubed, 0.46 s on 64 cubed and 1.3 s on 96 cubed. A 10 second clip at 60 frames is 600 steps: about 4.6 minutes of baking at 64 cubed, and 157 MB of density frames at 4 bytes a cell, before velocity and temperature. That does not fit an agent's tool call or the package budget. A recipe can already use the depth-clipped volumetric fog, and emitter particles with `scale: "grow"` for puffs. A longer or larger smoke or fire is baked outside the browser, as Spume does for liquid, and played back as a grid volume sequence.
Liquid: keep `addons/spume` playback and do not add a browser solver. Spume plays a baked liquid as parts in 8793 bytes gzip (the `entry:spume` baseline from `npm run size`), and the bake runs offline in another project. A browser FLIP or SPH solver would add its own code, a bounded step budget and a surface reconstruction, and it would face the same step times as the grid above. No browser liquid solver was written or measured, so no speed claim is made about one. Revisit only when an agent task needs a liquid that Spume cannot play back.
diff --git a/skills/build-crucible-scene/references/look.md b/skills/build-crucible-scene/references/look.md
index 4b99bd98..b32c4853 100644
--- a/skills/build-crucible-scene/references/look.md
+++ b/skills/build-crucible-scene/references/look.md
@@ -101,7 +101,8 @@ act only above 1 octave. Each octave costs three extra density taps per step, so
`keyTransmittance` and `surfaceTransmittance` are also opt in. `scene_capabilities` with `topic: "environment"` lists
every `volumeFog` field and its range.
-Point lights do not scatter in volume fog; the sun does. A sunlit closed room with fog uses `bake.gridFog`
+The sun scatters in volume fog, and so do point and spot lights: at most 8, points first, with no shadows in the fog
+(`docs/volumetric.md`, "Point and spot lights in the fog"). A sunlit closed room with fog uses `bake.gridFog`
(see `light.md`). Animate density with an `environment` track `volumeFogDensity` (see `film-and-animation.md`).
## Exposure, bloom, contrast, occlusion