Commit Graph
45 Commits
Author SHA1 Message Date
chasse20 44079ecab5 Auto: Integrate main while preserving bake visualization
Merge main at cce9ada while retaining the saved bake repairs and layout. Resolve docking, module, and viewport overlaps with the new Assets shelf and tool-availability behavior.
2026-11-16 00:32:06 +00:00
chasse20 442edf310a Auto: Integrate main and preserve generator review repairs 2026-11-15 19:26:39 +00:00
Rebornim 7bd6c0ef2b Generators: global adjustments, output resolution and image inputs
- Global blur, balance and contrast on every generator (GeneratorGlobal).
  The blur blurs only the generator's own value, up to a 64-texel radius
  at 2K, weighted by mesh coverage; balance picks the input range that is
  stretched to 0..1 and contrast narrows it; invert stays last.
- Output resolution (OutputResolution, ResolutionMode): Auto or UV tile,
  Texture set or a custom size, times a factor from 1/8 to x8, never
  coarser than one value per 64 texels. Below the UV tile's resolution
  the generator is averaged over cells and read back bilinearly.
- Image inputs: each mesh map a generator reads can read an image, a
  uniform value or an anchor point instead. Generator inputs count as
  anchor and image readers (compositing order, paste, remove unused).
- Blur and resolution run as a neighbourhood stage of the mask, listed
  the same way by every caller and only in masks.
- Commands: blur, balance, contrast, resolution, customResolution,
  resolutionFactor on effect.add.generator / effect.set, and input with
  inputImage / inputValue / inputAnchor / inputBaked on effect.set.

