Commit Graph

116 Commits

Author SHA1 Message Date
bflatastic 19c761f62c Merge remote-tracking branch 'origin/main' into sets/normal-map-format 2026-11-02 14:54:01 +07:00
bflatastic 9faf90c702 Normal map format: fill images keep reading as OpenGL
Flipping every fill image on a normal channel in a DirectX project
would also flip the OpenGL maps MaterialX import puts there, and change
how existing DirectX projects look. Fill images read as before; the
setting covers mesh map images (converted when set, so the tooltip
says to set them again) and the export default.
2026-11-02 14:54:01 +07:00
BFlat 19da5379d7 Merge pull request #131 from storytold/feat/cross-app-materials
MaterialCraft materials: .mcmat fills with live graph inputs
2026-11-02 14:36:20 +07:00
bflatastic 62229b41d4 Merge remote-tracking branch 'origin/main' into sets/normal-map-format 2026-11-02 14:30:54 +07:00
BFlat cad425c249 Merge pull request #139 from storytold/settings/data-folder
Settings: a data folder on any drive
2026-11-02 14:30:40 +07:00
bflatastic dd750cb3f6 Normal map format: in Texture Set Settings, and fill images follow it
The project's normal map format (OpenGL or DirectX) could only be set
by command or a template, and fill images on a normal channel were
always read as OpenGL, so a DirectX map's detail came out inverted.
Texture Set Settings now has a Normal map format row, and a fill's
image on a normal channel is read in that format, as mesh map images
already were. A change of format recomposites the sets.
2026-11-02 14:29:38 +07:00
bflatastic d619b53712 Merge origin/main into feat/cross-app-materials
Keeps both import menu items and formats modules (MaterialX import, MaterialCraft materials); menu parity regenerated (55 of 55).
2026-11-02 14:22:37 +07:00
bflatastic ec30388787 Settings: a data folder on any drive
Autosaves, smart materials, brush and export presets, project templates
and UI layouts always went to Documents/TextureCraft, which fills the
system drive. Settings > Folders > Data folder points them anywhere;
the choice applies on restart, and an export folder still at its
default follows it.

Refs #105.
2026-11-02 14:06:51 +07:00
bflatastic 2bf551f2a2 Merge origin/main into feat/cross-app-materials
Keeps both sides of the translation tables, AGENTS rules and the formats module list;
material files in the browser load before the ask-to-save step (they add a layer, not a
new project); Arabic for the eight MaterialCraft strings; menu parity regenerated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 13:45:27 +07:00
bflatastic 6d71d2fc38 Fill channels take an image from their source menu
A fill channel's source menu offered a uniform value, procedurals and
anchors, but no image, so a normal or roughness map could not be put on
its channel. The menu now lists the image resources and Import..., and
an image dropped from the Assets panel onto a channel becomes its
source. The mesh map slots share the same menu and drop target.

Fixes #127.
2026-11-02 13:43:40 +07:00
BFlat d0450eb1ca Merge pull request #75 from SteamSmith/feat/materialx-import
feat(import): MaterialX (.mtlx) material import as a fill layer
2026-11-02 12:44:50 +07:00
bflatastic 88c92dbf71 Merge remote-tracking branch 'origin/main' into HEAD 2026-11-02 12:23:33 +07:00
bflatastic 8c94d053b4 Merge remote-tracking branch 'origin/main' into effects/copy-paste 2026-11-02 12:20:06 +07:00
BFlat e9409b696b Merge pull request #126 from storytold/history/jump-to-step
History: click a step to return to it
2026-11-02 12:19:57 +07:00
bflatastic fbceb95242 Effects: Delete and Ctrl+D act on a selected effect
With an effect selected, Delete removed its whole layer and Ctrl+D
duplicated the layer. Both now act on the effect, like the clipboard
shortcuts; effect commands default to the selected effect.
2026-11-02 12:19:21 +07:00
BFlat 73043fd4b3 Merge pull request #125 from storytold/brush/ctrl-drag
Brush: Ctrl+drag sets size, hardness, flow and angle
2026-11-02 12:14:05 +07:00
bflatastic 4ca9f424f4 Effects: copy, cut and paste between layers
An effect's context menu copies, cuts and pastes it, and Ctrl+C,
Ctrl+X and Ctrl+V act on a selected effect (pasting a copied one above
the selected effect, or on top of the selected content or mask).
Painted strokes come along, resampled to the target set; generators
and other one-stack effects go to their stack, and a fill reading an
anchor point needs one below its new layer. effect.copy, effect.cut
and effect.paste share the layer clipboard.
2026-11-02 12:13:39 +07:00
bflatastic c092e7766b MaterialCraft materials: .mcmat fills with live graph inputs
- core: Fill::link (MaterialLink: package resource, graph, exposed inputs, presets,
  image inputs, size); BakedMap::interop_id / for_input shared mesh-map identifiers
- formats: own .mcmat reader (no MaterialCraft dependency) and 16-bit mesh-map PNGs
- engine: material.load takes .mcmat and .mcraft; material.link.set / .preset / .cook /
  .saveSource; LinkJob re-cooks through materialcraft-cli at the texture set's
  resolution with baked mesh maps as graph inputs; fresh resource names per cook keep
  undo and the decoded-image cache consistent; packages count as used resources
