Commit Graph
61 Commits
Author SHA1 Message Date
Rebornim e020080bde Shelf icons and the material picker's name
Path gets a pen nib, so it no longer looks like Polygon fill's polygon;
Projection takes the cube-focus icon and Geometry mask a crossed selection.
The color picker copies every channel of the material under the cursor, so it
is now called the material picker (its command id and key stay).
2026-11-11 07:27:36 +00:00
chasse20 18a3c98176 Implement clean-room bake settings and improve map accuracy 2026-11-04 03:57:46 -05:00
chasse20 e4405760f1 Major refactor of Bake Mode settings and some UI, lots of cleanup for parity 2026-11-04 02:15:08 -05:00
bflatastic a21114be26 Merge remote-tracking branch 'origin/main' into masks/more-smart-masks 2026-11-02 22:00:43 +07:00
BFlat 623c1d5508 Merge pull request #168 from storytold/texturesets/tile-scaled-filters
Filter radii and height slopes follow each UV tile's own resolution
2026-11-02 21:48:33 +07:00
bflatastic 5ea7a91a42 Six more smart masks: snow from top, moss from ground, rust in cavities, edge scratches, dirt streaks, occluded areas
18 -> 24 smart masks, built from the existing mesh-map generators and
triplanar patterns.
2026-11-02 21:48:11 +07:00
bflatastic 67a5cb3a09 A light pen tap paints a small dab
A pen lifts reporting no pressure, and a tap paints on that frame, so a tap
painted at full pressure. The release now keeps the pen's contact pressure (a
touch without pressure, such as a finger, starts fresh).

Browsers report pen pressure only for pens that send touch events; desktop
browsers deliver pens as a mouse, so the docs say so.
2026-11-02 21:20:04 +07:00
bflatastic 6dabe66324 Filter radii and height slopes follow each UV tile's own resolution
A UV tile with a lower resolution than its atlas block fills the block's
corner, so it has fewer texels per UV unit. Neighbourhood filters (blur,
sharpen, warps, bevel, glow, ...) and height-to-normal slopes used the block's
texel density for every tile, so such a tile blurred twice as wide and showed
twice as steep slopes in UV space.

TextureSet::block_scales gives each block's share; the compositor filters each
block at its tile's radius, texture export and the CPU path tracer scale the
slope by it, and the display packs it into the Extra texture's alpha for the
viewport and GPU path tracer shaders (parallax too).
2026-11-02 21:08:35 +07:00
bflatastic 099c3b1b5c Pen pressure thins strokes in the 2D view too
The 2D view painted at full pressure whatever the pen reported; it now reads
the same touch force as the 3D view. Docs say where pen pressure works today
(Windows Ink and the browser) and that Linux and macOS pens arrive as a mouse
until the windowing layer reports them.
2026-11-02 20:36:48 +07:00
bflatastic 04af749194 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	ROADMAP.md
2026-11-02 19:28:51 +07:00
bflatastic 8dc6e533b7 UV-tiled sets take mesh maps from one image per tile 2026-11-02 18:57:37 +07:00
bflatastic 92e92ff779 OBJ export writes an MTL material library with each material's maps 2026-11-02 18:20:21 +07:00
BFlat 403385e312 Merge pull request #132 from SteamSmith/feat/auto-rebake-skew
Auto-rebake: a changed skew map rebakes the map
2026-11-02 16:45:38 +07:00
BFlat 61637df84f Merge pull request #60 from SteamSmith/feat/bake-skew-correction
feat(bake): skew correction for high-poly transfer rays
2026-11-02 16:44:55 +07:00
bflatastic 126aeb1356 Merge branch 'feat/bake-skew-correction' into feat/auto-rebake-skew
# Conflicts:
#	ROADMAP.md
#	crates/engine/tests/auto_rebake.rs
2026-11-02 16:23:25 +07:00
bflatastic 360d70fcef Merge remote-tracking branch 'origin/main' into feat/bake-skew-correction 2026-11-02 16:10:38 +07:00
bflatastic d3453cd1f8 Merge remote-tracking branch 'origin/main' into feat/embed-colour-space 2026-11-02 15:59:33 +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
bflatasticandClaude Opus 5.5 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
SteamSmithandClaude Sonnet 5.5 59f0ab4850 feat(export): record the chosen colour space in the exported colour maps
When file.exportTextures is given a colorSpace, colour maps carry it: an ICC profile in PNG,
JPEG, TIFF and WebP, the chromaticities attribute in EXR. TGA, BMP and HDR have no place for one
and warn. Data maps and exports without a chosen space are unchanged.

