Skip to content

armgit / 67.js

Public Imported from GitHub
0

3D engine that AI agents drive

Add an automatic floor with a contact shadow, and drop the exposure change

Nguyen Xuan Anbcf74f057a57
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c5ea4433..34fc3d9f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,7 +2,8 @@
## Unreleased
-- Measure the default look on a cold agent run and lower the default exposure (part of issue #53; the done condition stays open, see below). Breaking look change: a recipe that sets no `effects.exposure` now renders at `0.8` instead of `1` (one constant, `DEFAULT_EXPOSURE`); a recipe that sets it, and the 12 `npm run reference` scenes, which set exposure 1 themselves, are unchanged. Every other default is unchanged: setup `daylight`, `effects.ambientOcclusion` 0, bloom strength 0.12, no depth of field, no bake, no ground, and the same camera and shadow rules. The suite's look harness drew every recipe without the setup's environment map, so its images were darker than what the MCP preview shows an agent; it now draws with the map, `regrade.mjs` finds files of runs made with `--runs`, and the judge ran on the new images. Measured on Haiku, 6 tasks, one run each, no skill, judged by a Sonnet vision judge: agents set no environment, effects, shadow or bake in any run and only a camera in 4 of 6; the judge scored 66 of 72 before and 66 of 72 after, so no lift is shown (see `bench/agent-modeling/README.md`). Not built: a default ground with a contact shadow (a floor in every recipe would change recipes that draw their own) and an automatic bake.
+- Add an automatic floor with a contact shadow to the MCP preview, and measure the default look on cold runs (part of issue #53; its done condition is not shown, see below). Breaking look change: a recipe with no floor of its own now draws a light grey disc under its lowest geometry at that height, so the key light's shadow falls on something; before, objects floated on a flat grey backdrop. It is not a recipe node: `src/agent-ground.js` builds it from world bounds on every draw (`agentGroundPlacement`), so the exported recipe, `scene.parts`, silhouettes and the suite's checks do not hold it, and it reaches the renderer through the `ground` option, which now also accepts a part (about 20 bytes in `entry:core`). It is left out when a part already forms a floor: one that spans at least 90 percent of the scene's width and depth, is thinner than a quarter of its width, and is the lowest geometry. `environment.ground: false` switches it off (the field is absent from recipes that do not set it). Nothing else about the default look changed: `effects.exposure` stays 1 (an exposure of 0.8 was tried and dropped: on the six cold recipes no pixel of the subject reached 250 at either value, and mean luma was 157 to 199 at 1 and 142 to 187 at 0.8), setup `daylight`, occlusion 0. The suite's look harness drew without the setup's environment map, so its images were darker than the preview shows; it now draws with the map and the floor, and `regrade.mjs` finds files of runs made with `--runs`. Measured on six cold Haiku recipes with a reference-free Sonnet vision question ("does the object sit on a surface, with a believable contact shadow", 0 to 3): 0, 0, 0, 0, 0, 0 before and 1, 1, 2, 1, 1, 0 after. The judge named the front and side cameras as the gap: they are orthographic at floor height, so a floor is edge-on and a shadow falls behind the object, and only the three-quarter view shows it. The reference-based judge (shape, proportions, features, surface) tied at 66 of 72 across the dropped exposure change, because it cannot see lighting defaults. Tool schema text was shortened to pay for the `ground` field.
+
- Measure what an equal feature set costs against three.js (part of issue #74; no engine change, no speed-up). `bench/runtime` gets the engines `67js-ldr`, `67js-one-sample`, `67js-ldr-one-sample` and `three-one-sample` (run with `--engine`) and a `--cpu-only` flag. Measured: with no MSAA and no HDR target 67js is still 5.2 to 5.7 times three.js on SwiftShader in `large-mesh`, `many-materials` and `instanced-objects` (7.8, 5.3 and 7.8 with the defaults), so the gap is the lit shader and not those two features. On the RTX 3060 `large-mesh` costs 3.6 ms against 0.6 ms and is not explained by HDR, MSAA, the vertex shader or the vertex attributes; on ANGLE Vulkan the ratio is 2.3 instead of 5.8. Skipping zero-intensity fill lights was tried and reverted (inside the noise). The profile is in `bench/runtime/PROFILE.md`.
- Add cascaded sun shadows and light linking (part of issue #52; recipes do not reach either, and `lit-interior` was already improved by the light bake, not by this work). `addons/cascaded-shadows`: `new Renderer67(canvas, parts, { shadowCascades: createCascadedShadows({ count: 3 }) })` fits up to four depth maps to slices of the camera's view, with sphere fitting and texel snapping so edges do not crawl; on the new `long-street` reference scene the score against Cycles goes from 0.1555 to 0.1398 for about 0.2 ms more a frame on an RTX 3060 (+25 percent on SwiftShader) when the camera moves. `addons/light-linking`: `applyLightLinks(parts, environment)` limits a light to the parts named in its `affects` list (`environment.keyAffects` for the sun) through a per-part mask in `material.lightMask`; the new `light-linking` reference scene scores 0.0998 against Cycles with the same lists as Blender receiver collections. Both keep their GLSL out of the core bundle (`registerShaderFeatureCode`, new slots `sunVisibility`, `linkSun`, `linkPoint`, `linkSpot` and `linkArea`), and `npm run reference -- --cascades <n>` and `frame-time.mjs <scene> <backend> --cascades` measure them. No earlier reference scene moved.
diff --git a/bench/agent-modeling/README.md b/bench/agent-modeling/README.md
index 11285c25..cb9e3b66 100644
--- a/bench/agent-modeling/README.md
+++ b/bench/agent-modeling/README.md
@@ -206,6 +206,12 @@ such as organic shapes or a look to match, would need a score for appearance bef
- **What a reader sees.** The images show an object floating on a flat grey backdrop with no contact shadow, and a pale top face at exposure 1. A default ground with a contact shadow is the larger fix and was not built: a floor in every recipe would change recipes that draw their own.
- Cost: $0.75 and $0.83 for the agent runs, $0.21, $0.99 and $1.19 for the judge.
+### Exposure dropped, automatic floor added
+
+The exposure change above was reverted: on the six cold recipes no subject pixel reached 250 at exposure 1 or 0.8, and mean luma on the subject was 157, 187, 199, 194, 196 and 199 at 1 against 142, 173, 187, 182, 183 and 187 at 0.8 (crate, mug, table, soap, chair, gear), so 1 does not clip. The numbers in the table above came from the 0.8 run; treat its judge total as one more tie.
+
+`surface-judge.mjs` asks one reference-free question per task, "does the object sit on a surface, with a believable contact shadow", 0 to 3 over the three cameras (`results/2026-11-01-surface-judge.json`, Sonnet, same six cold recipes). Before the automatic floor: 0, 0, 0, 0, 0, 0. After: crate 1, mug 1, table 2, soap 1, chair 1, gear 0. The judge's notes say the same thing each time: the three-quarter view shows a floor and a shadow, and the front and side views do not, because those cameras sit at floor height and see a floor edge-on. Gear showed no floor in any view. The fixed cameras limit this score, so read it as a direction.
+
## Clip layers (2026-10-31)
`robot-walk-wave` asks for a character that walks and waves at once through `motion.layers`. The check `assetWalkAndWave` reloads the exported recipe, plays each layer alone (keeping its own speed, offset and loop) and compares part matrices at two times: the legs must match Walking and move, the right arm must leave Walking, the left arm must keep walking. Cold Sonnet, no skill, `results/2026-10-31-11-40-sonnet-walk-wave-cold-fixed-grader.json`: 1 of 1, 7 tool calls (2 errors), $0.31. A first run, with a check that compared against Walking at speed 1 only, failed on a recipe the agent had correct (it set per-layer speeds); the check was fixed and that recipe grades as a pass. One run is not a rate.
diff --git a/bench/agent-modeling/look-harness.js b/bench/agent-modeling/look-harness.js
index c2362b3e..20573e37 100644
--- a/bench/agent-modeling/look-harness.js
+++ b/bench/agent-modeling/look-harness.js
@@ -1,6 +1,7 @@
// Runs in the page: draws a recipe from each fixed camera, the way the MCP preview draws a scene.
import { createAgentScene, loadAllAgentSceneModules, loadMeshBooleans, needsMeshBooleans } from '/src/agent-scene.js';
import { agentEnvironmentMap, resolveAgentShadow } from '/src/agent-look.js';
+import { agentGroundPlacement, createAgentGround } from '/src/agent-ground.js';
import { Renderer67 } from '/src/renderer.js';
async function renderLookViews(recipe, views) {
@@ -12,8 +13,9 @@ async function renderLookViews(recipe, views) {
// The MCP preview lights a recipe with the setup's environment map; without it the images would show a darker scene than agents get.
const environment = { ...scene.environment, map: agentEnvironmentMap(scene.environment) };
const effects = scene.effects;
+ const placement = agentGroundPlacement(scene.parts, scene.environment);
const renderer = new Renderer67(canvas, scene.parts, {
- ground: false, hdr: true, depth: true, samples: 1, pixelRatio: 1, memoryBudgetMiB: 512,
+ ground: placement ? createAgentGround(placement) : false, hdr: true, depth: true, samples: 1, pixelRatio: 1, memoryBudgetMiB: 512,
world: environment.world, environment,
shadowBounds: resolveAgentShadow(scene.shadow, environment.lightDirection),
});
diff --git a/bench/agent-modeling/results/2026-11-01-surface-judge.json b/bench/agent-modeling/results/2026-11-01-surface-judge.json
new file mode 100644
index 00000000..23798325
--- /dev/null
+++ b/bench/agent-modeling/results/2026-11-01-surface-judge.json
@@ -0,0 +1,82 @@
+{
+ "question": "does the object sit on a surface, with a believable contact shadow",
+ "model": "sonnet",
+ "scale": "0 to 3 over the front, side and three-quarter cameras",
+ "recipes": "the six cold Haiku recipes of results/2026-11-01-01-25-haiku-look-before.json",
+ "before": [
+ {
+ "task": "crate",
+ "score": 0,
+ "costUsd": 0.18624000000000002,
+ "note": "The crate sits against a flat grey background with no visible ground plane and no contact shadow under it in any of the three views, so it floats in empty space."
+ },
+ {
+ "task": "mug",
+ "score": 0,
+ "costUsd": 0.1860881,
+ "note": "The mug floats against a flat grey background in all three views, with no ground plane and no shadow beneath it."
+ },
+ {
+ "task": "table",
+ "score": 0,
+ "costUsd": 0.1860479,
+ "note": "The table floats on a flat grey background in all three views, with no visible floor plane and no shadow under the legs."
+ },
+ {
+ "task": "soap",
+ "score": 0,
+ "costUsd": 0.22243210000000002,
+ "note": "The object floats against a flat grey background in all three views, with no visible ground plane and no contact shadow."
+ },
+ {
+ "task": "chair",
+ "score": 0,
+ "costUsd": 0.1882717,
+ "note": "The chair sits on a flat grey background with no visible ground plane or shadow in any of the three views, so it looks like it's floating in empty space."
+ },
+ {
+ "task": "gear",
+ "score": 0,
+ "costUsd": 0.1882503,
+ "note": "The gear floats on a flat, uniformly grey background with no visible ground plane and no shadow beneath it in any of the three views."
+ }
+ ],
+ "after": [
+ {
+ "task": "crate",
+ "score": 1,
+ "costUsd": 0.1850786,
+ "note": "The three-quarter view shows a ground plane and a believable cast shadow, but the front and side views show only a flat grey backdrop with no ground or shadow, so the crate looks like it floats there."
+ },
+ {
+ "task": "mug",
+ "score": 1,
+ "costUsd": 0.18475550000000002,
+ "note": "The front and side views show the mug against a flat grey background with no visible surface or shadow, and only the three-quarter view shows a ground plane with a soft cast shadow, so the contact is missing in two of the three views."
+ },
+ {
+ "task": "table",
+ "score": 2,
+ "costUsd": 0.1846431,
+ "note": "The three-quarter view shows the table on a ground plane with a believable cast shadow, but the front and side views are flat grey with no visible surface or shadow, so the table looks like it floats there."
+ },
+ {
+ "task": "soap",
+ "score": 1,
+ "costUsd": 0.1846613,
+ "note": "The front and side views show a flat grey backdrop with no visible surface or shadow, so the object floats there, and only the three-quarter view hints at a ground plane with a faint soft shadow."
+ },
+ {
+ "task": "chair",
+ "score": 1,
+ "costUsd": 0.1828813,
+ "note": "The three-quarter view shows the chair on a ground plane with a believable cast shadow, but the front and side views show only a flat grey background with no surface or shadow, so it looks like it floats there."
+ },
+ {
+ "task": "gear",
+ "score": 0,
+ "costUsd": 0.1845755,
+ "note": "The gear sits on a flat, uniform grey background with no visible ground plane, horizon or shadow in any of the three views, so it looks like it's floating."
+ }
+ ]
+}
diff --git a/bench/agent-modeling/surface-judge.mjs b/bench/agent-modeling/surface-judge.mjs
new file mode 100644
index 00000000..ef3f1ce3
--- /dev/null
+++ b/bench/agent-modeling/surface-judge.mjs
@@ -0,0 +1,29 @@
+// Reference-free look question: does the object sit on a surface, with a believable contact shadow?
+// A headless Claude Code session that may only read images answers 0 to 3 for the three cameras of one task.
+// node bench/agent-modeling/surface-judge.mjs --claude <path> --model <name> --label <name> --directory <image directory> --tasks a,b
+// Images are <directory>/<task>-front.png, -side.png and -three-quarter.png. The answer is printed as JSON.
+import { spawnSync } from 'node:child_process';
+import { parseArgs } from 'node:util';
+import { LOOK_VIEWS } from './look-cameras.mjs';
+
+export const SURFACE_QUESTION = `You see three renders of one 3D object (front, side, three-quarter). Answer one question only: does the object sit on a surface, with a believable contact shadow under it?
+0 = it floats in empty space, no surface and no shadow.
+1 = a surface or a shadow is hinted but the object still looks detached.
+2 = it sits on a surface, but the contact or shadow is weak or wrong in some view.
+3 = it clearly sits on a surface with a believable contact shadow in every view.
+Ignore shape, colour and detail. Open every image with the Read tool. Give one sentence, then as the very last line exactly: SURFACE: <0-3>`;
+
+function askJudge({ claude, model, directory, taskId }) {
+ const paths = LOOK_VIEWS.map(({ name }) => `${directory}/${taskId}-${name}.png`);
+ const result = spawnSync(claude, ['-p', '--model', model, '--output-format', 'json', '--allowedTools', 'Read', '--max-budget-usd', '0.3'],
+ { input: `${SURFACE_QUESTION}\n\nImages:\n${paths.join('\n')}`, encoding: 'utf8', timeout: 600000 });
+ const parsed = JSON.parse(result.stdout);
+ const match = /SURFACE:\s*([0-3])/.exec(parsed.result ?? '');
+ return { task: taskId, score: match ? Number(match[1]) : null, costUsd: parsed.total_cost_usd ?? 0, note: String(parsed.result ?? '').split('\n').find(line => line.trim()) };
+}
+
+if (import.meta.url === `file:///${process.argv[1].replaceAll('\\', '/')}`) {
+ const { values } = parseArgs({ options: { claude: { type: 'string' }, model: { type: 'string' }, label: { type: 'string' }, directory: { type: 'string' }, tasks: { type: 'string' } } });
+ const records = values.tasks.split(',').map(taskId => askJudge({ claude: values.claude, model: values.model, directory: values.directory, taskId }));
+ console.log(JSON.stringify({ label: values.label, model: values.model, question: 'does the object sit on a surface, with a believable contact shadow', records }, null, 2));
+}
diff --git a/bench/reference/baseline.json b/bench/reference/baseline.json
index eeb3ff86..d4441e4f 100644
--- a/bench/reference/baseline.json
+++ b/bench/reference/baseline.json
@@ -3,64 +3,64 @@
"blenderVersion": "5.2.2 LTS",
"seconds": {
"brick-graph": {
- "cycles": 16.4,
- "eevee": 8.5
+ "cycles": 25.9,
+ "eevee": 29.8
},
"brick-room": {
- "cycles": 29.1,
- "eevee": 2.2
+ "cycles": 122.6,
+ "eevee": 2.9
},
"brushed-film": {
- "cycles": 15.9,
- "eevee": 2.0
+ "cycles": 28.7,
+ "eevee": 0.6
},
"car-paint": {
- "cycles": 13.8,
- "eevee": 3.4
+ "cycles": 46.9,
+ "eevee": 2.3
},
"character": {
- "cycles": 17.6,
- "eevee": 3.8
+ "cycles": 27.8,
+ "eevee": 1.7
},
"fog": {
- "cycles": 40.9,
- "eevee": 3.9
+ "cycles": 186.7,
+ "eevee": 1.3
},
"foliage": {
- "cycles": 28.1,
- "eevee": 9.9
+ "cycles": 44.8,
+ "eevee": 0.6
},
"glass": {
- "cycles": 22.2,
- "eevee": 16.7
+ "cycles": 15.1,
+ "eevee": 0.5
},
"light-linking": {
- "cycles": 12.1,
- "eevee": 4.0
+ "cycles": 21.3,
+ "eevee": 1.0
},
"lit-interior": {
- "cycles": 21.8,
- "eevee": 4.7
+ "cycles": 64.2,
+ "eevee": 12.1
},
"long-street": {
- "cycles": 12.8,
- "eevee": 4.8
+ "cycles": 50.7,
+ "eevee": 0.6
},
"material-spheres": {
- "cycles": 18.4,
- "eevee": 4.4
+ "cycles": 15.2,
+ "eevee": 0.7
},
"metal": {
- "cycles": 32.5,
- "eevee": 4.6
+ "cycles": 52.5,
+ "eevee": 1.0
},
"outdoor-hdri": {
- "cycles": 9.4,
- "eevee": 5.0
+ "cycles": 11.5,
+ "eevee": 0.8
},
"spot-area": {
- "cycles": 12.0,
- "eevee": 2.2
+ "cycles": 18.4,
+ "eevee": 0.7
}
},
"graphics": {
@@ -86,7 +86,7 @@
},
"brushed-film": {
"gpu-vs-cycles": 0.1613,
- "gpu-vs-eevee": 0.1601,
+ "gpu-vs-eevee": 0.1602,
"cpu-vs-cycles": 0.1613,
"cpu-vs-eevee": 0.1601,
"eevee-vs-cycles": 0.0939,
@@ -94,9 +94,9 @@
},
"car-paint": {
"gpu-vs-cycles": 0.1521,
- "gpu-vs-eevee": 0.1324,
+ "gpu-vs-eevee": 0.1323,
"cpu-vs-cycles": 0.152,
- "cpu-vs-eevee": 0.1324,
+ "cpu-vs-eevee": 0.1323,
"eevee-vs-cycles": 0.082,
"gpu-vs-cpu": 0.0055
},
@@ -113,12 +113,12 @@
"gpu-vs-eevee": 0.0542,
"cpu-vs-cycles": 0.2608,
"cpu-vs-eevee": 0.0542,
- "eevee-vs-cycles": 0.2662,
+ "eevee-vs-cycles": 0.2661,
"gpu-vs-cpu": 0.0085
},
"foliage": {
"gpu-vs-cycles": 0.1594,
- "gpu-vs-eevee": 0.1386,
+ "gpu-vs-eevee": 0.1387,
"cpu-vs-cycles": 0.159,
"cpu-vs-eevee": 0.1384,
"eevee-vs-cycles": 0.0783,
diff --git a/bench/reference/images/brick-graph.jpg b/bench/reference/images/brick-graph.jpg
index fa469a04..6c5022de 100644
Binary files a/bench/reference/images/brick-graph.jpg and b/bench/reference/images/brick-graph.jpg differ
diff --git a/bench/reference/images/brick-room.jpg b/bench/reference/images/brick-room.jpg
index 506e0b37..4bf6c81f 100644
Binary files a/bench/reference/images/brick-room.jpg and b/bench/reference/images/brick-room.jpg differ
diff --git a/bench/reference/images/brushed-film.jpg b/bench/reference/images/brushed-film.jpg
index ce7b47d4..6b8e82a1 100644
Binary files a/bench/reference/images/brushed-film.jpg and b/bench/reference/images/brushed-film.jpg differ
diff --git a/bench/reference/images/car-paint.jpg b/bench/reference/images/car-paint.jpg
index 170f69fe..c4574da3 100644
Binary files a/bench/reference/images/car-paint.jpg and b/bench/reference/images/car-paint.jpg differ
diff --git a/bench/reference/images/character.jpg b/bench/reference/images/character.jpg
index 2896ca0c..e30c8646 100644
Binary files a/bench/reference/images/character.jpg and b/bench/reference/images/character.jpg differ
diff --git a/bench/reference/images/fog.jpg b/bench/reference/images/fog.jpg
index a2b75d7c..77e97c5d 100644
Binary files a/bench/reference/images/fog.jpg and b/bench/reference/images/fog.jpg differ
diff --git a/bench/reference/images/foliage.jpg b/bench/reference/images/foliage.jpg
index 9204b46e..ce69fec3 100644
Binary files a/bench/reference/images/foliage.jpg and b/bench/reference/images/foliage.jpg differ
diff --git a/bench/reference/images/glass.jpg b/bench/reference/images/glass.jpg
index 08e3693c..8134e8a5 100644
Binary files a/bench/reference/images/glass.jpg and b/bench/reference/images/glass.jpg differ
diff --git a/bench/reference/images/light-linking.jpg b/bench/reference/images/light-linking.jpg
index 0bc74bb8..e1c815fa 100644
Binary files a/bench/reference/images/light-linking.jpg and b/bench/reference/images/light-linking.jpg differ
diff --git a/bench/reference/images/lit-interior.jpg b/bench/reference/images/lit-interior.jpg
index 9e26d6ea..b5ccf1f6 100644
Binary files a/bench/reference/images/lit-interior.jpg and b/bench/reference/images/lit-interior.jpg differ
diff --git a/bench/reference/images/long-street.jpg b/bench/reference/images/long-street.jpg
index 503a2f20..ad11befa 100644
Binary files a/bench/reference/images/long-street.jpg and b/bench/reference/images/long-street.jpg differ
diff --git a/bench/reference/images/material-spheres.jpg b/bench/reference/images/material-spheres.jpg
index ebb0cc54..8a1cf5d1 100644
Binary files a/bench/reference/images/material-spheres.jpg and b/bench/reference/images/material-spheres.jpg differ
diff --git a/bench/reference/images/metal.jpg b/bench/reference/images/metal.jpg
index e6b8c80c..e6a5b756 100644
Binary files a/bench/reference/images/metal.jpg and b/bench/reference/images/metal.jpg differ
diff --git a/bench/reference/images/outdoor-hdri.jpg b/bench/reference/images/outdoor-hdri.jpg
index 34544ba1..f6d2b29a 100644
Binary files a/bench/reference/images/outdoor-hdri.jpg and b/bench/reference/images/outdoor-hdri.jpg differ
diff --git a/bench/reference/images/spot-area.jpg b/bench/reference/images/spot-area.jpg
index 345b4e44..62462bed 100644
Binary files a/bench/reference/images/spot-area.jpg and b/bench/reference/images/spot-area.jpg differ
diff --git a/docs/agent-look.md b/docs/agent-look.md
index e43ae02f..fd93a6f2 100644
--- a/docs/agent-look.md
+++ b/docs/agent-look.md
@@ -106,6 +106,7 @@ Sky colors use display RGB, matching the renderer's existing environment contrac
| Field | Default | Range or meaning |
| --- | --- | --- |
| `world` | `false` | Boolean world presentation flag. With `true` the setup environment is also the background |
+| `ground` | on | Absent unless set. `false` removes the preview's automatic floor and contact shadow |
| `setup` | `daylight` | `daylight`, `overcast`, `sunset` or `studio`. See Lighting setups |
| `environmentIntensity` | `1` | `0` to `100`. Scales the setup's environment light and reflections |
| `environmentRotation` | `0` | `-100` to `100` radians around the vertical axis |
@@ -136,8 +137,7 @@ Setting `setup` through `set-environment` resets `lightDirection`, `keyColor`, `
Remote URLs and HDRI files are not accepted from tool input.
This changes the look of every recipe that sets no lighting: before, the default had no environment map, a key color of `[5.2, 4.7, 4.1]` and a fill intensity of `1`.
To get the earlier flat look, set `keyColor`, `fillIntensity` and `environmentIntensity: 0` yourself.
-The default `effects.exposure` is `0.8` (it was `1`); set `exposure: 1` to get the earlier brightness.
-There is no default ground: an object with no floor under it has no contact shadow, so add a ground node when the object should sit on something.
+The MCP preview adds an automatic floor: a light grey disc under the scene's lowest geometry, at that height, which catches the key light's shadow. It is not a recipe node and is not exported. A part that already forms a floor (spans at least 90 percent of the scene's width and depth, is thinner than a quarter of its width and is the lowest geometry) switches it off, and `environment.ground: false` removes it. Code that builds its own `Renderer67` gets it by passing `createAgentGround(agentGroundPlacement(parts, environment))` as the `ground` option (`src/agent-ground.js`).
## Point lights
@@ -193,7 +193,7 @@ Ambient occlusion reads the depth texture, so it needs the HDR depth target that
| Field | Default | Range |
| --- | --- | --- |
-| `exposure` | `0.8` | `0.01` to `16`. The default was `1` before the cold-run look check: a mid-grey surface clipped toward white under the daylight key |
+| `exposure` | `1` | `0.01` to `16` |
| `saturation` | `1` | `0` to `2` |
| `contrast` | `1` | `0.1` to `2` |
| `temperature` | `0` | `-1` to `1` |
diff --git a/docs/parity.md b/docs/parity.md
index 056bbc90..1904a849 100644
--- a/docs/parity.md
+++ b/docs/parity.md
@@ -192,7 +192,7 @@ To move to a new Blender release, run `node scripts/parity-manual-snapshot.mjs`.
| Rendering > Cameras | partial | Perspective, orthographic views, focal length, animated paths, depth of field from depth and camera motion blur, both repeatable per frame. Object motion blur and bokeh shapes are missing. | [camera-path](../tests/camera-path.test.js), [camera](../tests/camera.test.js), [render-passes](../tests/render-passes.test.js) | #54 |
| Rendering > Lights > Light Objects | partial | One directional light with a shadow, 8 point lights, 8 spot lights and 4 rectangular area lights. Point and spot lights can cast shadows from one 24-tile atlas (a point light takes 6 tiles, a spot light 1). Area lights use a representative point and cast no shadow. The directional shadow is a single map, or up to four cascades through `addons/cascaded-shadows` (`shadowCascades` on the renderer; recipes do not reach it): scene `long-street` scores 0.1555 against Cycles with one map and 0.1398 with three cascades, for about 0.2 ms more a frame on an RTX 3060 when the camera moves. | [lighting](../tests/lighting.test.js), [cascades](../tests/cascaded-shadows.test.js), `npm run reference` scenes `spot-area` and `long-street` | #52 |
| Rendering > Lights > Light Linking | partial | `addons/light-linking`: a light's `affects` list (and `environment.keyAffects` for the sun) limits it to the named parts through `applyLightLinks`, as a Blender receiver collection does; the shader skips a light whose bit in the part's mask is clear. Linking changes what a light adds, not what it shadows. The path tracer and the light bake ignore it, recipes do not reach it (`lightLinking: false` in `scene_capabilities`) and there is no blocker list. Scene `light-linking` scores 0.0998 against Cycles. | [light-linking](../tests/light-linking.test.js), `npm run reference` scene `light-linking` | #52 |
-| Rendering > Lights > World Environment | partial | Recipes pick a named setup (`daylight`, `overcast`, `sunset`, `studio`) that carries a procedural environment map, with opt-in screen-space ambient occlusion. Code can load any HDRI; recipes reach only the named maps, with no URLs or files. No reflections between objects yet. | [environment](../tests/environment.test.js), [default look](../tests/default-look.test.js) | #53 |
+| Rendering > Lights > World Environment | partial | Recipes pick a named setup (`daylight`, `overcast`, `sunset`, `studio`) that carries a procedural environment map, with opt-in screen-space ambient occlusion. Code can load any HDRI; recipes reach only the named maps, with no URLs or files. No reflections between objects yet. The MCP preview adds an automatic floor with a contact shadow (`environment.ground: false` removes it). Cold-run reference-free score for sitting on a surface: 0 before, 1 to 2 after, on the three-quarter view only. | [environment](../tests/environment.test.js), [default look](../tests/default-look.test.js) | #53 |
| Rendering > Materials > Components | partial | Surfaces with PBR factors and five maps, a clear coat, transmission with thickness, attenuation and IOR, sheen, and specular weight and tint. Anisotropic highlights and a thin-film iridescence layer, as in the glTF extensions, are compiled in only when a part uses them. There is no subsurface scattering, volume material or displacement. | [texture-set](../tests/texture-set.test.js), [material-layers](../tests/material-layers.test.js) | #50, #51 |
| Rendering > Materials > Assignment | done | A node names one material. | [agent-scene](../tests/agent-scene.test.js) | |
| Rendering > Materials > Preview | out of scope | Interface for a person. Agents use `scene_look`. | | |
diff --git a/scripts/agent-preview-browser.js b/scripts/agent-preview-browser.js
index ac3cae3f..79b9a093 100644
--- a/scripts/agent-preview-browser.js
+++ b/scripts/agent-preview-browser.js
@@ -6,6 +6,7 @@ import { installRenderPasses } from '../src/render-passes.js';
import { applyProjection } from '../src/camera.js';
import { mat4 } from 'gl-matrix';
import { resolveAgentShadow, agentEnvironmentMap } from '../src/agent-look.js';
+import { agentGroundPlacement, createAgentGround, placeAgentGround } from '../src/agent-ground.js';
import { createAgentAssetScene } from '../src/agent-asset.js';
import { parseGltf } from '../src/gltf.js';
import { exportGlb } from '../src/export.js';
@@ -82,6 +83,21 @@ function rebuildRenderer(record) {
record.shadowKey = null;
}
+// The automatic floor (src/agent-ground.js) follows the scene's lowest geometry. A renderer gains or loses it only
+// through a new renderer, so a floor that appears or disappears (a part now forms one, or environment.ground changed) rebuilds.
+function syncAutomaticGround(record) {
+ const placement = agentGroundPlacement(record.scene.parts, record.scene.environment);
+ if (Boolean(placement) !== Boolean(record.renderer.groundPart)) {
+ rebuildRenderer(record);
+ record.renderer.resize();
+ return;
+ }
+ if (placement) {
+ placeAgentGround(record.renderer.groundPart, placement);
+ record.renderer.updateParts([...record.scene.parts, record.renderer.groundPart]);
+ }
+}
+
function draw(record, time = 0, camera = record.scene.camera, frameOptions = {}) {
if (!record.renderer) throw new Error('The scene renderer is leased to a render job.');
if (record.renderer.context.isContextLost()) {
@@ -103,6 +119,7 @@ function draw(record, time = 0, camera = record.scene.camera, frameOptions = {})
} else {
record.renderer.updateParts(record.scene.parts);
}
+ syncAutomaticGround(record);
const environment = record.scene.environment;
const effects = record.scene.effects;
const shadow = record.scene.shadow;
@@ -169,8 +186,9 @@ function resetCanvas() {
}
function initializeRenderer(scene, { memoryBudgetMiB, backend }) {
+ const placement = agentGroundPlacement(scene.parts, scene.environment);
return installRenderPasses(installCameraEffects(new Renderer67(canvas, scene.parts, {
- ground: false,
+ ground: placement ? createAgentGround(placement) : false,
hdr: true,
depth: true,
world: scene.environment.world,
diff --git a/scripts/mcp-server.mjs b/scripts/mcp-server.mjs
index fe5b6687..ba470bd6 100644
--- a/scripts/mcp-server.mjs
+++ b/scripts/mcp-server.mjs
@@ -144,7 +144,8 @@ const volumeFog = z.strictObject({
});
const environment = z.strictObject({
world: z.boolean().optional().describe('Draw the sky and apply surface fog.'),
- setup: z.enum(LIGHTING_SETUP_NAMES).optional().describe('Named lighting: an image-based environment plus key light. Default daylight. Setting it resets the key light, fill and ambient fields to that setup; fields in the same call still win.'),
+ ground: z.boolean().optional().describe('false: no automatic floor.'),
+ setup: z.enum(LIGHTING_SETUP_NAMES).optional().describe('Named lighting. Default daylight. Resets key, fill and ambient fields; same-call fields win.'),
environmentIntensity: bounded(0, 100).optional().describe('Scales the setup environment light and its reflections.'),
environmentRotation: bounded(-100, 100).optional().describe('Turns the setup environment around the vertical axis, in radians.'),
lightDirection: boundedVector(-1e6, 1e6).optional().describe('Nonzero direction toward the key light; shadows follow it.'),
diff --git a/skills/build-67js-scene/SKILL.md b/skills/build-67js-scene/SKILL.md
index 91fc4817..3a95a6d5 100644
--- a/skills/build-67js-scene/SKILL.md
+++ b/skills/build-67js-scene/SKILL.md
@@ -72,7 +72,7 @@ Read [scene-contract.md](references/scene-contract.md) before creating parts or
7. Validate geometry, bounds and scene budgets with the existing Node tests.
8. Capture actual rendered wide and narrow views. Inspect edges, highlights, overlap and the focal point.
9. Exercise orbit, zoom, camera selection and the requested interaction through project dev tooling.
-10. In a recipe, start from the default look: `environment.setup` is `daylight` and `effects.ambientOcclusion` is `0` (off; set 0.4 to 0.8 to add contact darkening). Pick `studio` for products, `overcast` for soft even light, `sunset` for warm low light; Do not hand-tune key, fill and ambient first. The default `effects.exposure` is `0.8`. There is no default ground: add a floor node when an object should sit on something, or it floats with no contact shadow.
+10. In a recipe, start from the default look: `environment.setup` is `daylight` and `effects.ambientOcclusion` is `0` (off; set 0.4 to 0.8 to add contact darkening). Pick `studio` for products, `overcast` for soft even light, `sunset` for warm low light; Do not hand-tune key, fill and ambient first. The preview draws an automatic floor with a contact shadow under the lowest geometry unless a part already forms a floor; `environment.ground: false` removes it, so do not add a floor node only for the shadow.
Do not treat an `antialias: true` context as proof that the final image looks smooth.
Report measured geometry, draw counts and render size separately from visual judgments.
diff --git a/src/agent-ground.js b/src/agent-ground.js
new file mode 100644
index 00000000..bb9c775e
--- /dev/null
+++ b/src/agent-ground.js
@@ -0,0 +1,111 @@
+// The automatic floor of agent scenes: a shadow-catching disc under the scene's lowest geometry.
+// It is not a recipe node. It is built from the scene's world bounds each time the preview draws, so the exported
+// recipe never holds it, and it is left out when a part of the recipe already forms a floor or `environment.ground`
+// is false. Callers give it to the renderer as the `ground` option (renderer.js draws and shadows it like any part).
+import { mat4 } from 'gl-matrix';
+
+const DISC_SEGMENTS = 48;
+// A part is a floor when it spans this share of the scene's width and depth, is thin, and is the lowest geometry.
+const FLOOR_SPAN_SHARE = 0.9;
+const FLOOR_THINNESS = 0.25;
+const FLOOR_LOWEST_TOLERANCE = 1e-3;
+// The disc reaches this many scene half-widths past the scene, so its edge stays out of a framed shot.
+const DISC_REACH = 6;
+const MINIMUM_RADIUS = 2;
+const FLOOR_COLOR = [0.6, 0.6, 0.58];
+
+/** World-space axis-aligned bounds of one part, from its positions and matrix. */
+function partBounds(part) {
+ const { positions } = part.geometry;
+ const matrix = part.matrix;
+ const minimum = [Infinity, Infinity, Infinity];
+ const maximum = [-Infinity, -Infinity, -Infinity];
+ for (let offset = 0; offset < positions.length; offset += 3) {
+ for (let axis = 0; axis < 3; axis++) {
+ const value = matrix[axis] * positions[offset] + matrix[4 + axis] * positions[offset + 1] + matrix[8 + axis] * positions[offset + 2] + matrix[12 + axis];
+ minimum[axis] = Math.min(minimum[axis], value);
+ maximum[axis] = Math.max(maximum[axis], value);
+ }
+ }
+ return { minimum, maximum };
+}
+
+function sceneBounds(boundsList) {
+ const minimum = [Infinity, Infinity, Infinity];
+ const maximum = [-Infinity, -Infinity, -Infinity];
+ for (const bounds of boundsList) {
+ for (let axis = 0; axis < 3; axis++) {
+ minimum[axis] = Math.min(minimum[axis], bounds.minimum[axis]);
+ maximum[axis] = Math.max(maximum[axis], bounds.maximum[axis]);
+ }
+ }
+ return { minimum, maximum };
+}
+
+function formsFloor(bounds, scene) {
+ const widthX = scene.maximum[0] - scene.minimum[0];
+ const widthZ = scene.maximum[2] - scene.minimum[2];
+ const partX = bounds.maximum[0] - bounds.minimum[0];
+ const partZ = bounds.maximum[2] - bounds.minimum[2];
+ const partHeight = bounds.maximum[1] - bounds.minimum[1];
+ const isWide = partX >= FLOOR_SPAN_SHARE * widthX && partZ >= FLOOR_SPAN_SHARE * widthZ;
+ const isThin = partHeight <= FLOOR_THINNESS * Math.max(partX, partZ);
+ const isLowest = bounds.minimum[1] <= scene.minimum[1] + FLOOR_LOWEST_TOLERANCE;
+ return isWide && isThin && isLowest;
+}
+
+/**
+ * Where the automatic floor goes: `{ center, radius, height }`, or null when the scene is empty, `environment.ground`
+ * is false, or a part already forms a floor. The decision uses bounds only, so it is deterministic.
+ */
+export function agentGroundPlacement(parts, environment) {
+ if (environment.ground === false || parts.length === 0) {
+ return null;
+ }
+ const boundsList = parts.map(partBounds);
+ if (!boundsList.every(bounds => bounds.minimum.every(Number.isFinite) && bounds.maximum.every(Number.isFinite))) {
+ return null;
+ }
+ const scene = sceneBounds(boundsList);
+ if (boundsList.some(bounds => formsFloor(bounds, scene))) {
+ return null;
+ }
+ const halfWidth = Math.max(scene.maximum[0] - scene.minimum[0], scene.maximum[2] - scene.minimum[2]) / 2;
+ return {
+ center: [(scene.minimum[0] + scene.maximum[0]) / 2, (scene.minimum[2] + scene.maximum[2]) / 2],
+ radius: Math.max(MINIMUM_RADIUS, halfWidth * DISC_REACH),
+ height: scene.minimum[1],
+ };
+}
+
+function discGeometry() {
+ const positions = [0, 0, 0];
+ for (let segment = 0; segment < DISC_SEGMENTS; segment++) {
+ const angle = (segment / DISC_SEGMENTS) * Math.PI * 2;
+ positions.push(Math.cos(angle), 0, Math.sin(angle));
+ }
+ const indices = [];
+ for (let segment = 0; segment < DISC_SEGMENTS; segment++) {
+ indices.push(0, 1 + ((segment + 1) % DISC_SEGMENTS), 1 + segment);
+ }
+ const normals = positions.map((_, index) => (index % 3 === 1 ? 1 : 0));
+ return { positions: new Float32Array(positions), normals: new Float32Array(normals), indices: new Uint32Array(indices) };
+}
+
+/** Moves the floor part to a placement. The part is created once and its matrix is rewritten in place. */
+export function placeAgentGround(part, placement) {
+ mat4.fromTranslation(part.matrix, [placement.center[0], placement.height, placement.center[1]]);
+ mat4.scale(part.matrix, part.matrix, [placement.radius, 1, placement.radius]);
+}
+
+/** The floor part for a placement. It is a plain lit surface, so the key light's shadow falls on it. */
+export function createAgentGround(placement) {
+ const part = {
+ name: 'Automatic floor',
+ geometry: discGeometry(),
+ matrix: mat4.create(),
+ material: { color: FLOOR_COLOR, metallic: 0, roughness: 0.9, emission: 0, tag: 'surface' },
+ };
+ placeAgentGround(part, placement);
+ return part;
+}
diff --git a/src/agent-look.js b/src/agent-look.js
index 3a43638c..92e9c4fb 100644
--- a/src/agent-look.js
+++ b/src/agent-look.js
@@ -4,10 +4,10 @@ import { resolveEffects } from './effects.js';
import { resolveVolumeFog } from './volumetric.js';
import { resolveLiquidOptics } from './renderer.js';
import { createLightingSetupMap, lightingSetupFields } from './lighting-setups.js';
-import { DEFAULT_LIGHTING_SETUP, LIGHTING_SETUP_NAMES, DEFAULT_AMBIENT_OCCLUSION, DEFAULT_EXPOSURE } from './agent-scene-capabilities.js';
+import { DEFAULT_LIGHTING_SETUP, LIGHTING_SETUP_NAMES, DEFAULT_AMBIENT_OCCLUSION } from './agent-scene-capabilities.js';
const ENVIRONMENT_FIELDS = [
- 'world', 'setup', 'environmentIntensity', 'environmentRotation', 'lightDirection', 'keyColor', 'keyIntensity', 'fillIntensity', 'ambientIntensity',
+ 'world', 'ground', 'setup', 'environmentIntensity', 'environmentRotation', 'lightDirection', 'keyColor', 'keyIntensity', 'fillIntensity', 'ambientIntensity',
'daylight', 'pointLights', 'spotLights', 'areaLights', 'skyTop', 'skyBottom', 'fogColor', 'fogDensity', 'volumeFog', 'liquid',
];
const LIQUID_FIELDS = ['thickness', 'ior', 'refraction', 'scattering', 'foamOpacity', 'foamSoftness'];
@@ -225,7 +225,13 @@ function environmentFrom(input = {}) {
fogDensity: numberInRange(fallback(input.fogDensity, 0.006), 0, 10, 'fogDensity'),
volumeFog: volumeFogFrom(input.volumeFog),
};
- // Optional so recipes without these lights or liquids keep their exported shape.
+ // Optional so recipes without these fields keep their exported shape.
+ if (input.ground !== undefined) {
+ if (typeof input.ground !== 'boolean') {
+ throw new TypeError('environment.ground must be a boolean.');
+ }
+ environment.ground = input.ground;
+ }
if (input.spotLights !== undefined) {
environment.spotLights = lightListFrom(input.spotLights, MAX_SPOT_LIGHTS, 'spotLights').map(spotLightFrom);
}
@@ -280,7 +286,7 @@ function effectsFrom(input = {}) {
}
const ambientOcclusion = fallback(input.ambientOcclusion, DEFAULT_AMBIENT_OCCLUSION);
const resolved = resolveEffects({ ...input, ambientOcclusion, ...groups, bloom: { strength: 0.12, threshold: 1, radius: 1, ...groups.bloom } });
- return { ...resolved, exposure: numberInRange(fallback(input.exposure, DEFAULT_EXPOSURE), 0.01, 16, 'exposure') };
+ return { ...resolved, exposure: numberInRange(fallback(input.exposure, 1), 0.01, 16, 'exposure') };
}
function shadowFrom(input = {}) {
diff --git a/src/agent-scene-capabilities.js b/src/agent-scene-capabilities.js
index 57fb4175..e92e7ae0 100644
--- a/src/agent-scene-capabilities.js
+++ b/src/agent-scene-capabilities.js
@@ -80,8 +80,6 @@ export const RECIPE_ALPHA_MODES = Object.freeze(['opaque', 'blend']);
export const LIGHTING_SETUP_NAMES = Object.freeze(['daylight', 'overcast', 'sunset', 'studio']);
export const DEFAULT_LIGHTING_SETUP = 'daylight';
export const DEFAULT_AMBIENT_OCCLUSION = 0;
-// Under the daylight key and sky a mid-grey surface clips toward white at exposure 1 and loses the shading between faces.
-export const DEFAULT_EXPOSURE = 0.8;
// Render passes a render job can write next to the lit image (see RENDER_PASS_MODES in renderer.js, which must list the same names).
export const RENDER_PASS_NAMES = Object.freeze(['albedo', 'normal', 'emission', 'depth', 'objectId']);
diff --git a/src/renderer.js b/src/renderer.js
index 5006de7f..f51ca34c 100644
--- a/src/renderer.js
+++ b/src/renderer.js
@@ -399,7 +399,7 @@ export class Renderer67 {
this.geometryBytes = 0;
this.geometryBuffers = new Map();
this.batching = batching;
- this.groundPart = ground ? groundPart() : null;
+ this.groundPart = ground === true ? groundPart() : ground || null;
this.buffers = [];
this.batches = [];
this.partLocations = new Map();
diff --git a/tests/agent-ground.test.js b/tests/agent-ground.test.js
new file mode 100644
index 00000000..52460231
--- /dev/null
+++ b/tests/agent-ground.test.js
@@ -0,0 +1,54 @@
+import test from 'node:test';
+import assert from 'node:assert/strict';
+import { mat4 } from 'gl-matrix';
+import { agentGroundPlacement, createAgentGround, placeAgentGround } from '../src/agent-ground.js';
+import { normalizeAgentLook } from '../src/agent-look.js';
+
+function boxPart(center, size) {
+ const [halfX, halfY, halfZ] = size.map(value => value / 2);
+ const corners = [];
+ for (const x of [-halfX, halfX]) for (const y of [-halfY, halfY]) for (const z of [-halfZ, halfZ]) corners.push(x, y, z);
+ return { geometry: { positions: new Float32Array(corners) }, matrix: mat4.fromTranslation(mat4.create(), center) };
+}
+
+const defaultEnvironment = normalizeAgentLook({}).environment;
+
+test('an object with nothing under it gets a floor at its lowest height', () => {
+ const placement = agentGroundPlacement([boxPart([1, 2, 3], [2, 1, 2])], defaultEnvironment);
+ assert.equal(placement.height, 1.5);
+ assert.deepEqual(placement.center, [1, 3]);
+ assert.ok(placement.radius >= 2);
+});
+
+test('a wide thin lowest part counts as the recipe own floor', () => {
+ const slab = boxPart([0, -0.05, 0], [10, 0.1, 10]);
+ const crate = boxPart([0, 0.5, 0], [1, 1, 1]);
+ assert.equal(agentGroundPlacement([slab, crate], defaultEnvironment), null);
+});
+
+test('a raised tabletop, a tall wall and a small plate do not count as a floor', () => {
+ const legs = boxPart([0, 0.35, 0], [1.2, 0.7, 0.7]);
+ const top = boxPart([0, 0.75, 0], [1.2, 0.05, 0.7]);
+ assert.ok(agentGroundPlacement([legs, top], defaultEnvironment));
+ const wall = boxPart([0, 1, 0], [10, 2, 0.2]);
+ assert.ok(agentGroundPlacement([wall, boxPart([0, 0.5, 3], [1, 1, 1])], defaultEnvironment));
+});
+
+test('environment.ground false removes it, and the field stays out of recipes that do not set it', () => {
+ const off = normalizeAgentLook({ environment: { ground: false } }).environment;
+ assert.equal(agentGroundPlacement([boxPart([0, 0, 0], [1, 1, 1])], off), null);
+ assert.equal('ground' in defaultEnvironment, false);
+ assert.throws(() => normalizeAgentLook({ environment: { ground: 'no' } }), /ground/);
+});
+
+test('the placement is deterministic and moves the floor part in place', () => {
+ const parts = [boxPart([0, 1, 0], [1, 2, 1])];
+ const placement = agentGroundPlacement(parts, defaultEnvironment);
+ assert.deepEqual(placement, agentGroundPlacement(parts, defaultEnvironment));
+ const floor = createAgentGround(placement);
+ const matrixObject = floor.matrix;
+ placeAgentGround(floor, { ...placement, height: 4 });
+ assert.equal(floor.matrix, matrixObject);
+ assert.equal(floor.matrix[13], 4);
+ assert.equal(floor.material.tag, 'surface');
+});
diff --git a/tests/agent-look.test.js b/tests/agent-look.test.js
index 5f43d1a1..7d6b7514 100644
--- a/tests/agent-look.test.js
+++ b/tests/agent-look.test.js
@@ -2,7 +2,6 @@ import test from 'node:test';
import assert from 'node:assert/strict';
import { mat4 } from 'gl-matrix';
import { normalizeAgentLook, resolveAgentShadow } from '../src/agent-look.js';
-import { DEFAULT_EXPOSURE } from '../src/agent-scene-capabilities.js';
import { createLightingState, updateLightingState } from '../src/lighting.js';
import { resolveVolumeFog } from '../src/volumetric.js';
@@ -30,7 +29,7 @@ test('default look is complete, detached JSON and idempotent', () => {
depthOfField: { blur: 0, focusDistance: 5 }, motionBlur: { shutter: 0 },
saturation: 1, contrast: 1, temperature: 0, vignette: 0, grain: 0,
ambientOcclusion: 0, ambientOcclusionRadius: 0.5,
- bloom: { strength: 0.12, threshold: 1, radius: 1 }, exposure: DEFAULT_EXPOSURE,
+ bloom: { strength: 0.12, threshold: 1, radius: 1 }, exposure: 1,
});
assert.deepEqual(look.shadow, { target: [0, 1, 0], extent: 3.5, distance: 8, near: 0.1, far: 15 });
assert.deepEqual(JSON.parse(JSON.stringify(look)), look);
diff --git a/tests/default-look.test.js b/tests/default-look.test.js
index a44d4476..52f7ba76 100644
--- a/tests/default-look.test.js
+++ b/tests/default-look.test.js
@@ -1,6 +1,6 @@
import assert from 'node:assert/strict';
import test from 'node:test';
-import { AGENT_SCENE_CAPABILITIES, DEFAULT_AMBIENT_OCCLUSION, DEFAULT_EXPOSURE,DEFAULT_LIGHTING_SETUP, LIGHTING_SETUP_NAMES } from '../src/agent-scene-capabilities.js';
+import { AGENT_SCENE_CAPABILITIES, DEFAULT_AMBIENT_OCCLUSION, DEFAULT_LIGHTING_SETUP, LIGHTING_SETUP_NAMES } from '../src/agent-scene-capabilities.js';
import { agentEnvironmentMap, environmentPatchWithSetup, normalizeAgentLook } from '../src/agent-look.js';
import { createLightingSetupMap, lightingSetupFields } from '../src/lighting-setups.js';
import { resolveEffects } from '../src/effects.js';
@@ -25,7 +25,6 @@ test('a recipe with no lighting settings gets the default setup and occlusion',
const look = normalizeAgentLook({});
assert.equal(look.environment.setup, DEFAULT_LIGHTING_SETUP);
assert.equal(look.effects.ambientOcclusion, DEFAULT_AMBIENT_OCCLUSION);
- assert.equal(look.effects.exposure, DEFAULT_EXPOSURE);
assert.deepEqual(look.environment.lightDirection, lightingSetupFields(DEFAULT_LIGHTING_SETUP).lightDirection);
});
diff --git a/tests/support/preview-harness.mjs b/tests/support/preview-harness.mjs
index b869b69f..0f38ef7a 100644
--- a/tests/support/preview-harness.mjs
+++ b/tests/support/preview-harness.mjs
@@ -75,6 +75,8 @@ export function previewHarness() {
parseGltf, Uint8Array, atob, sessionProblem,
applyProjection, mat4, resolveAgentShadow, agentEnvironmentMap, BRANCH_LIMITS, createBranchStore, printableLabel,
Renderer67: FaultInjectedRenderer,
+ // The fault-injected renderer has no floor part; the automatic floor is covered by agent-ground.test.js and the live smokes.
+ agentGroundPlacement: () => null, createAgentGround: () => null, placeAgentGround: () => {},
// The optional addons only plug stages into a real renderer; the fault-injected one needs none.
installCameraEffects: renderer => renderer, installRenderPasses: renderer => renderer,
});