New fields are skipped when they hold their defaults and neutral settings
return the value untouched, so saved projects load, save and render as
before.
2026-11-12 04:39:32 +00:00
Rebornim 4fd1e1448e Bake settings: high poly list, and Cage and Skew Correction greyed with the reason
High Poly Scene is a list with + and -, as in the reference. Without a high poly the
high-poly, Cage and Skew Correction controls show greyed instead of hidden, and a line
says why. Skew Correction applies only to a distance-based cage with Average Normals and
a separate high poly, in the panel and in the bake (a painted skew map no longer
changes other bakes).
2026-11-12 04:33:37 +00:00
vangel76andClaude Opus 5.5 254ee16b04 Merge upstream/main into fix/217-generator-offset
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 23:26:53 +01:00
SteamSmithandClaude Sonnet 5.5 d8d4140e11 fix: Reimport mesh reads the mesh file again from disk
Reimport mesh re-read the project's own stored copy of the mesh when it had
one, so saving a change to the mesh file and reimporting did nothing. The
project now remembers the path the mesh was imported from (mesh_path, the
spec's "3D mesh path") and Reimport reads that file again. When the file is
gone the menu asks for one, and a command without a path still falls back to
the stored copy. Projects saved before this have no path and ask once.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 23:11:37 -05:00
vangel76andClaude Opus 5.5 07e94e1c86 Merge upstream/main into fix/217-generator-offset
Keep the curvature mode and detail sizes from upstream and route the
finished generator value through Generator::shape so the offset applies
to every generator kind. A non-finite offset now counts as 0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 09:18:34 +01:00
vangel76andClaude Opus 5.5 6c3e2f9625 Merge upstream/main into fix/217-generator-offset
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 08:17:31 +01:00
Rebornim 1a0fc5fec8 Curvature detail: build only the sizes in use, map coverage on all cores 2026-11-08 00:10:40 +00:00
Rebornim 906dcf324e Curvature detail: name the tuned weights, clean up the effect plans and blur 2026-11-08 00:10:40 +00:00
Rebornim a1d010ccb2 Curvature generators: mode and detail sizes
Curvature and edge wear generators read the baked curvature map one
texel at a time, so they only marked the sharpest edges. They now take a
mode (edges, cavities, both, raw) and seven detail size weights: the map
itself and the map blurred at 1 to 32 texels at 2K, padded past the UV
islands and built once per map and layout. Each size's edges and
cavities combine like a screen blend.

New curvature and edge wear generators use detail sizes. Generators saved
without them, and smart masks, read the map exactly as before.
2026-11-08 00:10:40 +00:00
Rebornim b1f377b8eb Bake curvature from the mesh by default
The normal-map method cannot see the low poly's own edges: a box baked
from itself gets flat curvature, and a box baked from a beveled high poly
gets a dark line along its convex edges. New projects now start on the
mesh method; projects that store a method keep it.
2026-11-06 23:46:46 +00:00
chasse20 747068dbdf Fix bake settings and UV tile controls 2026-11-05 22:39:42 -05: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
vangel76andClaude Sonnet 5.5 e59bf5569e Add an offset to mesh-map generators
The generator panel had level, softness and noise but no way to lift or lower the finished mask. The new offset is added to the result and clamped to 0..1. The thresholding now lives in Generator::shape, shared by the compositor and the preview.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-03 23:36:50 +01: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 fe02cd266d Fill normal images can be marked DirectX: their green flips where a normal channel samples them 2026-11-02 17:52:31 +07:00
Justin John ecf7b01720 Merge remote-tracking branch 'origin/main' into paths/non-destructive-113
# Conflicts:
#	crates/core/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 13:08:31 +05:30
Justin JohnandClaude Opus 5.5 e478a8145b Merge main into paths/non-destructive-113
Keep path sublayers refused for manual strokes alongside main's paint-below-selected-effect targeting.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 12:25:25 +05:30
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
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
Justin JohnandClaude Opus 5.5 07b5aaa0c1 Make paths non-destructive with path sublayers (#113)
Committed paths are stored in a new path sublayer (EffectKind::Path) on the
layer content or mask and the sublayer is repainted from its paths whenever one
is added, edited or removed. path.edit loads a path (with its brush and
material) into the Path tool; changes repaint live as one merged undo step.
path.remove deletes one. Manual strokes are refused on path sublayers, so they
can't be painted over by accident. The sublayer properties list its paths.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 10:30:59 +05:30
BFlat c26847e21c Merge pull request #79 from Rebornim/fix/thickness-default-max-distance
Bake: thickness max occluder distance defaults to 0.1
2026-11-02 11:07:39 +07:00
bflatastic d5c2f793fd Histogram Scan: full contrast is a threshold
At contrast 1 the narrowest ramp still sent a value equal to the position to mid gray. It now matches Threshold: the position and everything above it go to white.
2026-11-02 10:39:41 +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 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
BFlat 05c44de71c Merge pull request #92 from storytold/viewport/baked-normal
Viewport: show the baked normal map
2026-11-02 06:51:42 +07:00
BFlat c8368b6a06 Merge pull request #91 from storytold/fix/unnamed-parts-reopen
Projects keep the names of a mesh's unnamed parts on reopen
2026-11-02 06:51:38 +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 e3bc63d1ca Projects keep the names of a mesh's unnamed parts on reopen
Parts a mesh file leaves unnamed are named after the file. The project
stored the mesh as mesh.<ext> and read it back under that name, so a
reopened quad.gltf named its part "mesh" and geometry masks on "quad"
hid their layer. The project now keeps the imported file's name
(mesh_file) and reads the stored mesh under it, on open and on a
pathless reimport. Older projects read as before.

Fixes #76.
2026-11-02 05:56:33 +07:00
bflatastic 963008635c display.set: refuse unknown environment names
The built-in environment list moves to core (render re-exports it), so
the engine can name the valid ones in the error.

Fixes #65.
2026-11-02 05:34:40 +07:00
RebornimandClaude Opus 5.5 8a281d7f2c Bake: thickness max occluder distance defaults to 0.1
Thickness is the mean hit distance divided by the max occluder distance,
so the old shared default of 0.25 of the bounding box diagonal turned most
thin parts of a model nearly black, and long rays reached geometry behind
single-sided parts. 0.1 is the default in Adobe's public baker documentation.

AO and bent normals keep 0.25.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 22:30:07 +00: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 2ddb156d69 Neutral names in code and packaging; README in the Crafting Apps layout
- Code comments, crate descriptions, the MCP stroke schema and the Linux package descriptions
  describe features in their own words instead of naming the reference application or other
  vendors' products (file format names stay)
- The README follows the layout the other Crafting Apps use (VectorCraft): a look around, made
  in TextureCraft, why TextureCraft, quick start with the agent setup, status, downloads per
  platform, the Crafting Apps, star history, license; no trademark footer
- The detailed feature list moves to docs/features.md
- A new path-traced render of the built-in crate textured with smart materials

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 12:55:42 +07:00
bflatasticandClaude Opus 5.5 1e88b9041f Smooth 8K strokes, decal handles, displacement, refraction, release readiness
- Strokes pre-blend their commit while painting and recompose committed tiles at low
  priority: the 8K stroke-end frame drops from 30-42 ms to 12-19 ms
- Texture set resize runs in the background (8K: 3 s to 0.5 s, UV padding map from island
  borders only)
- Decal move/scale/rotate handles; FBX and USD high-poly textures for the color map;
  viewport displacement from the height channel; screen-space refraction of the scene
- CI pinned to Rust 1.96.0; FreeBSD VM sized for hosted runners; release builds embed
  craft-fonts; file associations for FBX, COLLADA, USD and Alembic on every platform
- README, release checklist, NOTICE and attribution brought up to date

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 13:25:10 +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 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