3D engine that AI agents drive
Bench: print update time, accept the skinning size growth
Nguyen Xuan And9b9fad4881e
diff --git a/bench/runtime/run.mjs b/bench/runtime/run.mjsindex 5b840c9e..8e59116c 100644--- a/bench/runtime/run.mjs+++ b/bench/runtime/run.mjs@@ -120,7 +120,7 @@ async function runBackend(backendName, serverUrl, report) {report.results[backendName][sceneId] ??= {};report.results[backendName][sceneId][engine] = { ...summarize(result), gpuBusyBefore };const summary = report.results[backendName][sceneId][engine];- console.log(`${backendName} ${sceneId.padEnd(20)} ${engine.padEnd(16)} first ${summary.firstFrameMilliseconds} ms, render ${summary.renderCpuMilliseconds} ms, frame ${summary.fullFrameMilliseconds} ms, ${summary.drawCalls} draws, ${summary.triangles} tris, gpu mem ${summary.gpuMegabytes} MB, heap ${summary.heapMegabytes} MB, busy ${gpuBusyBefore}%${summary.renderTargets ? `+ console.log(`${backendName} ${sceneId.padEnd(20)} ${engine.padEnd(16)} first ${summary.firstFrameMilliseconds} ms, update ${summary.updateMilliseconds} ms, render ${summary.renderCpuMilliseconds} ms, frame ${summary.fullFrameMilliseconds} ms, ${summary.drawCalls} draws, ${summary.triangles} tris, gpu mem ${summary.gpuMegabytes} MB, heap ${summary.heapMegabytes} MB, busy ${gpuBusyBefore}%${summary.renderTargets ? `targets: ${summary.renderTargets.map(target => `${target.name} ${target.megabytes} MB`).join(", ")}` : ""}`);}}diff --git a/changes/572.size.md b/changes/572.size.mdnew file mode 100644index 00000000..74f52a4c--- /dev/null+++ b/changes/572.size.md@@ -0,0 +1,7 @@+- entry:core: the distinct influence-set cache in skin validation, which cuts skinned animation CPU per frame by about three times.+- scene:gltf-box: one-prepare applyAnimation, the reused rollback snapshot and the influence-set cache; 4.5 ms to about 1.5 ms per frame for 8 characters.+- scene:gltf-box+lazy: same code as scene:gltf-box.+- scene:agent-scene: the same skinning and glTF pose code, which agent scenes import.+- scene:agent-scene+lazy: same code as scene:agent-scene.+- goal:gltf-box: 346 bytes for a three times cheaper animated character is worth it; the lead accepts it under the trade-off rule.+- goal:agent-scene: 231 bytes for the same skinning cost cut; accepted on the same grounds.