Commit Graph
16 Commits
Author SHA1 Message Date
bflatastic 332cfa4070 Levels histogram: bound the neighbourhood work under a filter
A neighbourhood field covers the bounding box of its tiles, and a
scattered sample spans the whole set, so on an 8K set a blur below the
levels effect evaluated everything. With such a filter below, each
sampled tile now builds its own field.
2026-11-02 10:00:24 +07:00
bflatastic 83b8a13131 Levels histogram: sample every column, and read masks of empty layers
An odd tile stride: a power of two divides the row length on
power-of-two sets and read the same few columns. A mask is planned on
its own, so a paint layer with nothing painted still shows its mask's
histogram.
2026-11-02 09:44:28 +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 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 056a089551 Viewport: show the baked normal map
The viewport's normal texture held only the painted Normal channel, so
a baked normal map changed the export but not the view. Display tiles
now re-orient the painted normal onto the baked one, as export does
(core::blend::rnm, now public).

Fixes #54.
2026-11-02 06:11:11 +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 e56022230b Geometry masks: layers on chosen mesh parts
A layer or folder can show only on the mesh parts you pick: right-click a layer > Geometry mask
lists the parts of its texture set as checkboxes; Show on all parts clears it.

- Layer.geometry_mask (part names, serde default); the compositor zeroes the layer's mask on
  texels whose triangle (UV G-buffer) lies in another part, so it combines with painted masks,
  mask with height, folders and anchors; an instance keeps its own
- layer.set {geometryMask: [names] | null} (unknown parts refused), textureSet.parts {ts?};
  inspect shows geometryMask per layer and parts per set
- translations for the menu labels in all eight UI languages
- tests: compositor split of one material into two parts; engine commands on a two-object OBJ
  (parts, masked composite, refused input, inspect, undo, clear)
2026-11-01 14:00:16 +07:00
bflatastic 5dd12041c8 Baked Lighting filter
Paints a light into the base color for hand-painted and mobile looks: base color x (ambient x
ambient occlusion + light x max(n.l, 0)) on the mesh normals, with the light set by azimuth and
elevation. 26 -> 27 library filters.

- Filter::BakedLighting {azimuth, elevation, light, ambient, occlusion} and baked_light()
- the compositor reads the texel's normal and the baked AO (none baked: no occlusion) and
  lights the base color only; content only (Adjustments)
- effect.add.filter / effect.set / filter.list; property sliders; translations in all eight UI
  languages
- tests: lit from the normal side the color stays, from behind only ambient remains, roughness
  untouched; occlusion weighting
2026-11-01 13:15:47 +07:00
bflatastic 4bcf04ff25 More filters: Bevel, Glow, Mosaic
The filter library grows from 23 to 26 filters for layer content and masks.

- Bevel (Blur and sharpen): values ramp from 0 at a shape's edge up to their own level over
  the width, from the coverage-weighted box blur; never raises a value
- Glow (Blur and sharpen): adds the blur of the values times the amount
- Mosaic (Distort): square cells, each the value at its center, sampled at absolute texel
  positions so cells line up across tiles
- effect.add.filter / effect.set / filter.list cover them; shelf thumbnails, property sliders
  and translations in all eight UI languages
- tests: compositor behaviour of each, the engine filter library test adds and composites them
2026-11-01 12:26:02 +07:00
bflatastic 1679cd4dd5 More filters: High Pass, Edge Detect, Warp Directional, Grayscale, Normal Invert
The filter library grows from 18 to 23 filters for layer content and masks.

- High Pass (Blur and sharpen): the detail finer than the radius around mid gray (0 for
  signed channels), sharing the box-blur path, premultiplied by coverage
- Edge Detect (Adjustments): gradient magnitude from coverage-weighted central differences;
  a side outside the UV island reads the texel itself, so seams are not edges
- Warp Directional (Distort): the warp's noise offset along one direction
- Grayscale and Normal Invert (Adjustments, content only): luminance for colors, flipped
  green for normal maps
- effect.add.filter / effect.set / filter.list cover them (CLI, control channel, MCP);
  shelf thumbnails, property sliders and translations in all eight UI languages
- tests: compositor behaviour of each new filter, the engine filter library test adds and
  composites them
