Skip to content

armgit / 67.js

Public Imported from GitHub
0

3D engine that AI agents drive

Merge origin/main

Nguyen Xuan An18f7b40e8c36
diff --cc bench/reference/run.mjs
index 5273ae3f,d2c45dba..6f0ad70d
--- a/bench/reference/run.mjs
+++ b/bench/reference/run.mjs
@@@ -24,15 -24,11 +24,18 @@@ const cloth = process.argv.includes('--
// --no-water draws the scenes without the water reflection (src/water-reflection.js), which is otherwise found from the materials; --ssr-water draws them with bench/reference/ssr-water.js instead.
// --grand draws the options for the grand scenes (grand-scenes.js, issue #168) and scores them into grand.json.
const grand = process.argv.includes('--grand');
- const sceneSet = khronos ? 'khronos' : cloth ? 'cloth' : grand ? 'grand' : null;
+ // --option <scene>:<option>,<scene>:<option> draws named looks (look-options.js, issue #168) with the GPU only, into artifacts/reference-look/<scene>-<option>-gpu.png. No Blender, no score, no baseline.
+ const optionFlag = process.argv.indexOf('--option');
+ const lookIds = optionFlag >= 0 ? process.argv[optionFlag + 1].split(',').map(name => name.replace(':', '-')) : null;
+ const sceneSet = khronos ? 'khronos' : cloth ? 'cloth' : grand ? 'grand' : lookIds ? 'look' : null;
-const WORK_DIRECTORY = resolve(sceneSet ? `artifacts/reference-${sceneSet}` : 'artifacts/reference');
+// --view-transform <agx|neutral> draws the scenes with that environment.viewTransform and renders Cycles with the matching Blender view
+// transform (AgX, Khronos PBR Neutral), then scores the pair with view-transform-score.py into view-transform.json (issue #282).
+// Use it with --scene <id>,<id>; the work directory is separate and baseline.json stays as it is.
+const viewTransformFlag = process.argv.indexOf('--view-transform');
+const viewTransform = viewTransformFlag >= 0 ? process.argv[viewTransformFlag + 1] : null;
+const BLENDER_VIEW_TRANSFORMS = { agx: 'AgX', neutral: 'Khronos PBR Neutral' };
+if (viewTransform && !BLENDER_VIEW_TRANSFORMS[viewTransform]) throw new Error(`--view-transform must be one of ${Object.keys(BLENDER_VIEW_TRANSFORMS).join(', ')}.`);
+const WORK_DIRECTORY = resolve(viewTransform ? `artifacts/reference-view-${viewTransform}` : sceneSet ? `artifacts/reference-${sceneSet}` : 'artifacts/reference');
const OUTPUT_DIRECTORY = resolve('bench/reference');
const CHROME = process.env.CHROME_PATH ?? 'C:/Program Files/Google/Chrome/Application/chrome.exe';
const BLENDER = process.env.BLENDER_PATH ?? 'C:/Program Files/Blender Foundation/Blender 5.2/blender.exe';