Preserve filter lookahead alongside main image-cache invalidation and input
bounds. Move HeldFields into its own module and finish scoped cleanup.
Charge repeated USD path names before allocating retained strings.
Reuse the blur transpose-back buffer and release scattered texels before
allocating filter temporaries.
Validated compose/engine release tests, Clippy, layering, wasm and formatting.
Preserve main's decoder, atomic-save, material-payload, and USDC limits.
Bound material reads by the remaining payload budget and trim retained
buffers. Replace quadratic image-name searches with map lookups, and
cache validated linked-material maps before synchronization so they
are not decoded twice.
Add import/undo/redo and payload-boundary regressions, extract
ImageIdentity, remove the unchecked scratch example, and complete
scoped cleanup. Correct the integrated style guide's product name.
Validated 546 release tests, Clippy, layering, wasm, formatting, and
focused allocation and lifetime probes.
Fields kept for the coming composites stayed allocated for as long as a
stroke lasted while tiles still followed, because the end-of-pass cleanup only
runs when none do. A stroke already kept them from being used; now it also
drops them. The test keeps fields first, then starts the stroke.
A stack with a neighbourhood filter (blur, high pass, bevel, glow...) made a
recomposite spread over frames many times slower than the same recomposite in
one call: every chunk filtered its own surroundings again, and on a machine
with many threads the filter's per-texel parallel steps cost more to hand out
than to run on a region of a few tiles.
- Neighbourhood filters split their per-texel work into tasks of at least
16384 texels. Each texel is computed on its own, so results do not change.
- Session::update_for tells the compositor which dirty tiles follow the chunk
in its block (up to 64). The compositor filters the chunk and those tiles at
once and keeps the fields for the composites that follow, compared by
everything the stack reads, and drops them at the end of the pass, after an
edit, and under a live stroke.
Results are identical to the one-call composite: tests cover cold, warm and
partly evicted hot-layer caches, an edit mid-pass and a live stroke.
perf::bench_sliced_filters_4k times both paths.
- 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.
Applying a material filled the model in tile by tile, and each apply made the
next one slower. Now:
- a big recomposite first draws a coarse look of every tile (sampled texels
repeated across blocks), then refines to the exact result;
- layers hidden behind an opaque layer are skipped (not when anchors or height
masks are involved);
- compositing and upload budgets adapt: larger when idle, smaller while the
user is interacting, and uploads reserve time for conversion;
- no coarse pass during a live stroke or with neighbourhood filters;
- blending at full weight returns the blended value exactly.
Tests: coarse-then-exact, hidden-layer culling gives identical pixels, coarse
pass covers every tile, no coarse pass while a stroke is live.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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>
Divide each blurred detail size by the share of the blur window inside its
UV tile block, so texels near a block or map edge keep their strength
instead of fading toward zero. Raw mode reads mid gray when there is no
curvature to sample. The size cache keeps one layout per curvature map.
Mask previews of hidden layers build their sizes once before the tiles run
in parallel. effect.set rejects a sizes array with a non-numeric entry.
The views don't paint while a dropped image waits for its menu pick, so a click
on the mesh outside the menu only closes it. Also document Texel::source and
DecalDrop::menu_id.
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.
An image dragged over the 3D view highlights the texture set under the
cursor, as materials do. A drop opens a menu at the drop point: Mask, then
that set's channels. A pick selects the set and places the decal there
with the image in the picked channel, or as the gray mask of a new fill
layer. A click elsewhere places nothing; the background opens no menu.
layer.add.decal takes channel (a channel id, default baseColor, or
"mask") and adds the decal to the set under the point, selecting it, as
one undo step. layer.decal.set takes effect to edit a mask decal, so the
view's frame and handles work on it too, and a new image stays in the
channel the decal was placed in. One-value channels and masks read an
image's gray instead of its red.
Only the last neighbourhood filter of a stack ran; any below it was
skipped silently, so Blur then Warp gave the same result as Warp alone.
field() now runs each one in turn, continuing from the previous field,
over a region widened by what the filters above it read. Stacks with a
single neighbourhood filter are unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Shelf thumbnails now show each smart mask applied with mask.smart.apply to a
baked preview shape (geom::primitives::preview_orb) and read back from the
compositor (compose::mask_at, a sparse read sharing mask_image's per-tile
code), shaded flat white over a softly lit near-black surface. The shape bakes
once on a worker; preview::smart_mask's world-noise approximation is removed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Layer rows are 48 points tall with alternating shades, hover, an accent edge on the selected
row and a divider under each layer. Each row shows its content thumbnail (the layer's own result
in the displayed channel) and its mask thumbnail, each selectable on its own; a subtitle names
the layer type and effect count; blend mode and opacity stack on the right. Effects hang under
their layer on tree lines in "Content effects" and "Mask effects" groups that fold without
touching the document, each with a thumbnail of the stack up to and including it (a hidden
effect shows what it bypasses, struck through). Folder contents indent with lines.
Paint and fill thumbnails show their own coverage over a checkerboard; folders composite their
children. Every size derives from layer_panel::layer_preview_size, so a preview size setting
plugs in there. New strings are translated in every shipped language.
The compositor renders a one-layer cut of the stack at 64 px (content in a channel, mask, or
the stack up to an effect); the engine keeps an immutable snapshot, a worker thread, an LRU
cache and stale-result rejection.
Upstream removed bake/maps.rs, engine/tests/auto_rebake.rs and read_skew
(moved elsewhere); take the deletions. Convert two new chunks_exact uses in
bake/test/setting.rs.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Clippy 1.99 flags chunks_exact and chunks_exact_mut with a constant
chunk size (chunks_exact_to_as_chunks). Switch those call sites to
as_chunks / as_chunks_mut. Behaviour is unchanged: the trailing partial
chunk was already dropped.
Fixes#233
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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>
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).
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>
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.
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.
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.
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.
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.
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
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)
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