- ui: linked-material section in fill properties (presets, sliders, colors, toggles,
  options) cooking on a worker thread, one process per layer, stale results redone;
  Open in MaterialCraft; File > Import material...; .mcmat drops; library shelf lists
  .mcmat and rescans on focus; 8 new strings in every language
- tests: materialcraft_link (import, params, undo, duplicates, mesh maps, save, and a
  real materialcraft-cli round trip when MATERIALCRAFT_CLI is set)
- docs: README, features, control protocol, architecture, AGENTS, ROADMAP, parity

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 12:12:00 +07:00
bflatastic f8f241e804 Merge remote-tracking branch 'origin/main' into history/jump-to-step 2026-11-02 12:00:46 +07:00
BFlat 18b1969712 Merge pull request #122 from storytold/effects/reorder-duplicate
Effects: drag to reorder, duplicate
2026-11-02 12:00:32 +07:00
bflatastic b133186641 History: click a step to return to it
The History panel lists every undone step too (dimmed, next first) and
a click on any step goes back or forward to it, the current one
highlighted. edit.undo and edit.redo take {steps?} for the same jump.
2026-11-02 12:00:09 +07:00
bflatastic 296f439f53 Merge main into feat/materialx-import
# Conflicts:
#	crates/engine/src/lib.rs
2026-11-02 11:58:56 +07:00
bflatastic 410cf3a14f Brush: Ctrl+drag sets size, hardness, flow and angle
Ctrl (Cmd on macOS) + right-drag in the 3D or 2D view changes the
brush size (left/right) and hardness (up/down), Ctrl + left-drag its
flow and angle, instead of orbiting or painting. The brush cursor stays
where the drag began, with the values beside it, and the Brush
properties name the gesture.
2026-11-02 11:48:32 +07:00
bflatastic f6bd07e4d6 Mesh maps: use an image instead of a bake
Each mesh map slot of the Texture Set Settings takes an image resource:
drop one from the Assets panel on the slot, or pick it from the slot's
menu, which also clears the slot. The image is resampled to the size of
the set's other mesh maps (or its bake size), its values read as data,
a normal map in the project's normal format.
textureSet.meshMap.set {ts?, map, image} and
textureSet.meshMap.clear {ts?, map} give agents the same.
2026-11-02 11:32:20 +07:00
bflatastic 74a036540e Merge remote-tracking branch 'origin/main' into pr75
# Conflicts:
#	ROADMAP.md
2026-11-02 11:26:21 +07:00
bflatastic 0d2f1873cd Effects: drag to reorder, duplicate
Effect rows in the layer stack can be dragged within their stack (a
drop lands above the row, or below it from its lower half), and their
context menu duplicates an effect just above itself, painted pixels
included. effect.move {effect, index} and effect.duplicate {effect}
give agents the same.
2026-11-02 11:13:00 +07:00
BFlat b906f41f2e Merge pull request #118 from storytold/filters/histogram-scan-range-shift
Filters: histogram scan, range and shift
2026-11-02 10:38:29 +07:00
BFlat 78e6d7b334 Merge pull request #119 from storytold/materials/ground-and-metals
Materials: platinum, zinc, cobalt, bark, sand, mud, ice, snow and bone
2026-11-02 10:34:38 +07:00
bflatastic 39a2dd9d27 Merge main into filters/histogram-scan-range-shift 2026-11-02 10:27:48 +07:00
BFlat cb1501318f Merge pull request #114 from storytold/levels/histogram
Levels: a histogram of what the effect reads
2026-11-02 10:19:27 +07:00
bflatastic a4cebb790d Merge main into filters/histogram-scan-range-shift 2026-11-02 10:10:15 +07:00
bflatastic 4913131cf7 Materials: platinum, zinc, cobalt, bark, sand, mud, ice, snow and bone
Nine procedural materials for the shelf: three metals from measured
reflectance (zinc with crystalline spangles), bark with deep furrows,
fine-grained sand, mud with glossy wet patches, ice with cloudy air
pockets under transmission, and snow and bone with a little subsurface
scattering.
2026-11-02 10:09:29 +07:00
bflatastic a185e5f951 Filters: histogram scan, range and shift
Three adjustment filters for masks and content: Histogram Scan slides a
ramp through the values (contrast narrows it to a step), Histogram Range
squeezes them towards a position, and Histogram Shift offsets them with
wrap-around. Names and parameters are translated into all nine other UI
languages.
2026-11-02 09:52:09 +07:00
bflatastic 5f890e584e Web: ask to save before replacing the project or closing the tab
The browser build threw unsaved changes away on New project, Open,
Close, Open sample project or a dropped file, and when the tab closed.
They now wait on the desktop's Save / Don't save / Cancel dialog (Save
downloads the project), and closing or reloading the tab with unsaved
changes makes the browser ask first.
2026-11-02 09:32:25 +07:00
bflatastic d736ffa9af Levels: a histogram of what the effect reads
The Levels effect's properties now show a histogram of its input, the
mask below it or (on layer content) a channel picked above it, with the
input range marked. effect.histogram {effect, channel?, bins?} gives
agents the same counts. Large sets are sampled (at most 256 tiles), so
the cost stays flat up to 8K.
2026-11-02 09:23:59 +07:00
bflatastic 9e65464654 Merge main into docs/roadmap-2026-11-02c 2026-11-02 08:42:02 +07:00
bflatastic 4f8a2f0828 Docs: roadmap after the issue fixes 2026-11-02 08:28:30 +07:00
bflatastic be1e095157 Merge main into fix/ask-to-save-before-replacing
# Conflicts:
#	crates/ui-egui/src/i18n/ar.rs
#	crates/ui-egui/src/i18n/de.rs
#	crates/ui-egui/src/i18n/es.rs
#	crates/ui-egui/src/i18n/fr.rs
#	crates/ui-egui/src/i18n/it.rs
#	crates/ui-egui/src/i18n/ja.rs
#	crates/ui-egui/src/i18n/ko.rs
#	crates/ui-egui/src/i18n/pt_br.rs
#	crates/ui-egui/src/i18n/zh_hans.rs
2026-11-02 08:26:03 +07:00
bflatastic f48d5b6ba4 Ask to save before opening, starting or closing another project
New project, Open, a recent project, a dropped file, Open sample
project and Close replaced a project with unsaved changes without a
word. They now wait on the same Save / Don't save / Cancel dialog as
quitting, and go ahead once the changes are saved or let go.
2026-11-02 08:24:29 +07:00
bflatastic ad8c650c09 Merge main into fix/fabric-materials
# Conflicts:
#	crates/ui-egui/src/i18n/ar.rs
#	crates/ui-egui/src/i18n/de.rs
#	crates/ui-egui/src/i18n/es.rs
#	crates/ui-egui/src/i18n/fr.rs
#	crates/ui-egui/src/i18n/it.rs
#	crates/ui-egui/src/i18n/ja.rs
#	crates/ui-egui/src/i18n/ko.rs
#	crates/ui-egui/src/i18n/pt_br.rs
#	crates/ui-egui/src/i18n/zh_hans.rs
2026-11-02 08:01:39 +07:00
bflatastic 3fea0f6c62 Materials: twill for denim and carbon fiber, a pile for velvet
Carbon Fiber, Fabric Cotton, Denim and Velvet were all the same plain
weave in different colours. A new Twill weave pattern (2/2: diagonal
ribs, the weft darker than the warp) now gives Denim its diagonal and
Carbon Fiber its light and dark tows under a clear coat; Velvet is a
soft pile with no weave under its sheen; Fabric Cotton keeps the plain
weave. Twill weave is also a fill pattern, translated into all nine
other UI languages.