2026-11-01 11:37:07 +07:00
bflatasticandClaude Opus 5.5 6bf3cb83d4 Format the workspace (cargo fmt)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 11:28:37 +07:00
bflatasticandClaude Opus 5.5 55387bf0fd GPU baking, Alembic, templates, translations and 8K responsiveness
- Baking: per-map ray settings (AO, thickness, bent normals), GPU ray-traced baking with CPU
  fallback (~12x), color map from textured glTF high polys
- Files: Alembic (Ogawa) and FBX 6 import, per-tile UDIM resolution, converting a set to UV
  tiles, project templates, preserving painted strokes on mesh reimport
- UI: translations (French, German, Spanish, Portuguese, Italian, Japanese, Chinese, Korean)
  with a live language picker and CJK fonts, closed panels reopen where they were, viewport
  texture resolution setting, frame-budgeted scene sync for 8K sets
- Web: loading screen, WebGL2 notice, app-captured shortcuts, touch navigation

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 11:23:28 +07:00
bflatasticandClaude Opus 5.5 81d3f5c14c GPU path tracing, depth of field, cameras, glass, filters and decals
- Rendering mode traces on the GPU (compute shaders, ~25x the CPU tracer) with CPU fallback;
  CLI/MCP render --samples uses the GPU unless --cpu
- Depth of field in the viewport and the path tracer; multiple cameras with glTF import;
  transmission/IOR, coat normal and screen-space subsurface blur; exact 8-bit normal decode
- Filter library (18 filters incl. warp, color balance, gradient map, posterize, MatFinish)
  with a Filters shelf tab; geometry decals; clone from the current layer; anchors inside a
  content stack; instances across texture-set resolutions; drag saved smart materials

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 09:06:22 +07:00
bflatasticandClaude Opus 5.5 bdbb52c9b6 UDIM tiles, USD import/export, coat/sheen/anisotropy/subsurface shading
- UV tiles: auto-detected UDIM texture sets as one atlas per set, padding kept inside tiles,
  one file per tile with the $udim export token, builtin:udim_plane
- USD: usda/usdc/usdz import (Crate reader with LZ4) and export with UsdPreviewSurface
- Shader lobes: clear coat, sheen, anisotropy and subsurface scattering channels in the
  viewport and the path tracer; car paint, velvet, brushed steel, skin and wax materials;
  glTF clearcoat/sheen export
- Color swatch popups no longer stay open

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 19:45:14 +07:00
bflatasticandClaude Opus 5.5 2e74013c3e Painting performance, alpha library, export template editor
- Compositor caches the stack below and replays what lies above the layer being painted,
  also inside folders: painting under a smart material is ~10-25x faster per frame and the
  stroke commit 12-30x faster, bit-identical to a full composite
- Paint shows in the frame it is drawn; parallel stamp rasterizing and stroke commit;
  camera visibility reused between strokes
- 67 procedural brush alphas with an Alphas shelf tab; drag materials, smart masks and
  alphas from the shelf onto the layer stack, layers and viewport
- Export output template editor: user presets with per-channel packing, converted maps,
  import/export as JSON, validated at load
- Shift+right drag turns the environment; S+drag no longer orbits while moving the stencil
- Frame profiler and scripted paint test on the control channel (debug.frames, debug.paintTest)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 15:15:26 +07:00
bflatasticandClaude Opus 5.5 ec859420d5 TextureCraft: clean-room 3D texture painting in pure Rust
An open-source, clean-room implementation of a Substance 3D Painter-style texturing
workflow, written in pure Rust with egui and wgpu.

- Layer stack with 32 blend modes, masks, generators, content effects and anchor points
- Painting, projection, smudge, clone, path, lasso fill, particle brush and quick mask
- 43 procedural materials, 17 smart materials and 10 smart masks
- Mesh map baking with high-poly, cage and match-by-name support
- PBR viewport with HDR environments, TAA and a path-traced Rendering mode
- glTF, FBX, COLLADA, OBJ, PLY and STL import; texture export presets; OBJ and GLB export
- Dockable Painter-style UI, shortcut editor, web build, MCP server and CLI

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 01:33:13 +07:00