Commit Graph
89 Commits
Author SHA1 Message Date
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
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
bflatastic e03a9d6c71 Merge remote-tracking branch 'origin/main' into assets/brush-presets
# Conflicts:
#	ROADMAP.md
#	crates/engine/tests/session.rs
#	crates/paint/src/lib.rs
#	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 04:48:21 +07:00
bflatastic f4baf8140a Merge remote-tracking branch 'origin/main' into ui/start-window
# 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 04:29:43 +07:00
bflatastic 1d885c8df1 Brushes: 18 brush presets in the shelf, and your own
The Assets shelf has a Brushes tab: presets grouped as Basic (hard, soft,
airbrush, square, dots), Wear and grunge (dry brush, chalk, spray, grunge,
splatter, scratches, chips, cracks, drips) and Details (stars, stitches,
rivets, fur), each with a preview of its stroke. A click sets the stroke (alpha,
spacing, flow, hardness, angle, path following, jitters, particles) and keeps
the brush's size, alignment, culling, symmetry and lazy mouse. My brushes saves
the current brush as a .tcbrush file in the brushes folder and lists them.

Commands: brush.preset.list, brush.preset.apply {preset}, brush.preset.save
{path} and brush.preset.load {path} (an image alpha from another project is
dropped). Labels translated into the other nine UI languages.
2026-11-02 04:28:17 +07:00
bflatastic 96b179ccfc Start window: new, open or a recent project at launch
The app opens on the sample project, which left no obvious place to pick a
project. A start window now offers New project, Open, the recent projects and
Continue with the sample project, with Show at startup (also Settings >
Interface > Start window). It opens at launch in the desktop and web apps, but
not when a file is given on the command line or the app runs with --control.

Labels translated into the other nine UI languages; a UI test covers New
project, Continue and the startup setting.
2026-11-02 04:15:55 +07:00
bflatastic 0c9627573e Merge remote-tracking branch 'origin/main' into tools/text-alpha 2026-11-02 04:07:38 +07:00
bflatastic 7fdd9be0a3 Text: draw text in any installed font as a brush alpha or a decal
resource.text draws one or more lines of text, shaped with harfrust (kerning,
ligatures, joined scripts) from the font's outlines (skrifa) and filled by a
non-zero scanline rasterizer, cropped to the ink, as an image resource: white
for the brush alpha, or a color for a decal. text.fonts lists the installed
families and styles, read from each font file's name table only (246 families in
80 ms here); Ubuntu Light and Hack from the UI's built-in fonts are always there
and are the fallback in the browser.