Fixes #97.
2026-11-02 07:53:46 +07:00
bflatastic 85c749bb1b Ask to save unsaved changes when the app closes
Closing the window (or File > Quit) with unsaved changes now keeps the
app open and asks: Save, Don't save or Cancel. A cancelled or failed
save keeps the app and the dialog open. Strings translated into all
nine other UI languages.

Fixes #100.
2026-11-02 07:41:01 +07:00
bflatastic 2d8c34c055 Features: the texture set visibility controls 2026-11-02 07:07:45 +07:00
bflatastic 7e78a2cba6 Material channels: Alt+click keeps one channel
Alt+click on a channel of a fill's or the brush's Material section turns
that channel on and every other one off (one undo step for a fill).
tool.material and layer.fill.set take solo: true for the same.

Fixes #74.
2026-11-02 06:37:04 +07:00
BFlat f6b66a2580 Merge pull request #87 from storytold/cli/sample-bake-size-note
CLI: say that new --sample bakes its mesh maps at up to 1024 px
2026-11-02 06:31:08 +07:00
BFlat 3e49542962 Merge pull request #84 from storytold/cli/automation-root-flags
CLI: --automation-read-root / --automation-write-root for mcp and serve
2026-11-02 06:18:14 +07:00
SteamSmith 4917eda4a8 feat(ui): File > Import MaterialX material... with a file picker
The menu item opens a .mtlx picker and runs file.importMaterialX; the new layer's name is
toasted, the reader's warnings go to the Log, and the Layers panel is focused. The menu label
and the picker's filter name are translated in all ten languages; menu parity is 54 of 54.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-01 17:56:46 -05:00
bflatastic f47638d782 CLI: say that new --sample bakes its mesh maps at up to 1024 px
The baked maps are most of a sample project's size, so a 2048 sample is
as large as a 1024 one; the usage and the control protocol now say so.

Fixes #66.
2026-11-02 05:42:55 +07:00
bflatastic c4353cc8d0 CLI: --automation-read-root / --automation-write-root for mcp and serve
The spelling the other crafting apps use; the same as --read-root /
--write-root.

Fixes #57.
2026-11-02 05:41:00 +07:00
bflatastic e173810891 Docs: command_run also allows file.removeUnused
Fixes #73.
2026-11-02 05:31:07 +07:00