Skip to content

armgit / 67.js

Public Imported from GitHub
0

3D engine that AI agents drive

Merge remote-tracking branch 'origin/main' into feat/fog-generalise

Nguyen Xuan An0daeabaa8026
diff --cc CHANGELOG.md
index f7b47e56,60754840..3200e147
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@@ -2,8 -2,8 +2,10 @@@
## Unreleased
+- Add `fog-valley` and `fog-room` to the reference suite (part of issue #165, which stays open). Against Cycles `fog-room` scores 0.1953 (EEVEE 0.3730) and `fog-valley` 0.1967 (EEVEE 0.1952), so the fog constants of #161 hold on both. Scaling the fog ambient by the share of the sky the volume sees was measured and not kept: it worsened the region of `temple-hall` (0.2305 to 0.2513), so #164 is not fixed. See `bench/reference/README.md`.
+- Fix a thin bright line at the corners of baked rooms (issue #165). The texel just outside a lightmap chart took the average of the neighbouring chart, so the wall of `dark-shaft` read 128 of 255 sky visibility at its bottom edge where the interior reads 1. `rasterizeTexels` in `src/light-bake.js` now gives that texel to the nearest triangle. Baked `dark-shaft` goes from 0.0653 to 0.0607 and `temple-hall` from 0.0578 to 0.0559 against Cycles.
+ - Hide sky light where the scene blocks it: inside tree crowns and on a valley floor (issue #191, part of it). `createTree` bakes a sky visibility into each foliage vertex from the leaf density above it, and `createTerrain` bakes one into each terrain vertex from the horizon in 16 directions. The shader multiplies it into the environment light only, and meshes without it read 1. On `bench/reference`, the `foliage` crown went from 0.298 to 0.200 (Cycles 0.175) and the score from 0.1173 to 0.1023 (EEVEE 0.0888); `mountain-valley` went from 0.3483 to 0.2623 (EEVEE 0.1879), and its floor from 0.417 to 0.360 (Cycles 0.272). No other scene changed to four digits. The agent scene geometry bound allows 4 more bytes for each terrain vertex.
+ - Compare trees like with like (issue #166, part of it). The Blender side of `bench/reference` now rebuilds the 67js leaf model for `foliage` materials (back-face normal, colour and normal variation, sky reflection 0.3, and light from behind as a Translucent BSDF with weight `0.3 * pi / (3.7, 3.4, 2.9)`), and the 67js back light is now shadowed by the sun shadow. `foliage` goes from 0.1290 to 0.1173 against Cycles (EEVEE 0.0864 to 0.0888) and `mountain-valley` from 0.3473 to 0.3483 (EEVEE 0.1828 to 0.1879); no other scene moved. The remaining gap is canopy and valley sky occlusion, recorded in `bench/reference/README.md`.
- Make the recipe bake presets bake large rooms (issue #189). A preset that does not fit the 5 million path step budget at 16 samples and 1 texel per unit now gives up bounces one at a time instead of refusing, and `bake.reduction` tells the agent what it asked for, what ran and that explicit samples, bounces and texelsPerUnit (up to 24 million path steps, 20 s inline) buy more. `temple-hall` at `standard` now bakes (16 samples, 1 bounce, 1.37 texels per unit, 0.0705 against 0.1504 unbaked with a probe). `fine` is now the same as `standard`: five samples and density mixes within the 20 s limit scored no better on the room scenes. Table in `bench/reference/README.md`.
- Score the recipe bake presets against Cycles (part of issue #170, open for the frame costs). `standard` scores 0.127 to 0.159 on the three rooms (no bake 0.51), `fine` is no better, and `standard` and `fine` refuse `temple-hall`. Table in `bench/reference/README.md`.
- No test asserts real elapsed time any more (issue #179): work counts and a fake clock replace stopwatches. `smoke:agent-review-close` and `smoke:film-physics` are wired; the second starts its own server.
diff --cc bench/reference/baseline.json
index 87e5c44f,6f40fa24..ec1b63c3
--- a/bench/reference/baseline.json
+++ b/bench/reference/baseline.json
@@@ -34,9 -34,9 +34,13 @@@
"cycles": 58.3,
"eevee": 1.4
},
++ "fog-room": {
++ "cycles": 29.4,
++ "eevee": 2.7
++ },
"foliage": {
- "cycles": 16.9,
- "eevee": 0.6
+ "cycles": 26.4,
+ "eevee": 13.5
},
"glass": {
"cycles": 18.9,
@@@ -164,33 -160,13 +164,33 @@@
"eevee-vs-cycles": 0.2662,
"gpu-vs-cpu": 0.0089
},
+ "fog-room": {
+ "gpu-vs-cycles": 0.1953,
+ "gpu-vs-eevee": 0.2768,
+ "cpu-vs-cycles": 0.1958,
+ "cpu-vs-eevee": 0.2764,
+ "eevee-vs-cycles": 0.373,
+ "gpu-vs-cpu": 0.0059,
+ "region-pixels": 0.243,
+ "region-gpu-vs-cycles": 0.1682,
+ "region-gpu-vs-eevee": 0.3032,
+ "region-eevee-vs-cycles": 0.3146
+ },
+ "fog-valley": {
+ "gpu-vs-cycles": 0.1967,
+ "gpu-vs-eevee": 0.1098,
+ "cpu-vs-cycles": 0.1965,
+ "cpu-vs-eevee": 0.1095,
+ "eevee-vs-cycles": 0.1952,
+ "gpu-vs-cpu": 0.0122
+ },
"foliage": {
- "gpu-vs-cycles": 0.1181,
- "gpu-vs-eevee": 0.0846,
- "cpu-vs-cycles": 0.1178,
- "cpu-vs-eevee": 0.0843,
+ "gpu-vs-cycles": 0.1023,
+ "gpu-vs-eevee": 0.0853,
+ "cpu-vs-cycles": 0.102,
+ "cpu-vs-eevee": 0.0849,
"eevee-vs-cycles": 0.0888,
- "gpu-vs-cpu": 0.01
+ "gpu-vs-cpu": 0.0098
},
"glass": {
"gpu-vs-cycles": 0.1034,