Commit Graph
38 Commits
Author SHA1 Message Date
chasse20 709cd7f86e Fix function instance inputs and cache refresh 2026-11-10 05:15:39 -05:00
chasse20 131c7b8853 Fix parameter defaults, sizing and tooltips 2026-11-10 04:54:21 -05:00
chasse20 85e0bf9247 Add parameter-owned function graphs 2026-11-10 04:07:54 -05:00
chasse20 bc2f20b365 Fix library review, graph annotations and processor sampling 2026-11-09 23:59:27 -05:00
chasse20 a0032d6ac2 Add SBS function library and Explorer graph editing 2026-11-08 17:25:08 -05:00
chasse20 570bc528a6 Add linked graph instances 2026-11-07 18:23:51 -05:00
0ce7a6aafb Hash bound input-image resources into graph instance cache keys (#110)
* Hash bound input-image resources into graph instance cache keys

A graph instance can show a stale preview image after its bound bitmap resource is replaced, because the instance cache key never changes. Hashing those resources makes the instance re-cook when the bitmap changes.

Include the content hashes of resources referenced by graph.input_images (and their linear flags) in graph_tree_hash, and add a regression test that cooks an instance, replaces the bound resource bytes, and asserts the new image is cooked instead of the cached one.

Test: bound_input_image_resource_change_recooks_instance failed before the change and passes after.

* Address review for pull request 110

---------

Co-authored-by: eliets2 <287273517+eliets2@users.noreply.github.com>
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 10:10:21 +01:00
chasse20 74ff4a9dc3 Fix debug UI tests and remove redundant coverage 2026-11-06 01:22:07 -05:00
chasse20 2adbdf4aab Merge main while preserving native graph architecture 2026-11-06 00:58:56 -05:00
chasse20 fe88ee5c4d Unify graph editors and optimize material workflows 2026-11-06 00:13:10 -05:00
chasse20 d318484b41 Checkpoint native SBS primitive workflow
Replace the legacy Rust procedural library with clean-room native primitives, typed function execution and FX-Map graphs. Save supported content as native SBS and organize the model, evaluators, codecs and editors into focused modules.

Add shared graph editing behavior, flat filtered node menus, frame and comment editing, named Explorer outputs and an original atomic sample. Document the tested scope and remaining interoperability work.
2026-11-05 18:23:06 -05:00
FredApps 96af836440 Memoize immutable input fingerprints safely 2026-11-05 22:35:45 +01:00
FredApps 9c08a25bb6 Fix preview sizing and input image cache keys 2026-11-05 22:07:18 +01:00
FredApps 56407b9470 Revert the batch rollback and restore prior main 2026-11-05 22:04:58 +01:00
Rafael Mendes a7b9194820 Revert reviewed PR batch and cancel 0.1.3 preparation
Restore tracked files to 91bb53f07a, immediately before the batch, at the maintainer request. Preserve the existing history and earlier work, including PR #38. Revert the 50 reviewed PR merges and the version bump in 441092c. The published 0.1.2 release is unchanged.
2026-11-05 17:48:14 -03:00
Rafael Mendes cc9a5b3c82 Keep bitmap color-space requests unambiguous and inspectable 2026-11-05 15:19:39 -03:00
Rafael Mendes 8e14183b8f Apply hard safety bounds during parameter resolution without restricting manual editing 2026-11-05 15:00:27 -03:00
Rafael Mendes 505bd037f1 Preserve bounded graph cache traversal and add nested instance regression 2026-11-05 14:38:07 -03:00
SteamSmithandClaude Sonnet 5.5 47b69c0f3a chore(merge): bring fix/bitmap-colour-space up to date with main
Upstream's ResourceBytes and decode limits kept; decode keeps the linear flag, and the
decoded-image memo is now keyed by (content hash, linear) so sRGB and data reads of the
same file don't collide.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-05 12:10:10 -05:00
Rafael Mendes 4897dab15d Merge branch 'review/pr-43' into review/pr-44 2026-11-05 11:16:47 -03:00
Simon Hull 2f0533cf28 Eval: give the clamping test a locked cache 2026-11-05 08:07:53 -06:00
Rafael Mendes a026ddaaf9 Integrate cache keys with SBS and bound graph traversal 2026-11-05 11:02:15 -03:00
Simon Hull e39a227ca1 Merge commit 'e153b8b' into advisor/005-cook-only-what-changed 2026-11-05 07:52:55 -06:00
Simon Hull e153b8b603 Merge remote-tracking branch 'origin/main' into advisor/004-correct-cache-keys 2026-11-05 07:52:44 -06:00
Rafael Mendes 82373ba8f7 Merge pull request #40 from simonhull/fix/enforce-param-ranges
Nodes: clamp parameters to hard limits before cooking
2026-11-05 10:35:51 -03:00
SteamSmithandClaude Sonnet 5.5 84bd8f8b9d fix(nodes): clamp numeric parameters to their declared ranges
resolve_params only checked types, so a hand-edited file, a binding to an
exposed input or a dynamic function could pass any float or int to a cook
(including NaN and 1e30). Clamp Float, Int and Float2 parameters to the
declared min/max in resolve_params (new clamp_params; non-finite values fall
back to the default; angles are left alone) and again in eval after bindings
and functions have run.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-05 07:13:59 -05:00
SteamSmithandClaude Sonnet 5.5 ee903c96ad fix(formats): choose sRGB or linear when reading bitmaps
decode() sRGB-decoded every 8/16-bit color bitmap, so an RGB normal map
(0.5, 0.5, 1) became (0.214, 0.214, 1). decode now takes a linear flag. The
Bitmap node gets a Color space choice (sRGB by default, so existing files cook
the same) and graph input preview images can be bound as linear data maps
(graph.input.bind linear: true, stored in input_images_linear).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-05 06:58:19 -05:00
SteamSmithandClaude Sonnet 5.5 7b87236f26 fix(eval): hash nested instanced graphs and whole resource bytes into the cache key
Editing a graph two levels below an instance node left the instance's cached result stale, and
bitmaps of equal length with equal headers shared a cache key.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-05 06:39:23 -05:00
PiJellyPin 6310230ecd Load sbs files
save, load etc.. for sbs files
2026-11-04 07:03:54 +01:00
Simon Hull 76684bc3a8 Cook: format and lint fixes 2026-11-03 14:38:35 -06:00
Simon Hull 2758d1d389 Cook: cancel stale background cooks and lock the cache only around lookups
The cooker sets the running cook's cancel flag when the graph changes again and starts the
new cook at once; eval::cook takes &Mutex<Cache> and locks per lookup/insert.
2026-11-03 14:37:56 -06:00
Simon Hull b991f4fb11 Eval: key nodes only on the graph inputs they read
An exposed-input change re-cooked 21 of 21 nodes in rusty_metal; now 1 (the reader).
Input-change cook (noisy, concurrent load): 1024 ~320 ms -> ~0.1 ms, 2048 ~1500 ms -> ~0.2 ms.
2026-11-03 14:30:34 -06:00
Simon Hull eef9f5397f Nodes: clamp parameters to hard limits before cooking 2026-11-03 14:23:07 -06:00
Simon Hull c4d7443218 Eval: key resources on content and graph instances on their whole sub-graph tree
Resources carry a content hash (ResourceBytes); the decoder memo is keyed on it and pruned.
Graphs that use themselves, directly or through other instanced graphs, give an explicit error.
2026-11-03 14:19:15 -06:00
bflatasticandClaude Opus 5.5 4b84f43132 eval: key input images by content, not address
A freed image's memory comes back for the next one, so two different input images
could share a cache key (the Linux CI run hit a stale cook). The key is now the size
plus 4096 strided values.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 13:03:36 +07:00
bflatasticandClaude Opus 5.5 53ab0f2d6a Cross-app materials: .mcmat portable materials for TextureCraft
- formats: .mcmat (zip: material.json manifest, maps/<usage>.png, source.mcraft) with
  read/write and caps; color usages 8-bit sRGB, data maps 16-bit linear
- engine: file.exportMaterial {path, size?, values?, inputs?}, file.sendToTextureCraft
  (TextureCraft's library folder), graph.input.bind/unbind; file.open reads .mcmat
- core/eval: Graph::input_images preview images for input nodes (mesh maps from
  TextureCraft); caller images win; grayscale inputs convert to gray
- ui: File > Export material..., File > Send to TextureCraft, Open accepts .mcmat,
  input previews in the graph properties
- docs: control protocol (portable materials), file formats, gaps, parity ≈ 67%,
  roadmap, architecture, AGENTS convention for shared formats

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 12:06:09 +07:00
bflatasticandClaude Opus 5.5 80f4977023 Dynamic parameters, graph presets and one shared input editor
Parameters can be driven by function graphs evaluated against graph inputs
(graph.node.function); graphs store input presets (graph.preset.*). Graph
inputs and graph-instance parameters share one editor for floats, ints,
bools, enums and colors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 04:51:01 +07:00
bflatasticandClaude Opus 5.5 6e952a9a10 Node engine: document model, image buffers, 120 nodes, cached graph cooking, packages, session and commands
A clean-room, pure-Rust foundation for MaterialCraft's node-based material
authoring: the package/graph/node model, float image planes, the node
library (atomic nodes, tileable noises, patterns, filters, PBR utilities,
function graphs for the pixel processor), a content-addressed cooking cache,
.mcraft packages and texture export, and the command-driven session with
snapshot undo. Infrastructure (xtask, CI, packaging) copied from TextureCraft.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 02:58:46 +07:00