diff --git a/.agents/skills/splat-studio-workflows/SKILL.md b/.agents/skills/splat-studio-workflows/SKILL.md
index b4a81ad..98fa494 100644
--- a/.agents/skills/splat-studio-workflows/SKILL.md
+++ b/.agents/skills/splat-studio-workflows/SKILL.md
@@ -42,7 +42,8 @@ the job LOG, no file).
(+ a `build-meta.json` recipe — read via `inspect(target:"lod_recipe")`; pre-feature
bundles return `not-found`); deleting that entry deletes the folder. Add
`decimateAlgorithm:"uniform"` to decimate every derived level at a flat rate instead of
-the adaptive default.
+the adaptive default. If a bake dies with "non-finite position", re-run with
+`filterNaN:true` — the LOD writer aborts on the first bad gaussian.
**Environment-shell LOD (combine):** lighter levels first (`convert(decimate:"50%")` per level),
then `build_lod(mode:"combine", lodFiles:[...], lodEnvFlags:[...])` — env flag = always-visible
diff --git a/.claude/skills/splat-studio-workflows/SKILL.md b/.claude/skills/splat-studio-workflows/SKILL.md
index b4a81ad..98fa494 100644
--- a/.claude/skills/splat-studio-workflows/SKILL.md
+++ b/.claude/skills/splat-studio-workflows/SKILL.md
@@ -42,7 +42,8 @@ the job LOG, no file).
(+ a `build-meta.json` recipe — read via `inspect(target:"lod_recipe")`; pre-feature
bundles return `not-found`); deleting that entry deletes the folder. Add
`decimateAlgorithm:"uniform"` to decimate every derived level at a flat rate instead of
-the adaptive default.
+the adaptive default. If a bake dies with "non-finite position", re-run with
+`filterNaN:true` — the LOD writer aborts on the first bad gaussian.
**Environment-shell LOD (combine):** lighter levels first (`convert(decimate:"50%")` per level),
then `build_lod(mode:"combine", lodFiles:[...], lodEnvFlags:[...])` — env flag = always-visible
diff --git a/README.md b/README.md
index 22781c9..02fcc45 100644
--- a/README.md
+++ b/README.md
@@ -7,7 +7,7 @@ all in a dockable, Unity/Unreal-style tab editor you can rearrange and save per
workspace.
-**Built with [PlayCanvas](https://github.com/playcanvas/engine) `2.21.3` · [@playcanvas/splat-transform](https://github.com/playcanvas/splat-transform) `3.2.0`**
+**Built with [PlayCanvas](https://github.com/playcanvas/engine) `2.21.4` · [@playcanvas/splat-transform](https://github.com/playcanvas/splat-transform) `3.3.0`**
[](LICENSE)

diff --git a/client/index.html b/client/index.html
index 72cfa88..231ccfa 100644
--- a/client/index.html
+++ b/client/index.html
@@ -129,11 +129,11 @@
Export
-
-
+ Decimation
+ Filter NaN Load result into viewport
diff --git a/client/src/api.ts b/client/src/api.ts
index 727bd15..e0a6d6d 100644
--- a/client/src/api.ts
+++ b/client/src/api.ts
@@ -110,7 +110,7 @@ export interface ConvertRequest {
maxWorkers?: number;
spzVersion?: number;
decimate?: string;
- /** decimation strategy (--decimate vs --decimate-uniform); 'adaptive' or omitted = plain --decimate */
+ /** decimation strategy (--decimate-adaptive vs --decimate); 'adaptive' or omitted = --decimate-adaptive */
decimateAlgorithm?: 'adaptive' | 'uniform';
/** absolute dir for decimation spill files (--scratch-dir); blank = alongside the output */
scratchDir?: string;
diff --git a/client/src/lod-panel.ts b/client/src/lod-panel.ts
index f987821..496b864 100644
--- a/client/src/lod-panel.ts
+++ b/client/src/lod-panel.ts
@@ -199,6 +199,7 @@ lodRun.onclick = () => {
lodChunkCount: Number($('lod-chunk-count').value),
lodChunkExtent: Number($('lod-chunk-extent').value),
scratchDir: $('scratch-dir').value.trim(),
+ filterNaN: $('lod-filter-nan').checked,
lodFiles,
lodEnvFlags
}
diff --git a/docs/MCP_WORKFLOWS.md b/docs/MCP_WORKFLOWS.md
index 28a2b8f..f4f4104 100644
--- a/docs/MCP_WORKFLOWS.md
+++ b/docs/MCP_WORKFLOWS.md
@@ -101,6 +101,11 @@ mixed-scale content such as skies. The effective choice lands in `build-meta.jso
split into multiple blocks (roughly 2M+ gaussians) — adaptive with `device: "cpu"` there
fails as `gpu-required`.
+Pass `filterNaN: true` when a source may contain non-finite gaussians. The LOD writer
+aborts the whole bake on the first one (`has a non-finite position; run --filter-nan …`),
+so this is the remedy — it applies to every level in both modes, and the choice lands in
+`build-meta.json`.
+
### 4. Collision mesh for a game engine
Voxelize the splat into `*.collision.glb` (plus voxel debug files). **GPU required.**
diff --git a/docs/USER_GUIDE.md b/docs/USER_GUIDE.md
index 72a7c7d..d7a8297 100644
--- a/docs/USER_GUIDE.md
+++ b/docs/USER_GUIDE.md
@@ -221,9 +221,9 @@ They run in a fixed pipeline order (and don't apply to streamed-LOD bakes):
voxel size / opacity / min-contribution overrides.
- **Reorder (Morton / Z-order)** — spatially sort for better compression (`--morton-order`).
- **Decimate to (count or %)** — reduce the gaussian count to a number or percentage.
- The paired **Decimation** dropdown picks the algorithm: **Adaptive** (`--decimate`,
+ The paired **Decimation** dropdown picks the algorithm: **Adaptive** (`--decimate-adaptive`,
default) allocates removal by local error — much better on mixed-scale scenes like
- skies; **Uniform** (`--decimate-uniform`) removes at a flat rate everywhere — lower
+ skies; **Uniform** (`--decimate`) removes at a flat rate everywhere — lower
memory, and better at depth on uniformly-sized content (an even texture, a single
object, snow).
> **Adaptive needs a GPU on large scenes.** Once a scene is big enough to split into
@@ -261,6 +261,12 @@ folders that the engine streams by camera distance, for scenes too big to load a
5. Set the **Chunk size (K splats)** and **Chunk extent (m)**, pick a **Device**, then
**Generate streamed LOD**.
+> **Filter NaN.** The LOD writer refuses a source containing a non-finite gaussian and
+> aborts the bake (`LOD 0 gaussian N has a non-finite position; run --filter-nan …`).
+> Tick **Filter NaN** to drop those gaussians instead (`-N`); it applies to every level,
+> including Combine rows. Sources exported from Splat Studio are already clean — reach
+> for this when a bake fails on third-party or scanner-produced input.
+
Every bake also writes a `build-meta.json` next to the bundle's `lod-meta.json` — the
recipe it was built from: the source file per level, the environment selection, the
effective settings, and per-level gaussian counts. Expand the bundle's row in the Files
diff --git a/docs/screenshots/group-region.png b/docs/screenshots/group-region.png
index 2e58dbd..59565e0 100644
Binary files a/docs/screenshots/group-region.png and b/docs/screenshots/group-region.png differ
diff --git a/docs/screenshots/linked-group.png b/docs/screenshots/linked-group.png
index d2e0ed2..4c337c8 100644
Binary files a/docs/screenshots/linked-group.png and b/docs/screenshots/linked-group.png differ
diff --git a/docs/screenshots/lod-autotune.png b/docs/screenshots/lod-autotune.png
index f83098e..3243196 100644
Binary files a/docs/screenshots/lod-autotune.png and b/docs/screenshots/lod-autotune.png differ
diff --git a/docs/screenshots/lod-decimate.png b/docs/screenshots/lod-decimate.png
index 1b84a2d..41da61c 100644
Binary files a/docs/screenshots/lod-decimate.png and b/docs/screenshots/lod-decimate.png differ
diff --git a/docs/screenshots/settings-panel.png b/docs/screenshots/settings-panel.png
index 011b678..a635acb 100644
Binary files a/docs/screenshots/settings-panel.png and b/docs/screenshots/settings-panel.png differ
diff --git a/docs/screenshots/settings-updates.png b/docs/screenshots/settings-updates.png
index 322d1d6..0ef7d8d 100644
Binary files a/docs/screenshots/settings-updates.png and b/docs/screenshots/settings-updates.png differ
diff --git a/mcp-server/tools/convert.mjs b/mcp-server/tools/convert.mjs
index db32a6b..261d73d 100644
--- a/mcp-server/tools/convert.mjs
+++ b/mcp-server/tools/convert.mjs
@@ -60,7 +60,7 @@ export function register(server) {
filterSphere: filterSphere.optional(),
filterNaN: z.boolean().optional().describe('Drop NaN/Inf gaussians (-N).'),
decimate: z.string().regex(/^\d+%?$/).optional().describe('Decimate to a count or percentage like "50%" (-F).'),
- decimateAlgorithm: z.enum(['adaptive', 'uniform']).optional().describe('Decimation algorithm (default adaptive). "adaptive" (--decimate) allocates removal by local error — better on mixed-scale content such as skies; "uniform" (--decimate-uniform) removes at a flat rate — lower memory. Only used with decimate. "uniform" is the only algorithm that runs on CPU once a scene is large enough to split into multiple blocks; adaptive with device "cpu" there fails as gpu-required.'),
+ decimateAlgorithm: z.enum(['adaptive', 'uniform']).optional().describe('Decimation algorithm (default adaptive). "adaptive" (--decimate-adaptive) allocates removal by local error — better on mixed-scale content such as skies; "uniform" (--decimate) removes at a flat rate — lower memory. Only used with decimate. "uniform" is the only algorithm that runs on CPU once a scene is large enough to split into multiple blocks; adaptive with device "cpu" there fails as gpu-required.'),
scratchDir: z.string().optional().describe('Absolute path to an existing directory for decimation spill files (--scratch-dir); may be off-workspace (another volume). Only used with decimate; omitted/blank = alongside the output.'),
mortonOrder: z.boolean().optional().describe('Morton-reorder (-M).'),
verbose: z.boolean().optional(),
@@ -82,8 +82,9 @@ export function register(server) {
mode: z.enum(['decimate', 'combine']),
lodLevels: z.number().int().min(1).max(8).optional().describe('decimate: number of levels incl. LOD 0 (default 3).'),
lodKeepPercent: z.number().min(5).max(95).optional().describe('decimate: percent kept per level (default 50).'),
- decimateAlgorithm: z.enum(['adaptive', 'uniform']).optional().describe('decimate: algorithm for every derived level — "adaptive" (--decimate, default) allocates removal by local error; "uniform" (--decimate-uniform) removes at a flat rate. Ignored in combine mode. "uniform" is the only algorithm that runs on CPU once a scene is large enough to split into multiple blocks; adaptive with device "cpu" there fails as gpu-required.'),
+ decimateAlgorithm: z.enum(['adaptive', 'uniform']).optional().describe('decimate: algorithm for every derived level — "adaptive" (--decimate-adaptive, default) allocates removal by local error; "uniform" (--decimate) removes at a flat rate. Ignored in combine mode. "uniform" is the only algorithm that runs on CPU once a scene is large enough to split into multiple blocks; adaptive with device "cpu" there fails as gpu-required.'),
scratchDir: z.string().optional().describe('decimate: absolute path to an existing directory for decimation spill files (--scratch-dir); may be off-workspace. Omitted/blank = alongside each temp output.'),
+ filterNaN: z.boolean().optional().describe('Drop NaN/Inf gaussians before tagging levels (-N). The LOD writer aborts the bake on a non-finite gaussian ("has a non-finite position; run --filter-nan..."), so set this to bake a source that may contain them. Applies to every level in both modes.'),
lodFiles: z.array(z.string()).optional().describe('combine: additional level files in detail order (each lighter than the last).'),
lodEnvFlags: z.array(z.boolean()).optional().describe('combine: per lodFiles entry, true = always-visible backdrop (LOD -1). Needs >=1 non-env level.'),
lodChunkCount: z.number().int().min(16).max(8192).optional().describe('approx gaussians per chunk in K (-C, default 512).'),
diff --git a/package-lock.json b/package-lock.json
index 823befa..1fc09d1 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -9,7 +9,7 @@
"version": "0.1.0",
"license": "Apache-2.0",
"dependencies": {
- "@playcanvas/splat-transform": "^3.2.0",
+ "@playcanvas/splat-transform": "^3.3.0",
"dockview-core": "^7.0.4",
"electron-updater": "^6.8.9",
"express": "^5.2.1",
@@ -20,7 +20,7 @@
"concurrently": "^10.0.4",
"electron": "^43.3.0",
"electron-builder": "^26.15.7",
- "playcanvas": "^2.21.3",
+ "playcanvas": "^2.21.4",
"png-to-ico": "^3.0.1",
"pngjs": "^7.0.0",
"rcedit": "^5.0.2",
@@ -506,9 +506,9 @@
}
},
"node_modules/@playcanvas/splat-transform": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/@playcanvas/splat-transform/-/splat-transform-3.2.0.tgz",
- "integrity": "sha512-y40eaVkHpgWGfRWECO628ltpWSKFZxDQn3sTWTsB9feKurLaDKhLLsKsbFrZ30rFDQAW/AtOnuIB2pSDrorDBA==",
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/@playcanvas/splat-transform/-/splat-transform-3.3.0.tgz",
+ "integrity": "sha512-gVkw/E6oc95p41EsGYuNSfz934ZdeLwrkQSuAdqDL7XvkGdjFEUxamzuSr/LD5N/8K7+o6Wx5ZtVwqEUrbhzZA==",
"license": "MIT",
"dependencies": {
"@adobe/spz": "0.2.2",
@@ -617,9 +617,6 @@
"arm64"
],
"dev": true,
- "libc": [
- "glibc"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -637,9 +634,6 @@
"arm64"
],
"dev": true,
- "libc": [
- "musl"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -657,9 +651,6 @@
"ppc64"
],
"dev": true,
- "libc": [
- "glibc"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -677,9 +668,6 @@
"s390x"
],
"dev": true,
- "libc": [
- "glibc"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -697,9 +685,6 @@
"x64"
],
"dev": true,
- "libc": [
- "glibc"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -717,9 +702,6 @@
"x64"
],
"dev": true,
- "libc": [
- "musl"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -3819,9 +3801,6 @@
"arm64"
],
"dev": true,
- "libc": [
- "glibc"
- ],
"license": "MPL-2.0",
"optional": true,
"os": [
@@ -3843,9 +3822,6 @@
"arm64"
],
"dev": true,
- "libc": [
- "musl"
- ],
"license": "MPL-2.0",
"optional": true,
"os": [
@@ -3867,9 +3843,6 @@
"x64"
],
"dev": true,
- "libc": [
- "glibc"
- ],
"license": "MPL-2.0",
"optional": true,
"os": [
@@ -3891,9 +3864,6 @@
"x64"
],
"dev": true,
- "libc": [
- "musl"
- ],
"license": "MPL-2.0",
"optional": true,
"os": [
@@ -4465,9 +4435,9 @@
}
},
"node_modules/playcanvas": {
- "version": "2.21.3",
- "resolved": "https://registry.npmjs.org/playcanvas/-/playcanvas-2.21.3.tgz",
- "integrity": "sha512-+AKl0yeNUBo9JSjMRNi2Sz24KhWDhBVMtvhonbeRnKD6FGhNK0O76zvqOu3zgXZxUEzF54h4QGpruhNUkKvsUQ==",
+ "version": "2.21.4",
+ "resolved": "https://registry.npmjs.org/playcanvas/-/playcanvas-2.21.4.tgz",
+ "integrity": "sha512-L4UGy3z/YT8AaNBEY4ITsZup548UFMabF7loh0YQ0DRwQLdjIW8grmZPoQ1+B83+N6sejRS0/XlXV2Vfb11+fw==",
"license": "MIT",
"dependencies": {
"@types/webxr": "^0.5.24",
diff --git a/package.json b/package.json
index 8fbfc47..5448c7c 100644
--- a/package.json
+++ b/package.json
@@ -34,7 +34,7 @@
"dist:win": "npm run prepack:win && electron-builder --win"
},
"dependencies": {
- "@playcanvas/splat-transform": "^3.2.0",
+ "@playcanvas/splat-transform": "^3.3.0",
"dockview-core": "^7.0.4",
"electron-updater": "^6.8.9",
"express": "^5.2.1",
@@ -48,7 +48,7 @@
"concurrently": "^10.0.4",
"electron": "^43.3.0",
"electron-builder": "^26.15.7",
- "playcanvas": "^2.21.3",
+ "playcanvas": "^2.21.4",
"png-to-ico": "^3.0.1",
"pngjs": "^7.0.0",
"rcedit": "^5.0.2",
diff --git a/server/commands.mjs b/server/commands.mjs
index 7b4237e..a3bbcb0 100644
--- a/server/commands.mjs
+++ b/server/commands.mjs
@@ -102,8 +102,9 @@ const vec3Arg = (v, name) => {
// device: 'cpu' | 'auto' | a GPU adapter index (from -L/--list-gpus). Shared by the
// main command and the LOD decimate pre-commands, which spawn their own CLI process
-// and must honor the same device choice. Adaptive decimation (the 3.2 default) needs
-// a device once a scene splits into multiple blocks; uniform runs on CPU at any size.
+// and must honor the same device choice. Adaptive decimation (Splat Studio's own
+// default) needs a device once a scene splits into multiple blocks; uniform runs on
+// CPU at any size.
// Returns the effective device.
const pushDeviceFlag = (args, options) => {
if (options.device === 'cpu') {
@@ -118,9 +119,10 @@ const pushDeviceFlag = (args, options) => {
return 'auto';
};
-// decimation algorithm: adaptive (default, --decimate) allocates removal by local
-// error; uniform (--decimate-uniform) is the pre-3.2 flat-rate algorithm, lower
-// memory and better on uniformly-sized content. Same value syntax either way.
+// decimation algorithm: adaptive (--decimate-adaptive) allocates removal by local
+// error; uniform (--decimate, the CLI default since 3.3) is the flat-rate algorithm,
+// lower memory and better on uniformly-sized content. Same value syntax either way.
+// Splat Studio's own default stays 'adaptive' regardless of the upstream CLI default.
// Validated here because /api/convert passes the request body through unchecked.
const decimateAlgorithm = (options) => {
const a = String(options.decimateAlgorithm ?? '').trim() || 'adaptive';
@@ -129,7 +131,7 @@ const decimateAlgorithm = (options) => {
}
return a;
};
-const decimateFlag = (options) => (decimateAlgorithm(options) === 'uniform' ? '--decimate-uniform' : '--decimate');
+const decimateFlag = (options) => (decimateAlgorithm(options) === 'adaptive' ? '--decimate-adaptive' : '--decimate');
// --scratch-dir: decimation spill directory. Deliberately NOT workspace-guarded —
// pointing spill at another volume is the point. Absolute + existing dir only.
diff --git a/tests/e2e.mjs b/tests/e2e.mjs
index 460a4e0..242a546 100644
--- a/tests/e2e.mjs
+++ b/tests/e2e.mjs
@@ -236,10 +236,9 @@ try {
assert(meta.lodLevels === 3, `expected 3 LOD levels, got ${meta.lodLevels}`);
assert(!fs.existsSync(path.join(projectDir, 'demo-room-lod-src')), 'temp decimate dir not cleaned up');
assert(!job.command.includes('--scratch-dir'), `--scratch-dir without scratchDir option: ${job.command}`);
- // no decimateAlgorithm -> adaptive: every pre-command keeps plain --decimate
+ // no decimateAlgorithm -> adaptive: every pre-command uses --decimate-adaptive
const pre = job.command.split('\n').slice(0, 2);
- assert(pre.every((l) => l.includes('--decimate ')), `LOD default not adaptive: ${job.command}`);
- assert(!job.command.includes('--decimate-uniform'), `LOD default emitted uniform: ${job.command}`);
+ assert(pre.every((l) => l.includes('--decimate-adaptive ')), `LOD default not adaptive: ${job.command}`);
});
// build recipe persisted inside the bundle, before the job flips to 'done'
@@ -272,6 +271,35 @@ try {
assert(s.decimateAlgorithm === 'adaptive', `settings decimateAlgorithm: ${s.decimateAlgorithm}`);
});
+ // splat-transform 3.3 aborts a LOD bake on any non-finite gaussian; -N is the
+ // documented remedy and must reach the CLI *after* the input (actions are ordered)
+ await check('streamed LOD: NaN source fails without Filter NaN, bakes with it', async () => {
+ const src = await fsp.readFile(path.join(projectDir, 'demo-room.ply'));
+ const off = src.indexOf(Buffer.from('end_header\n')) + 'end_header\n'.length;
+ src.writeFloatLE(NaN, off + 7 * 56); // 14 float32 props/vertex; poke vertex 7's x
+ await fsp.writeFile(path.join(projectDir, 'nan-room.ply'), src);
+
+ const bad = await runJob('/api/convert', {
+ input: 'nan-room.ply', format: 'lod',
+ options: { device: SKIP_GPU ? 'cpu' : 'auto', lodLevels: 2 }
+ });
+ assert(bad.status === 'error', `NaN LOD bake should error, got ${bad.status}: ${(bad.log || '').slice(-200)}`);
+ assert(/non-finite|filter-nan/i.test(bad.log || ''), `error should name the remedy: ${(bad.log || '').slice(-200)}`);
+
+ const ok = await runJob('/api/convert', {
+ input: 'nan-room.ply', format: 'lod',
+ options: { device: SKIP_GPU ? 'cpu' : 'auto', lodLevels: 2, filterNaN: true }
+ });
+ assert(ok.status === 'done', `filterNaN LOD bake ${ok.status}: ${(ok.log || '').slice(-200)}`);
+ // -N is an action on the preceding input, so it must follow it, not lead the argv
+ for (const line of ok.command.split('\n')) {
+ if (!line.includes('-N')) continue;
+ assert(/nan-room\.ply["']?\s+-N|l\d\.ply["']?\s+-N/.test(line), `-N must follow its input: ${line}`);
+ }
+ const bm = JSON.parse(fs.readFileSync(path.join(projectDir, 'nan-room-lod', 'build-meta.json'), 'utf8'));
+ assert(bm.settings.filterNaN === true, `build-meta should record filterNaN: ${JSON.stringify(bm.settings)}`);
+ });
+
// cheap count parsed from lod-meta.json itself — must mirror what the CLI wrote
await check('files listing: lod entry carries gaussians + per-level lodCounts', async () => {
const meta = JSON.parse(fs.readFileSync(path.join(projectDir, 'demo-room-lod', 'lod-meta.json'), 'utf8'));
@@ -293,35 +321,35 @@ try {
assert(status === 400 && /PLY/i.test(json.error || ''), `expected 400 PLY error, got ${status} ${JSON.stringify(json)}`);
});
- // decimation strategy: adaptive (default/omitted) stays plain --decimate;
- // 'uniform' switches to the pre-3.2 flat-rate --decimate-uniform algorithm
- await check('decimate defaults to adaptive (--decimate, not --decimate-uniform)', async () => {
+ // decimation strategy: adaptive (default/omitted) needs the new --decimate-adaptive
+ // flag; 'uniform' stays plain --decimate (the CLI default since 3.3)
+ await check('decimate defaults to adaptive (--decimate-adaptive)', async () => {
const job = await runJob('/api/convert', {
input: 'demo-room.ply', format: 'ply',
options: { decimate: '50%', device: SKIP_GPU ? 'cpu' : 'auto' }
});
assert(job.status === 'done', `job ${job.status}: ${(job.log || '').slice(-200)}`);
- assert(job.command.includes('--decimate 50%'), `no --decimate 50% in cmd: ${job.command}`);
- assert(!job.command.includes('--decimate-uniform'), `unexpected --decimate-uniform: ${job.command}`);
+ assert(job.command.includes('--decimate-adaptive 50%'), `no --decimate-adaptive 50% in cmd: ${job.command}`);
});
- await check('decimateAlgorithm uniform emits --decimate-uniform', async () => {
+ await check('decimateAlgorithm uniform emits plain --decimate', async () => {
const job = await runJob('/api/convert', {
input: 'demo-room.ply', format: 'ply',
options: { decimate: '50%', decimateAlgorithm: 'uniform', device: SKIP_GPU ? 'cpu' : 'auto' }
});
assert(job.status === 'done', `job ${job.status}: ${(job.log || '').slice(-200)}`);
- assert(job.command.includes('--decimate-uniform 50%'), `no --decimate-uniform 50% in cmd: ${job.command}`);
+ assert(job.command.includes('--decimate 50%'), `no --decimate 50% in cmd: ${job.command}`);
+ assert(!job.command.includes('--decimate-adaptive'), `unexpected --decimate-adaptive: ${job.command}`);
});
- await check('LOD decimate mode: decimateAlgorithm uniform emits --decimate-uniform on each pre-command', async () => {
+ await check('LOD decimate mode: decimateAlgorithm uniform emits plain --decimate on each pre-command', async () => {
const job = await runJob('/api/convert', {
input: 'demo-room.ply', format: 'lod',
options: { device: SKIP_GPU ? 'cpu' : 'auto', lodLevels: 3, lodKeepPercent: 50, decimateAlgorithm: 'uniform' }
});
assert(job.status === 'done', `job ${job.status}: ${(job.log || '').slice(-200)}`);
const lines = job.command.split('\n');
- assert(lines.slice(0, 2).every((l) => l.includes('--decimate-uniform')), `pre-commands missing --decimate-uniform: ${job.command}`);
+ assert(lines.slice(0, 2).every((l) => l.includes('--decimate ') && !l.includes('--decimate-adaptive')), `pre-commands missing plain --decimate: ${job.command}`);
assert(!lines[2].includes('--decimate'), `combine step must not carry --decimate: ${lines[2]}`);
// the recipe records the resolved algorithm, so the bake replays the same way
const bm = JSON.parse(fs.readFileSync(path.join(projectDir, 'demo-room-lod', 'build-meta.json'), 'utf8'));
diff --git a/tests/mcp-e2e.mjs b/tests/mcp-e2e.mjs
index 350a1c7..922fda1 100644
--- a/tests/mcp-e2e.mjs
+++ b/tests/mcp-e2e.mjs
@@ -146,18 +146,18 @@ try {
// build_lod declares decimateAlgorithm separately from convert — an undeclared
// field would be stripped by the SDK and fall back to adaptive
const full = data(await call('jobs', { action: 'get', id: j.jobId }));
- assert(full.command?.includes('--decimate-uniform'), `no --decimate-uniform in cmd: ${full.command}`);
+ assert(full.command?.includes('--decimate ') && !full.command.includes('--decimate-adaptive'), `no plain --decimate in cmd: ${full.command}`);
});
// the decimation-algorithm choice must survive MCP schema validation: the SDK
// strips undeclared args, so an unwired field would silently fall back to adaptive
- await check('convert carries decimateAlgorithm through to --decimate-uniform', async () => {
+ await check('convert carries decimateAlgorithm through to plain --decimate', async () => {
const j = data(await call('convert', { project: 'Demo', input: 'demo-room.ply', format: 'ply', decimate: '50%', decimateAlgorithm: 'uniform', device: 'cpu' }));
assert(j.jobId, `no jobId: ${JSON.stringify(j)}`);
const w = data(await call('jobs', { action: 'wait', id: j.jobId, timeout_ms: 120000 }));
assert(w.status === 'done', `decimate job: ${JSON.stringify(w).slice(0, 160)}`);
const full = data(await call('jobs', { action: 'get', id: j.jobId }));
- assert(full.command?.includes('--decimate-uniform 50%'), `no --decimate-uniform 50% in cmd: ${full.command}`);
+ assert(full.command?.includes('--decimate 50%'), `no --decimate 50% in cmd: ${full.command}`);
});
await check('render_image equirect rejects a non-2:1 resolution as bad-input', async () => {