The profile is a small version 2.1 matrix/curve profile written from the space's primaries
(Bradford-adapted to D50), tested against the published sRGB colorants.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 01:38:15 -05:00
bflatastic 34eae81910 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	ROADMAP.md
2026-11-02 13:25:16 +07:00
SteamSmith 331a37e04d Merge branch 'feat/bake-skew-correction' into feat/auto-rebake-skew
# Conflicts:
#	ROADMAP.md
2026-11-02 01:23:28 -05:00
SteamSmithandClaude Sonnet 5.5 ea4a678a0a fix(bake): bound skew painting and image size, layout only in bake mode
- SkewMap::paint refuses a stroke whose dabs would visit more than 2^26 texels, before any
  texel changes; the dab count alone didn't bound the work of a big brush on a big map.
- bake.skew.set checks the image size from its header (decode_image_within) before decoding.
- The 2D view is shown for the skew brush in bake mode only, not in rendering mode.
- Prepared::correct allows its argument count for clippy; the skew test uses its own folder.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 01:22:14 -05:00
BFlat 8d8bbd6e04 Merge pull request #69 from SteamSmith/feat/bake-auto-rebake
feat(bake): Auto-rebake keeps one mesh map up to date
2026-11-02 12:45:03 +07:00
bflatastic b5baf50454 Merge remote-tracking branch 'origin/main' into docs/roadmap-2026-11-02e
# Conflicts:
#	ROADMAP.md
2026-11-02 12:37:06 +07:00
bflatastic a50791314a Docs: roadmap after effect reorder and clipboard, mesh map images, Ctrl+drag brush and the History panel 2026-11-02 12:32:12 +07:00
bflatastic e9dfbe932f Merge remote-tracking branch 'origin/main' into HEAD
# 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 12:27:15 +07:00
bflatastic 88c92dbf71 Merge remote-tracking branch 'origin/main' into HEAD 2026-11-02 12:23:33 +07:00
bflatasticandClaude Opus 5.5 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 8e5c748c36 Merge feat/materialx-export into feat/materialx-import
# Conflicts:
#	crates/formats/src/lib.rs
2026-11-02 11:38:19 +07:00
bflatastic 569eb70f86 Merge remote-tracking branch 'origin/main' into pr69
# Conflicts:
#	ROADMAP.md
2026-11-02 11:34:41 +07:00
bflatastic 74a036540e Merge remote-tracking branch 'origin/main' into pr75
# Conflicts:
#	ROADMAP.md
2026-11-02 11:26:21 +07:00
bflatastic baf2390691 Merge feat/materialx-export into feat/export-colour-space
# Conflicts:
#	ROADMAP.md
2026-11-02 11:19:11 +07:00
bflatastic bc57653868 Merge remote-tracking branch 'origin/main' into pr50
# Conflicts:
#	ROADMAP.md
2026-11-02 11:15:32 +07:00
bflatastic 6c93db99c6 Docs: roadmap after the levels histogram, web save prompt, filters and materials 2026-11-02 10:12:32 +07:00
SteamSmith 2263ab0c14 Merge remote-tracking branch 'fork/feat/bake-skew-correction' into feat/auto-rebake-skew
# Conflicts:
#	ROADMAP.md
2026-11-01 20:44:33 -05:00
bflatastic 4f8a2f0828 Docs: roadmap after the issue fixes 2026-11-02 08:28:30 +07:00
SteamSmith 650af529e2 Merge remote-tracking branch 'origin/main' into feat/bake-skew-correction
# Conflicts:
#	ROADMAP.md
2026-11-01 20:25:01 -05:00
SteamSmith fac42eac33 Merge feat/materialx-export into feat/export-colour-space 2026-11-01 19:10:21 -05:00
bflatastic 2b7ed060be Docs: roadmap after today's fixes 2026-11-02 07:08:16 +07:00
SteamSmithandClaude Sonnet 5.5 16e70a0145 feat(export): choose the colour space of exported colour maps
New texturecraft_texel::ColorSpace (sRGB, Linear Rec.709, ACEScg, ACES2065-1): the matrices are
derived at first use from the published primaries and white points (BT.709, ACES S-2014-004,
SMPTE ST 2065-1) with Bradford adaptation, so nothing is copied from a colour-management
library. ExportOptions::color_space (command and dialog: `colorSpace`) converts the colour maps
on their way out; data maps (normal, height, roughness...) are never converted.