- Properties > Alpha > Text: the text, a font and style, Use as brush alpha and
  Place as decal (in the tool's base color).
- Image alphas keep their proportions (their longer side spans the stamp), so a
  line of text stays a line; image thumbnails are letterboxed and show alpha.
- harfrust 0.12 and skrifa 0.44 are the versions egui already builds, so the
  lockfile gains no packages.

Fixes #40
2026-11-02 04:07:37 +07:00
BFlat 0788317deb Merge pull request #47 from test-bit-sys/feat/arabic-localization
Add complete Arabic (ar) UI localization
2026-11-02 04:03:28 +07:00
BFlat ee54678120 Merge pull request #53 from storytold/fix/wireframe-polygon-edges
Wireframes show the mesh's polygons, not their triangles
2026-11-02 04:02:54 +07:00
bflatastic eb812f90d4 Arabic: UI font fallback, and the docs
Arabic text needs a font with Arabic glyphs; egui already shapes it and orders
right-to-left runs. The script joins the CJK ones in the lazy fallback fonts:
Noto Sans Arabic from craft-fonts (desktop and web, 0.8 MB), else Segoe UI,
Tahoma or Arial on Windows, SF Arabic or Geeza Pro on macOS, and Noto Sans
Arabic or DejaVu Sans on Linux and FreeBSD. Without any, the picker lists Arabic
by its English name, as for CJK.

ATTRIBUTION, the localization table (panels keep the left-to-right layout),
features, README and roadmap count ten languages.
2026-11-02 03:28:59 +07:00
bflatastic fc510fc892 Merge remote-tracking branch 'origin/main' into feat/arabic-localization 2026-11-02 03:21:53 +07:00
BFlat 841eff5df9 Merge pull request #43 from Agapenordev/fix/control-token-hardening
Control channel: harden the token file and the app's control server
2026-11-02 03:21:28 +07:00
bflatastic bd128ab181 Wireframes show the mesh's polygons, not their triangles
Importers fan-triangulate quads and n-gons, and the 3D and UV wireframes drew
every triangle edge, so a quad mesh showed its triangulation. Meshes now carry a
per-triangle mask of the diagonals the importer added (Mesh::diagonals), and the
wireframe leaves them out (Mesh::wire_edges), unless a UV seam split one from its
twin.

- OBJ reads polygons whole (tobj without triangulation) and fans them itself.
- OBJ, PLY and the polygon sink (FBX, COLLADA, USD, Alembic) share one fan,
  RawMesh::polygon, which records the diagonals.
- The built-in meshes mark their grid quads.
- glTF and STL store triangles only, so they keep every edge.

Fixes #41
2026-11-02 03:20:57 +07:00
bflatastic 16ef2270c2 Show a portable TV in the README screenshots
The workspace, bake, export, rendering and light shots now show an original 1970s
portable TV with seven texture sets and a named layer stack instead of the material
ball, and the status bar reads 0.2.0.
2026-11-02 02:57:19 +07:00
test-bit-sys 33d0faa840 Add complete Arabic (ar) UI localization
Adds the full Arabic translation table covering all 827 keys, with exact placeholder parity, ellipsis handling, and locale detection ('ar'). Updates localization parity documentation accordingly.
2026-11-01 20:54:55 +01:00
AgapenordevandClaude Opus 5.5 5a065c1e15 Control channel: harden the token file and the app's control server
The desktop app wrote its control token to <temp>/texturecraft-control-<port>.token with
default permissions (world-readable in a shared /tmp), from a hash-based generator, and
compared it non-constant-time with no connection limit. Any local user could read the token
and drive the app, whose command.run takes host paths.

- Token files are created new (remove, then O_EXCL) with mode 0600, so a planted file or
  symlink can neither keep its permissions nor redirect the write; one that cannot be
  replaced disables the server with a hint to set TEXTURECRAFT_CONTROL_TOKEN.
- Clients only read a token file that is a regular file owned by them with no group or
  other permissions, opened without following symlinks or blocking on a FIFO.
- The app's control server uses the shared security module: OS-random 256-bit token,
  constant-time compare, validated and trimmed env token, bounded lines and at most 16
  connections.
- Connections must authenticate within 10 s (AuthDeadline) and get one attempt.
- The app and `serve --port` bind before writing the token file, so a server whose port is
  busy no longer replaces the running server's token.

Regression tests cover owner-only files over an existing open file, symlink and FIFO
handling, the auth deadline, the connection limit and the app's token checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 20:16:37 +01:00
bflatastic 70a7a44c29 Camera render: brassing only on the top plate's edges and corners
The worn-to-brass paint came from curvature masks that also caught the flat
front of the top plate, so it read as yellow blotches. The wear is now painted
by hand with brush strokes in UV space along the top plate's outer edge,
rounded ends and lip, the bottom plate's corners, the dial rims, the release
button and the strap lugs; the flat faces stay clean black satin paint.
2026-11-02 01:17:04 +07:00
bflatastic 4a259e7270 New README showcase renders: a storm lantern and a rangefinder camera
Replace the crate and material-ball renders in Made in TextureCraft with two
original props, modelled procedurally and textured with TextureCraft's own
materials, masks and mesh-map generators, path traced at 2048 samples.

texturecraft-cli render gains --camera <name> to look through a camera saved
in the project (camera.add), so a render can use an art-directed framing
(distance, target, field of view) rather than only yaw and pitch.
2026-11-02 01:08:59 +07:00
bflatastic ef30dfe5e3 Retake the README screenshots for the new UI
Inter, the even 6 pt gutters, the slate viewport backdrop and the custom
title bar. The Export shot now shows a neutral project folder.
2026-11-02 00:13:34 +07:00
BFlat c44f8b8508 Merge pull request #30 from storytold/ui/inter-and-even-gaps
Inter, even gaps and readable selections
2026-11-01 20:40:48 +07:00
bflatastic bdac5a22d2 Custom title bar: app icon, menus and window buttons in one strip
The top menu strip is now the window's title bar wherever the app draws the
frame (crates/ui-egui/src/titlebar.rs), using craft-window for the decision
and for the draggable empty area:

- Windows: no OS frame. App icon at the very left, the menus, empty space
  that moves the window (double-click maximizes), the mode label, then
  minimize, maximize/restore and close (46 pt wide, crisp pixel-snapped
  glyphs, close turns red on hover, dimmed while inactive). Invisible edge
  and corner zones resize the window. A per-frame guard ported from
  VectorCraft keeps the undecorated window borderless and a maximized one
  clear of the taskbar (winsafe, no unsafe), and the taskbar gets the big
  app icon.
- macOS: the traffic lights over the strip (full-size content view, hidden
  title), centred on it with eframe's traffic-light API, the app icon after
  their inset, and AppKit's movable flag synced by craft-window.
- Linux and the BSDs: craft-window's probe decides; where the compositor
  leaves the frame to the app (GNOME) the strip draws the buttons in the
  desktop's button layout.
- Wherever the system draws the frame (and on the web) the strip stays the
  menu bar, with the app icon at its left. No line under the strip.

TEXTURECRAFT_TITLEBAR=app|system overrides the decision. Settings ›
Interface › System title bar (applies on restart) brings the OS frame back;
it is read from the saved settings before the window opens and is settable
over the control channel as prefs.system_title_bar. ui.inspect reports
titleBar. New strings are translated in every language, and the offscreen
snapshots render the app-drawn and macOS variants.
2026-11-01 19:46:06 +07:00
bflatastic b0eb1e960a Inter, even gaps and readable selections
- The interface font is Inter (regular and semibold) from craft-fonts' Latin catalog, on
  VectorCraft's type scale: 11 small print, 13 body and controls, 15 semibold headings, 11.5
  values. build.rs embeds it without its Private Use Area, where the icon font draws. CI and
  release builds move to the craft-fonts commit with the Latin catalog.
- The tool bar, tool shelf, rail and bake panel are square tiles like the dock's groups, with
  one 6 pt gutter between all of them and no separator lines.
- Selected options and selected text are lettered in the strong colour instead of the accent on
  its own tint; a theme test keeps that readable in every brightness and accent.
- Section captions are semibold; the Layers action row fits one line again.
2026-11-01 19:42:59 +07:00
BFlat 155fa7343b Merge pull request #28 from storytold/filters/replace-color-filter
Replace Color filter
2026-11-01 17:37:28 +07:00
bflatastic 56a3a655ee Replace Color filter
Colors near a chosen color shift towards a new one, keeping their shading and texture.
27 -> 28 library filters.

- Filter::ReplaceColor {from, to, tolerance, softness}: each color within the tolerance (RGB
  distance 0..1) moves by to - from, fading out over the softness (smoothstep); far colors and
  scalar channels are untouched; content only (Adjustments)
- effect.add.filter / effect.set take from and to as linear RGB or "#rrggbb"; Properties has a
  swatch per color and the two sliders; translations in all eight UI languages
- tests: near, far and halfway colors, scalars; the engine filter library test adds it
2026-11-01 16:57:50 +07:00
bflatastic 12fa192373 Six more materials: Rust, Slate, Sandstone, Terrazzo, Cork, Paper
48 -> 54 procedural materials on the shelf and through material.apply:
- Rust (Metal): pitted, blotchy orange-brown iron oxide, a rough dielectric
- Slate, Sandstone, Terrazzo (Stone & Masonry): layered dark stone, fine warm grains, pale
  binder with polished stone chips
- Cork and Paper (Organic): granular pored cork, off-white paper with a faint tooth
The existing test applies every material on the sample and checks it changes the composite;
each was also checked on the material ball.
2026-11-01 16:47:49 +07:00
bflatastic c8e26549b0 Geometry mask tool: click mesh parts
A Geometry mask tool (key 8) shows or hides the selected layer on the mesh part under a click,
so geometry masks can be set on the model instead of from the part list.

- Tool::GeometryMask; tool.geometryMask selects it and tool.click toggles the part under the
  point ({layer, part, shown, geometryMask}); showing every part again clears the mask; one
  undo step per click; refused on empty space, without a selected layer, or on a part of
  another texture set
- the tool shelf, the tool bar hint and Properties (the layer's parts, shown or hidden, and Show
  on all parts); the hint is translated in all eight UI languages
- test: clicks on a two-object OBJ hide, show and clear, undo, and a click on empty space
2026-11-01 15:53:49 +07:00
BFlat bc33d66240 Merge pull request #14 from storytold/shared-docking
Panels: move onto craft-ui's shared docking (egui 0.37)
2026-11-01 15:37:02 +07:00
bflatastic afdea4a6dd Radial symmetry for brushes
Strokes can repeat around an axis through the mesh center, 2 to 32 copies, on their own or with
the X/Y/Z mirrors (each mirror is spread too).

- Symmetry gains radial (copies) and axis (X/Y/Z, default Y), serde defaults; sanitized clamps
- symmetry copies are marked and paint where symmetry puts them: the camera visibility and
  back-face tests apply to the stroke itself only, so copies on the far side of the model paint
  (mirror Z included); they still only paint surfaces facing the copy
- tool.brush {symmetryRadial, symmetryAxis}, shown in its result as radialSymmetry; Properties >
  Lazy mouse and symmetry: Radial copies slider and axis; translations in all eight languages
- tests: copies a quarter turn apart, with mirrors, clamping; an engine stroke paints the back of
  a sphere through radial symmetry
2026-11-01 15:04:23 +07:00