Build and revise procedural 3D assets with your coding agent. Local MCP server, CLI and TypeScript engine with rendered review, editable source and GLB export.
JavaScript 3d3d-assets3d-modelingagent-skillsagent-toolsai-agentsasset-pipelinecligame-assetsglbgltfmcpmcp-servermodel-context-protocolprocedural-generationprocedural-modelingtext-to-3dthreejstypescript
feat(materials): add a second set of synthetic presets (#221) (#238)
Matthew Kissinger3e3efc72339d
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex fa6e9528..2334c2ca 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -79,6 +79,11 @@ does not publish a package.`schemaVersion:2` record; `createMaterialPresetDraftAny` returns any preset's draft, andpreset summaries report `recordSchemaVersion`. The docs list the presets as a table that atest keeps in step with the catalog (#210).+- Add a second set of material presets ([#221](https://github.com/instruktlabs/kiln/issues/221)).+ `lime-plaster`, `oak`, `linen`, `jute`, `basalt`, `terracotta`, `wicker` and `brushed-brass`+ follow the #210 contract: base colour, normal derived from height and packed metallic/roughness,+ an explicit seed and licence, a stated repeat scale and a family tag. They are synthetic+ starting points, not scans; the docs table and its test list them.- Name procedural texture usage errors and add `kiln validate` ([#215](https://github.com/instruktlabs/kiln/issues/215)).An unknown `proceduralTexture` usage (such as `data`) or a usage that does not match itsportable material slot, in V2 or V3, now crosses the evaluator boundary as the closeddiff --git a/dist/agent-run.mjs b/dist/agent-run.mjsindex 5bc60475..ace61eac 100644--- a/dist/agent-run.mjs+++ b/dist/agent-run.mjs@@ -45993,6 +45993,62 @@ var catalog2 = [family: "fiber",physicalSizeMeters: { width: 1, height: 1 },description: "Vertical straw strands in horizontal courses for roofs and shelters."+ },+ {+ id: "lime-plaster",+ name: "Lime plaster",+ family: "architecture",+ physicalSizeMeters: { width: 2, height: 2 },+ description: "Soft off-white lime render with trowel clouding and fine sand relief."+ },+ {+ id: "oak",+ name: "Honey oak",+ family: "wood",+ physicalSizeMeters: { width: 1, height: 1 },+ description: "Tight straight grain with open pores for furniture and floors; no knots or rays."+ },+ {+ id: "linen",+ name: "Natural linen",+ family: "fabric",+ physicalSizeMeters: { width: 0.5, height: 0.5 },+ description: "Fine flax weave with occasional slubs; matte dielectric, no drape or sheen."+ },+ {+ id: "jute",+ name: "Coarse jute weave",+ family: "fiber",+ physicalSizeMeters: { width: 0.5, height: 0.5 },+ description: "Open basket weave of twisted fibre for rugs, sacking and wrapped handles."+ },+ {+ id: "basalt",+ name: "Dark basalt",+ family: "rock",+ physicalSizeMeters: { width: 2, height: 2 },+ description: "Fine-grained volcanic stone with subtle vesicles and a dry finish."+ },+ {+ id: "terracotta",+ name: "Unglazed terracotta",+ family: "architecture",+ physicalSizeMeters: { width: 1, height: 1 },+ description: "Warm fired clay with soft mottling for pots, tiles and planters; no glaze."+ },+ {+ id: "wicker",+ name: "Woven wicker",+ family: "fiber",+ physicalSizeMeters: { width: 0.5, height: 0.5 },+ description: "Rattan strands passing over and under for chairs, baskets and screens."+ },+ {+ id: "brushed-brass",+ name: "Brushed brass",+ family: "metal",+ physicalSizeMeters: { width: 1, height: 1 },+ description: "Warm yellow brass with fine directional brushing and a fully metallic channel."}];var RECORD_V2_PRESETS = new Set(["palm-frond"]);@@ -46117,6 +46173,75 @@ function createMaterialPresetDraftAny(presetId, raw) {roughnessLow = 220;roughnessHigh = 250;strength = 2.5;+ } else if (presetId === "lime-plaster") {+ color = [noise(14275267, 15657437, 4), noise(12103323, 16052454, 32, 0.25)];+ height = [noise(7368816, 9474192, 4), noise(5263440, 11579568, 32, 0.3)];+ roughnessLow = 205;+ roughnessHigh = 240;+ strength = 1.5;+ } else if (presetId === "oak") {+ color = [+ noise(9069110, 12094807, 4),+ stripes(8017200, 12620896, 56, 0, 0.35),+ noise(6177062, 10976586, 32, 0.15)+ ];+ height = [noise(6710886, 10066329, 4), stripes(5921370, 11053224, 56, 0, 0.35)];+ roughnessLow = 140;+ roughnessHigh = 200;+ strength = 1.8;+ } else if (presetId === "linen") {+ color = [+ noise(13221544, 14537921, 8),+ stripes(12102804, 14998731, 48, 0, 0.25),+ stripes(12102804, 14998731, 48, 90, 0.25),+ noise(11050116, 15788506, 64, 0.15)+ ];+ height = [+ noise(6316128, 10066329, 8),+ stripes(4210752, 12632256, 48, 0, 0.35),+ stripes(4210752, 12632256, 48, 90, 0.35)+ ];+ roughnessLow = 200;+ roughnessHigh = 235;+ strength = 1;+ } else if (presetId === "jute" || presetId === "wicker") {+ const jute = presetId === "jute";+ const count = jute ? 16 : 24;+ color = jute ? [+ noise(10255951, 12558184, 8),+ stripes(8217144, 13150323, count, 0, 0.4),+ stripes(8217144, 13150323, count, 90, 0.4)+ ] : [+ stripes(11109456, 14202492, count, 0),+ stripes(9333308, 13609324, count, 90, 0.5),+ noise(7295792, 12819810, 16, 0.2)+ ];+ height = [+ stripes(4210752, 12632256, count, 0),+ stripes(4210752, 12632256, count, 90, 0.5),+ noise(6316128, 10526880, 16, jute ? 0.35 : 0.15)+ ];+ roughnessLow = jute ? 225 : 170;+ roughnessHigh = jute ? 250 : 215;+ strength = 2.5;+ } else if (presetId === "basalt") {+ color = [noise(3026737, 4868941, 8), noise(1908256, 6053216, 32, 0.3)];+ height = [noise(6316128, 10526880, 8), noise(4210752, 12632256, 32, 0.4)];+ roughnessLow = 160;+ roughnessHigh = 220;+ strength = 2.5;+ } else if (presetId === "terracotta") {+ color = [noise(10902074, 12743501, 8), noise(9062960, 14260851, 32, 0.2)];+ height = [noise(5263440, 11579568, 8), noise(4210752, 12632256, 32, 0.35)];+ roughnessLow = 190;+ roughnessHigh = 235;+ strength = 2;+ } else if (presetId === "brushed-brass") {+ color = [noise(11570508, 13215842, 4), stripes(10518338, 13939822, 64, 0, 0.12)];+ height = [noise(7368816, 9474192, 8), stripes(6710886, 10066329, 64, 0, 0.3)];+ roughnessLow = 70;+ roughnessHigh = 120;+ strength = 1;} else {color = [noise(5061676, 8942420, 4), noise(3418656, 10850155, 32, 0.25)];height = [noise(5592405, 11184810, 8), noise(2236962, 14540253, 32, 0.3)];diff --git a/dist/build.json b/dist/build.jsonindex c044db6b..a7c4fefa 100644--- a/dist/build.json+++ b/dist/build.json@@ -2,10 +2,10 @@"schemaVersion": 1,"entries": {"worker": {- "identity": "sha256:307b68fa073b9c29e3423a63b42b0260d29bfd8f7f73671e207468235f6de836",+ "identity": "sha256:45172d48ae16758e917f14c7e0f59061af76b5a6afd4520913f4dd55cdbdbfd0","engineVersion": "1.3.1","toolchain": "[email protected]",- "sourceHash": "741d57e617776ededf08939ad273e519e98172f5cbbddd2fb3f176d3dba576c5",+ "sourceHash": "d5c701c5d24812cd0a0f4764633b22cb4333b08c625ef07e39f135111886a798","rendererSourceHash": "27927c48b377f7694251a76c0cecd05216fcbbb8a7d03e8bf2bd681dabb5573a","dependencyHash": "af916d063d319fe3c11d1acc13211950eea82bb5ebb87ae4eb60008d72fa7f10","dependencies": {@@ -40,10 +40,10 @@"bundleHash": "sha256:2839cd6aaee99ebea2e55a4f07aa079340b7d281572a7a801484ff489c15624e"},"agent-run": {- "identity": "sha256:307b68fa073b9c29e3423a63b42b0260d29bfd8f7f73671e207468235f6de836",+ "identity": "sha256:45172d48ae16758e917f14c7e0f59061af76b5a6afd4520913f4dd55cdbdbfd0","engineVersion": "1.3.1","toolchain": "[email protected]",- "sourceHash": "741d57e617776ededf08939ad273e519e98172f5cbbddd2fb3f176d3dba576c5",+ "sourceHash": "d5c701c5d24812cd0a0f4764633b22cb4333b08c625ef07e39f135111886a798","rendererSourceHash": "27927c48b377f7694251a76c0cecd05216fcbbb8a7d03e8bf2bd681dabb5573a","dependencyHash": "af916d063d319fe3c11d1acc13211950eea82bb5ebb87ae4eb60008d72fa7f10","dependencies": {@@ -75,13 +75,13 @@},"target": "node","file": "agent-run.mjs",- "bundleHash": "sha256:fe8d9d536c2c4b24686b2b0e0ea7f521018cb30563cd7545cf51f545786bec74"+ "bundleHash": "sha256:42141e716a65089730c4873a08f084b39d5bf30a4f9bf56fff38c7091726a833"},"agent-providers": {- "identity": "sha256:307b68fa073b9c29e3423a63b42b0260d29bfd8f7f73671e207468235f6de836",+ "identity": "sha256:45172d48ae16758e917f14c7e0f59061af76b5a6afd4520913f4dd55cdbdbfd0","engineVersion": "1.3.1","toolchain": "[email protected]",- "sourceHash": "741d57e617776ededf08939ad273e519e98172f5cbbddd2fb3f176d3dba576c5",+ "sourceHash": "d5c701c5d24812cd0a0f4764633b22cb4333b08c625ef07e39f135111886a798","rendererSourceHash": "27927c48b377f7694251a76c0cecd05216fcbbb8a7d03e8bf2bd681dabb5573a","dependencyHash": "af916d063d319fe3c11d1acc13211950eea82bb5ebb87ae4eb60008d72fa7f10","dependencies": {@@ -116,10 +116,10 @@"bundleHash": "sha256:9d6faf03d307321bc2e3bd5ce5bdee0bbbf61e0ebed8bfebfa1fb072287b83fa"},"mcp": {- "identity": "sha256:307b68fa073b9c29e3423a63b42b0260d29bfd8f7f73671e207468235f6de836",+ "identity": "sha256:45172d48ae16758e917f14c7e0f59061af76b5a6afd4520913f4dd55cdbdbfd0","engineVersion": "1.3.1","toolchain": "[email protected]",- "sourceHash": "741d57e617776ededf08939ad273e519e98172f5cbbddd2fb3f176d3dba576c5",+ "sourceHash": "d5c701c5d24812cd0a0f4764633b22cb4333b08c625ef07e39f135111886a798","rendererSourceHash": "27927c48b377f7694251a76c0cecd05216fcbbb8a7d03e8bf2bd681dabb5573a","dependencyHash": "af916d063d319fe3c11d1acc13211950eea82bb5ebb87ae4eb60008d72fa7f10","dependencies": {@@ -154,10 +154,10 @@"bundleHash": "sha256:a246b2c79d629a332cef4430dbe742b0c4a0d2f04f0281e673c3c60ff22706da"},"cli": {- "identity": "sha256:307b68fa073b9c29e3423a63b42b0260d29bfd8f7f73671e207468235f6de836",+ "identity": "sha256:45172d48ae16758e917f14c7e0f59061af76b5a6afd4520913f4dd55cdbdbfd0","engineVersion": "1.3.1","toolchain": "[email protected]",- "sourceHash": "741d57e617776ededf08939ad273e519e98172f5cbbddd2fb3f176d3dba576c5",+ "sourceHash": "d5c701c5d24812cd0a0f4764633b22cb4333b08c625ef07e39f135111886a798","rendererSourceHash": "27927c48b377f7694251a76c0cecd05216fcbbb8a7d03e8bf2bd681dabb5573a","dependencyHash": "af916d063d319fe3c11d1acc13211950eea82bb5ebb87ae4eb60008d72fa7f10","dependencies": {@@ -189,13 +189,13 @@},"target": "node","file": "cli.mjs",- "bundleHash": "sha256:d3d1a48bf2cd1278e376752dfbb0c1e02d5ff07c93eab8922899eca2a08952f9"+ "bundleHash": "sha256:52450ca9223e2aee91e8e2b82a6e4db30034b4b1342bf9b67ec347d67423fb90"},"engine": {- "identity": "sha256:307b68fa073b9c29e3423a63b42b0260d29bfd8f7f73671e207468235f6de836",+ "identity": "sha256:45172d48ae16758e917f14c7e0f59061af76b5a6afd4520913f4dd55cdbdbfd0","engineVersion": "1.3.1","toolchain": "[email protected]",- "sourceHash": "741d57e617776ededf08939ad273e519e98172f5cbbddd2fb3f176d3dba576c5",+ "sourceHash": "d5c701c5d24812cd0a0f4764633b22cb4333b08c625ef07e39f135111886a798","rendererSourceHash": "27927c48b377f7694251a76c0cecd05216fcbbb8a7d03e8bf2bd681dabb5573a","dependencyHash": "af916d063d319fe3c11d1acc13211950eea82bb5ebb87ae4eb60008d72fa7f10","dependencies": {@@ -227,7 +227,7 @@},"target": "node","file": "mcp-engine.mjs",- "bundleHash": "sha256:e1c924877daae40f96ef9172176279c7b96fc6c5c4e421d26cbb3b30dd342a00"+ "bundleHash": "sha256:2ec7ee5d2e9ca0dab37c7258f6e1b2b7c6928be2a088871bc2ae7fe8d15117f3"}}}diff --git a/dist/cli.mjs b/dist/cli.mjsindex 4981d8d0..ad3e454e 100644--- a/dist/cli.mjs+++ b/dist/cli.mjs@@ -49576,6 +49576,75 @@ function createMaterialPresetDraftAny(presetId, raw) {roughnessLow = 220;roughnessHigh = 250;strength = 2.5;+ } else if (presetId === "lime-plaster") {+ color = [noise(14275267, 15657437, 4), noise(12103323, 16052454, 32, 0.25)];+ height = [noise(7368816, 9474192, 4), noise(5263440, 11579568, 32, 0.3)];+ roughnessLow = 205;+ roughnessHigh = 240;+ strength = 1.5;+ } else if (presetId === "oak") {+ color = [+ noise(9069110, 12094807, 4),+ stripes(8017200, 12620896, 56, 0, 0.35),+ noise(6177062, 10976586, 32, 0.15)+ ];+ height = [noise(6710886, 10066329, 4), stripes(5921370, 11053224, 56, 0, 0.35)];+ roughnessLow = 140;+ roughnessHigh = 200;+ strength = 1.8;+ } else if (presetId === "linen") {+ color = [+ noise(13221544, 14537921, 8),+ stripes(12102804, 14998731, 48, 0, 0.25),+ stripes(12102804, 14998731, 48, 90, 0.25),+ noise(11050116, 15788506, 64, 0.15)+ ];+ height = [+ noise(6316128, 10066329, 8),+ stripes(4210752, 12632256, 48, 0, 0.35),+ stripes(4210752, 12632256, 48, 90, 0.35)+ ];+ roughnessLow = 200;+ roughnessHigh = 235;+ strength = 1;+ } else if (presetId === "jute" || presetId === "wicker") {+ const jute = presetId === "jute";+ const count = jute ? 16 : 24;+ color = jute ? [+ noise(10255951, 12558184, 8),+ stripes(8217144, 13150323, count, 0, 0.4),+ stripes(8217144, 13150323, count, 90, 0.4)+ ] : [+ stripes(11109456, 14202492, count, 0),+ stripes(9333308, 13609324, count, 90, 0.5),+ noise(7295792, 12819810, 16, 0.2)+ ];+ height = [+ stripes(4210752, 12632256, count, 0),+ stripes(4210752, 12632256, count, 90, 0.5),+ noise(6316128, 10526880, 16, jute ? 0.35 : 0.15)+ ];+ roughnessLow = jute ? 225 : 170;+ roughnessHigh = jute ? 250 : 215;+ strength = 2.5;+ } else if (presetId === "basalt") {+ color = [noise(3026737, 4868941, 8), noise(1908256, 6053216, 32, 0.3)];+ height = [noise(6316128, 10526880, 8), noise(4210752, 12632256, 32, 0.4)];+ roughnessLow = 160;+ roughnessHigh = 220;+ strength = 2.5;+ } else if (presetId === "terracotta") {+ color = [noise(10902074, 12743501, 8), noise(9062960, 14260851, 32, 0.2)];+ height = [noise(5263440, 11579568, 8), noise(4210752, 12632256, 32, 0.35)];+ roughnessLow = 190;+ roughnessHigh = 235;+ strength = 2;+ } else if (presetId === "brushed-brass") {+ color = [noise(11570508, 13215842, 4), stripes(10518338, 13939822, 64, 0, 0.12)];+ height = [noise(7368816, 9474192, 8), stripes(6710886, 10066329, 64, 0, 0.3)];+ roughnessLow = 70;+ roughnessHigh = 120;+ strength = 1;} else {color = [noise(5061676, 8942420, 4), noise(3418656, 10850155, 32, 0.25)];height = [noise(5592405, 11184810, 8), noise(2236962, 14540253, 32, 0.3)];@@ -49797,6 +49866,62 @@ var init_material_presets = __esm(() => {family: "fiber",physicalSizeMeters: { width: 1, height: 1 },description: "Vertical straw strands in horizontal courses for roofs and shelters."+ },+ {+ id: "lime-plaster",+ name: "Lime plaster",+ family: "architecture",+ physicalSizeMeters: { width: 2, height: 2 },+ description: "Soft off-white lime render with trowel clouding and fine sand relief."+ },+ {+ id: "oak",+ name: "Honey oak",+ family: "wood",+ physicalSizeMeters: { width: 1, height: 1 },+ description: "Tight straight grain with open pores for furniture and floors; no knots or rays."+ },+ {+ id: "linen",+ name: "Natural linen",+ family: "fabric",+ physicalSizeMeters: { width: 0.5, height: 0.5 },+ description: "Fine flax weave with occasional slubs; matte dielectric, no drape or sheen."+ },+ {+ id: "jute",+ name: "Coarse jute weave",+ family: "fiber",+ physicalSizeMeters: { width: 0.5, height: 0.5 },+ description: "Open basket weave of twisted fibre for rugs, sacking and wrapped handles."+ },+ {+ id: "basalt",+ name: "Dark basalt",+ family: "rock",+ physicalSizeMeters: { width: 2, height: 2 },+ description: "Fine-grained volcanic stone with subtle vesicles and a dry finish."+ },+ {+ id: "terracotta",+ name: "Unglazed terracotta",+ family: "architecture",+ physicalSizeMeters: { width: 1, height: 1 },+ description: "Warm fired clay with soft mottling for pots, tiles and planters; no glaze."+ },+ {+ id: "wicker",+ name: "Woven wicker",+ family: "fiber",+ physicalSizeMeters: { width: 0.5, height: 0.5 },+ description: "Rattan strands passing over and under for chairs, baskets and screens."+ },+ {+ id: "brushed-brass",+ name: "Brushed brass",+ family: "metal",+ physicalSizeMeters: { width: 1, height: 1 },+ description: "Warm yellow brass with fine directional brushing and a fully metallic channel."}];RECORD_V2_PRESETS = new Set(["palm-frond"]);diff --git a/dist/mcp-engine.mjs b/dist/mcp-engine.mjsindex 573bf15b..9cac97e7 100644--- a/dist/mcp-engine.mjs+++ b/dist/mcp-engine.mjs@@ -50112,6 +50112,62 @@ var catalog2 = [family: "fiber",physicalSizeMeters: { width: 1, height: 1 },description: "Vertical straw strands in horizontal courses for roofs and shelters."+ },+ {+ id: "lime-plaster",+ name: "Lime plaster",+ family: "architecture",+ physicalSizeMeters: { width: 2, height: 2 },+ description: "Soft off-white lime render with trowel clouding and fine sand relief."+ },+ {+ id: "oak",+ name: "Honey oak",+ family: "wood",+ physicalSizeMeters: { width: 1, height: 1 },+ description: "Tight straight grain with open pores for furniture and floors; no knots or rays."+ },+ {+ id: "linen",+ name: "Natural linen",+ family: "fabric",+ physicalSizeMeters: { width: 0.5, height: 0.5 },+ description: "Fine flax weave with occasional slubs; matte dielectric, no drape or sheen."+ },+ {+ id: "jute",+ name: "Coarse jute weave",+ family: "fiber",+ physicalSizeMeters: { width: 0.5, height: 0.5 },+ description: "Open basket weave of twisted fibre for rugs, sacking and wrapped handles."+ },+ {+ id: "basalt",+ name: "Dark basalt",+ family: "rock",+ physicalSizeMeters: { width: 2, height: 2 },+ description: "Fine-grained volcanic stone with subtle vesicles and a dry finish."+ },+ {+ id: "terracotta",+ name: "Unglazed terracotta",+ family: "architecture",+ physicalSizeMeters: { width: 1, height: 1 },+ description: "Warm fired clay with soft mottling for pots, tiles and planters; no glaze."+ },+ {+ id: "wicker",+ name: "Woven wicker",+ family: "fiber",+ physicalSizeMeters: { width: 0.5, height: 0.5 },+ description: "Rattan strands passing over and under for chairs, baskets and screens."+ },+ {+ id: "brushed-brass",+ name: "Brushed brass",+ family: "metal",+ physicalSizeMeters: { width: 1, height: 1 },+ description: "Warm yellow brass with fine directional brushing and a fully metallic channel."}];var RECORD_V2_PRESETS = new Set(["palm-frond"]);@@ -50236,6 +50292,75 @@ function createMaterialPresetDraftAny(presetId, raw) {roughnessLow = 220;roughnessHigh = 250;strength = 2.5;+ } else if (presetId === "lime-plaster") {+ color = [noise(14275267, 15657437, 4), noise(12103323, 16052454, 32, 0.25)];+ height = [noise(7368816, 9474192, 4), noise(5263440, 11579568, 32, 0.3)];+ roughnessLow = 205;+ roughnessHigh = 240;+ strength = 1.5;+ } else if (presetId === "oak") {+ color = [+ noise(9069110, 12094807, 4),+ stripes(8017200, 12620896, 56, 0, 0.35),+ noise(6177062, 10976586, 32, 0.15)+ ];+ height = [noise(6710886, 10066329, 4), stripes(5921370, 11053224, 56, 0, 0.35)];+ roughnessLow = 140;+ roughnessHigh = 200;+ strength = 1.8;+ } else if (presetId === "linen") {+ color = [+ noise(13221544, 14537921, 8),+ stripes(12102804, 14998731, 48, 0, 0.25),+ stripes(12102804, 14998731, 48, 90, 0.25),+ noise(11050116, 15788506, 64, 0.15)+ ];+ height = [+ noise(6316128, 10066329, 8),+ stripes(4210752, 12632256, 48, 0, 0.35),+ stripes(4210752, 12632256, 48, 90, 0.35)+ ];+ roughnessLow = 200;+ roughnessHigh = 235;+ strength = 1;+ } else if (presetId === "jute" || presetId === "wicker") {+ const jute = presetId === "jute";+ const count = jute ? 16 : 24;+ color = jute ? [+ noise(10255951, 12558184, 8),+ stripes(8217144, 13150323, count, 0, 0.4),+ stripes(8217144, 13150323, count, 90, 0.4)+ ] : [+ stripes(11109456, 14202492, count, 0),+ stripes(9333308, 13609324, count, 90, 0.5),+ noise(7295792, 12819810, 16, 0.2)+ ];+ height = [+ stripes(4210752, 12632256, count, 0),+ stripes(4210752, 12632256, count, 90, 0.5),+ noise(6316128, 10526880, 16, jute ? 0.35 : 0.15)+ ];+ roughnessLow = jute ? 225 : 170;+ roughnessHigh = jute ? 250 : 215;+ strength = 2.5;+ } else if (presetId === "basalt") {+ color = [noise(3026737, 4868941, 8), noise(1908256, 6053216, 32, 0.3)];+ height = [noise(6316128, 10526880, 8), noise(4210752, 12632256, 32, 0.4)];+ roughnessLow = 160;+ roughnessHigh = 220;+ strength = 2.5;+ } else if (presetId === "terracotta") {+ color = [noise(10902074, 12743501, 8), noise(9062960, 14260851, 32, 0.2)];+ height = [noise(5263440, 11579568, 8), noise(4210752, 12632256, 32, 0.35)];+ roughnessLow = 190;+ roughnessHigh = 235;+ strength = 2;+ } else if (presetId === "brushed-brass") {+ color = [noise(11570508, 13215842, 4), stripes(10518338, 13939822, 64, 0, 0.12)];+ height = [noise(7368816, 9474192, 8), stripes(6710886, 10066329, 64, 0, 0.3)];+ roughnessLow = 70;+ roughnessHigh = 120;+ strength = 1;} else {color = [noise(5061676, 8942420, 4), noise(3418656, 10850155, 32, 0.25)];height = [noise(5592405, 11184810, 8), noise(2236962, 14540253, 32, 0.3)];diff --git a/docs/material-library.md b/docs/material-library.mdindex e78e7459..04271666 100644--- a/docs/material-library.md+++ b/docs/material-library.md@@ -23,6 +23,14 @@ synthetic starting points with stated physical repeat scales, not measured scans| `palm-frond` | `foliage` | 2 × 2 m | Alpha-tested (MASK), double-sided cutout card, not tileable || `driftwood` | `wood` | 1 × 1 m | Bleached silver-grey grain, deep weathering || `thatch` | `fiber` | 1 × 1 m | Vertical straw strands in horizontal courses |+| `lime-plaster` | `architecture` | 2 × 2 m | Off-white render with trowel clouding |+| `oak` | `wood` | 1 × 1 m | Honey oak, tight straight grain; no knots |+| `linen` | `fabric` | 0.5 × 0.5 m | Fine flax weave with slubs, matte |+| `jute` | `fiber` | 0.5 × 0.5 m | Coarse open basket weave |+| `basalt` | `rock` | 2 × 2 m | Dark fine-grained volcanic stone |+| `terracotta` | `architecture` | 1 × 1 m | Unglazed fired clay with warm mottling |+| `wicker` | `fiber` | 0.5 × 0.5 m | Rattan strands over and under |+| `brushed-brass` | `metal` | 1 × 1 m | Warm brass, directional brushing, fully metallic |`palm-frond` saves a `schemaVersion:2` record: its base color is a V3 RGBA silhouette withclamped sampling, so map it once across a card or a `foliageCardGeo` with the frond base atdiff --git a/src/material-presets.test.ts b/src/material-presets.test.tsindex e81b856b..6870687b 100644--- a/src/material-presets.test.ts+++ b/src/material-presets.test.ts@@ -82,9 +82,20 @@ const NATURAL = [['driftwood', 'wood'],['thatch', 'fiber'],] as const;+// The second set (#221): interior and craft surfaces from the Cove pass.+const SECOND = [+ ['lime-plaster', 'architecture'],+ ['oak', 'wood'],+ ['linen', 'fabric'],+ ['jute', 'fiber'],+ ['basalt', 'rock'],+ ['terracotta', 'architecture'],+ ['wicker', 'fiber'],+ ['brushed-brass', 'metal'],+] as const;-test('natural presets follow the three-map preset contract and are deterministic per seed', async () => {- for (const [id, family] of NATURAL) {+test('natural and second-set presets follow the three-map contract and are deterministic per seed', async () => {+ for (const [id, family] of [...NATURAL, ...SECOND]) {const summary = listMaterialPresets().find((item) => item.id === id);expect(summary).toMatchObject({ family, tags: [family, 'procedural'] });const record = await presetRecord(id);@@ -136,6 +147,21 @@ test('wet limestone darkens and smooths the dry stone while keeping its relief',expect(wet.files['normal.png']).toEqual(dry.files['normal.png']);});+test('brushed brass is a warm, fully metallic surface', async () => {+ const record = await presetRecord('brushed-brass');+ const raw = async (name: string) => sharp(record.files[name]).raw().toBuffer();+ const color = await raw('baseColor.png');+ let red = 0,+ blue = 0;+ for (let i = 0; i < color.length; i += 4) {+ red += color[i]!;+ blue += color[i + 2]!;+ }+ expect(red).toBeGreaterThan(1.5 * blue);+ const packed = await raw('metallicRoughness.png');+ for (let i = 2; i < packed.length; i += 4) expect(packed[i]).toBe(255);+});+test('the docs preset table matches the shipped catalog', () => {const docs = readFileSync(new URL('../docs/material-library.md', import.meta.url), 'utf8');const rows = [diff --git a/src/material-presets.ts b/src/material-presets.tsindex 7fff5603..30fc7c18 100644--- a/src/material-presets.ts+++ b/src/material-presets.ts@@ -92,6 +92,62 @@ const catalog = [physicalSizeMeters: { width: 1, height: 1 },description: 'Vertical straw strands in horizontal courses for roofs and shelters.',},+ {+ id: 'lime-plaster',+ name: 'Lime plaster',+ family: 'architecture',+ physicalSizeMeters: { width: 2, height: 2 },+ description: 'Soft off-white lime render with trowel clouding and fine sand relief.',+ },+ {+ id: 'oak',+ name: 'Honey oak',+ family: 'wood',+ physicalSizeMeters: { width: 1, height: 1 },+ description: 'Tight straight grain with open pores for furniture and floors; no knots or rays.',+ },+ {+ id: 'linen',+ name: 'Natural linen',+ family: 'fabric',+ physicalSizeMeters: { width: 0.5, height: 0.5 },+ description: 'Fine flax weave with occasional slubs; matte dielectric, no drape or sheen.',+ },+ {+ id: 'jute',+ name: 'Coarse jute weave',+ family: 'fiber',+ physicalSizeMeters: { width: 0.5, height: 0.5 },+ description: 'Open basket weave of twisted fibre for rugs, sacking and wrapped handles.',+ },+ {+ id: 'basalt',+ name: 'Dark basalt',+ family: 'rock',+ physicalSizeMeters: { width: 2, height: 2 },+ description: 'Fine-grained volcanic stone with subtle vesicles and a dry finish.',+ },+ {+ id: 'terracotta',+ name: 'Unglazed terracotta',+ family: 'architecture',+ physicalSizeMeters: { width: 1, height: 1 },+ description: 'Warm fired clay with soft mottling for pots, tiles and planters; no glaze.',+ },+ {+ id: 'wicker',+ name: 'Woven wicker',+ family: 'fiber',+ physicalSizeMeters: { width: 0.5, height: 0.5 },+ description: 'Rattan strands passing over and under for chairs, baskets and screens.',+ },+ {+ id: 'brushed-brass',+ name: 'Brushed brass',+ family: 'metal',+ physicalSizeMeters: { width: 1, height: 1 },+ description: 'Warm yellow brass with fine directional brushing and a fully metallic channel.',+ },] as const;/** Presets whose output needs a schemaVersion 2 record (here, a V3 RGBA cutout). */const RECORD_V2_PRESETS: ReadonlySet<string> = new Set(['palm-frond']);@@ -252,6 +308,78 @@ export function createMaterialPresetDraftAny(roughnessLow = 220;roughnessHigh = 250;strength = 2.5;+ } else if (presetId === 'lime-plaster') {+ color = [noise(0xd9d2c3, 0xeee9dd, 4), noise(0xb8ae9b, 0xf4f0e6, 32, 0.25)];+ height = [noise(0x707070, 0x909090, 4), noise(0x505050, 0xb0b0b0, 32, 0.3)];+ roughnessLow = 205;+ roughnessHigh = 240;+ strength = 1.5;+ } else if (presetId === 'oak') {+ color = [+ noise(0x8a6236, 0xb88d57, 4),+ stripes(0x7a5530, 0xc09460, 56, 0, 0.35),+ noise(0x5e4126, 0xa77d4a, 32, 0.15),+ ];+ height = [noise(0x666666, 0x999999, 4), stripes(0x5a5a5a, 0xa8a8a8, 56, 0, 0.35)];+ roughnessLow = 140;+ roughnessHigh = 200;+ strength = 1.8;+ } else if (presetId === 'linen') {+ color = [+ noise(0xc9bea8, 0xddd4c1, 8),+ stripes(0xb8ac94, 0xe4dccb, 48, 0, 0.25),+ stripes(0xb8ac94, 0xe4dccb, 48, 90, 0.25),+ noise(0xa89c84, 0xf0e9da, 64, 0.15),+ ];+ height = [+ noise(0x606060, 0x999999, 8),+ stripes(0x404040, 0xc0c0c0, 48, 0, 0.35),+ stripes(0x404040, 0xc0c0c0, 48, 90, 0.35),+ ];+ roughnessLow = 200;+ roughnessHigh = 235;+ strength = 1;+ } else if (presetId === 'jute' || presetId === 'wicker') {+ // Basket weaves: few thick strands crossing, jute rough and fibrous, wicker smoother.+ const jute = presetId === 'jute';+ const count = jute ? 16 : 24;+ color = jute+ ? [+ noise(0x9c7e4f, 0xbf9f68, 8),+ stripes(0x7d6238, 0xc8a873, count, 0, 0.4),+ stripes(0x7d6238, 0xc8a873, count, 90, 0.4),+ ]+ : [+ stripes(0xa98450, 0xd8b67c, count, 0),+ stripes(0x8e6a3c, 0xcfa96c, count, 90, 0.5),+ noise(0x6f5330, 0xc39d62, 16, 0.2),+ ];+ height = [+ stripes(0x404040, 0xc0c0c0, count, 0),+ stripes(0x404040, 0xc0c0c0, count, 90, 0.5),+ noise(0x606060, 0xa0a0a0, 16, jute ? 0.35 : 0.15),+ ];+ roughnessLow = jute ? 225 : 170;+ roughnessHigh = jute ? 250 : 215;+ strength = 2.5;+ } else if (presetId === 'basalt') {+ color = [noise(0x2e2f31, 0x4a4b4d, 8), noise(0x1d1e20, 0x5c5d60, 32, 0.3)];+ height = [noise(0x606060, 0xa0a0a0, 8), noise(0x404040, 0xc0c0c0, 32, 0.4)];+ roughnessLow = 160;+ roughnessHigh = 220;+ strength = 2.5;+ } else if (presetId === 'terracotta') {+ color = [noise(0xa65a3a, 0xc2734d, 8), noise(0x8a4a30, 0xd99a73, 32, 0.2)];+ height = [noise(0x505050, 0xb0b0b0, 8), noise(0x404040, 0xc0c0c0, 32, 0.35)];+ roughnessLow = 190;+ roughnessHigh = 235;+ strength = 2;+ } else if (presetId === 'brushed-brass') {+ color = [noise(0xb08d4c, 0xc9a862, 4), stripes(0xa07f42, 0xd4b46e, 64, 0, 0.12)];+ height = [noise(0x707070, 0x909090, 8), stripes(0x666666, 0x999999, 64, 0, 0.3)];+ roughnessLow = 70;+ roughnessHigh = 120;+ strength = 1;} else {color = [noise(0x4d3c2c, 0x887354, 4), noise(0x342a20, 0xa58f6b, 32, 0.25)];height = [noise(0x555555, 0xaaaaaa, 8), noise(0x222222, 0xdddddd, 32, 0.3)];diff --git a/src/tools/materials.test.ts b/src/tools/materials.test.tsindex 95519419..53467057 100644--- a/src/tools/materials.test.ts+++ b/src/tools/materials.test.ts@@ -141,7 +141,7 @@ test('material tools discover and instantiate shipped presets without external pconst catalog = (await tool.run({ action: 'presets', tag: 'wood' })) as {presets: { id: string }[];};- expect(catalog.presets.map((preset) => preset.id)).toEqual(['wood-grain', 'driftwood']);+ expect(catalog.presets.map((preset) => preset.id)).toEqual(['wood-grain', 'driftwood', 'oak']);const input = {action: 'create-preset',presetId: catalog.presets[0]!.id,