None keeps today's behaviour: sRGB in 8/16-bit files, linear Rec.709 in float files. A linear
space in an integer file is written without the sRGB curve; ACEScg and ACES2065-1 in integer
files warn that values outside 0-1 are clamped (EXR and HDR keep them). `$colorSpace` in a file
name template now also says ACEScg / ACES2065-1. The export dialog gets a Color space combo
(label translated in all ten languages).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-01 17:28:09 -05:00
bflatastic eea71c6790 Docs: roadmap estimate after text, brush presets and the start window
Painting tools 88 to 90% (text in any font as an alpha or a decal), materials and
assets 86 to 88% (18 brush presets and user presets), the total about 94%; the
viewport and UI rows mention polygon wireframes and the start window.
2026-11-02 05:08:15 +07:00
SteamSmithandClaude Sonnet 5.5 ffd311f516 feat(import): MaterialX (.mtlx) material import as a fill layer
file.importMaterialX {path, material?, name?} reads an open_pbr_surface, standard_surface or
gltf_pbr material and adds one fill layer: image inputs (directly, through a nodegraph output
or normalmap/convert/constant nodes, with fileprefix and the first UDIM tile) become image
resources and sources, literal values become uniform sources (sRGB-tagged colours converted to
linear, colours on scalar channels averaged), the displacement shader becomes height, and the
first image's uvtiling becomes the UV projection scale. Emission follows the specifications'
defaults (off unless emission_luminance / emission is above 0).

Images are read only from the document's folder and below: a document is untrusted. Channels
the texture set lacks, unreadable images and unsupported nodes are reported in `warnings`;
nothing to import is an error. The whole import is one undo step.

Written from the ASWF MaterialX 1.39 and OpenPBR Surface specifications; the reader caps size,
depth and element count and has mutation tests. The inverse of the MaterialX export in #50.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-01 16:50:10 -05: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 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
SteamSmithandClaude Sonnet 5.5 aef225f3a6 feat(bake): Auto-rebake keeps one mesh map up to date
A map chosen with `bake.autoRebake {map}` (or the new Auto-rebake checkbox in the bake mode's
per-map panel) bakes itself again, alone, whenever what it was baked from changes: the texture
set's bake settings (except which maps are ticked), the low poly, the high polys or the cage.
The apps poll `Session::auto_rebake_due` each frame and bake the due sets in the background;
`bake.autoRebake.run` does the same once, blocking, for agents and scripts.

A set only takes part once it has the map baked at its current output size, so Auto-rebake
keeps a bake current without starting one or leaving a set's maps at two sizes. A manual bake
of the map also marks the set up to date, and a change made while a bake runs triggers another.
The choice isn't saved in the project. The other maps of the set are left as they were.

Strings translated in all nine languages (native-speaker review welcome, as for the rest).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-01 16:14:42 -05: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
SteamSmithandClaude Sonnet 5.5 d1d925a4ad feat(bake): skew correction for high-poly transfer rays
A greyscale skew map over the UV atlas turns the transfer rays that start from the built-in
distance cage from the averaged direction towards the low poly's base normal (the vertex
normal, or each triangle's flat normal). 0 keeps the ray, 1 turns it fully, grey blends. Edge
protection fades the correction out near hard edges (faces more than about 30 degrees apart),
by distance as a fraction of the mesh diagonal and a contrast exponent.

New bake::SkewMap and BakeRequest::skew (a custom cage mesh sets its own rays and ignores it).
Engine: bake.skew.set {value | path, edgeDistance, edgeContrast, base} and bake.skew.clear;
the skew shows in bake.highPoly.list. The map is not saved in the project yet.

Tests: unit tests for sampling, validation, hard edges and the blend; an analytic baker test
(a leaning low poly under a plane: black unchanged, white equals the upright height, grey
between); an engine test through the commands including an image map and refused input.

Ported from SurfaceCraft's baker (MIT OR Apache-2.0) and adapted to this crate's Ctx.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-01 15:29:54 -05: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