Commit Graph
1239 Commits
Author SHA1 Message Date
Rebornim e7fa9730f2 Generators: drips take no rust from lower on the axis, histogram ends hold at a hard step, Use Texture's X projection scales about the centre
- a drip ray past a ridge no longer carries rust up from texels lower on
  the drip axis (the fitted captures move closer with the check)
- position 0 stays all black and 1 all white at contrast 1, as the scan's
  ends are documented (3D Distance at offset 0, Dripping Rust spread 0)
- Use Texture's triplanar X projection mirrors U about the bounds' centre
  like the scale it uses; custom grunge keeps its fitted placement
  (identical at whole scales, which every capture used)
2026-11-25 07:26:15 +00:00
Rebornim ff298779c2 Generators panel: Restore defaults keeps the Resolution band, the input card offers anchors below the owner, a swapped kind drops its point pick, size columns step with the arrow keys
- Restore defaults resets the Parameters only, as its band says (it was
  disabled when only the resolution differed, yet reset it otherwise)
- an inherited generator's slots list the anchors below both the owner
  and the instance, as the Properties picker does (others were refused)
- a pick armed on a generator swapped to a kind without that point is
  dropped
- a focused size column takes the arrow keys, each press one step
- the picker snapshot hovers the tile by its ListBoxOption role
2026-11-25 07:16:06 +00:00
Rebornim 30dcceb3ef Generators: mask comparisons in tests reject missing texels; the micro blur's kernel is sampled once per pass
bake_resolution checks the mask's length again (the zip let a short or
empty mask pass), as do the texture and section test helpers.
2026-11-25 07:16:06 +00:00
Rebornim 44b1bc0273 Generators: whole-map fields keyed by a coverage hash taken once per evaluation and by each mesh map's bake size
The field cache read every 31st texel's triangle on each lookup (once
per tile plan) and could miss an edit between samples; the evaluation
now hashes every texel once, on first use. A mesh map's bake size joins
its key (one allocation read as another layout), and a hit moves to the
most recently used end.
2026-11-25 07:12:15 +00:00
Rebornim eaf3ad1c2a Generators: every anchor height a render reads stays prepared, built lowest anchor first at the working size
Anchor heights are kept while the texture set reads them (no 8-entry cap
that dropped a ninth anchor to black), built in the anchors' draw order
as their topmost reader reads them (an anchor's height can hold readers
of lower anchors; layer ids no longer decide), rebuilt when the working
atlas size changes, and prepared before the generator maps that read
them.
2026-11-25 07:07:40 +00:00
Rebornim 333605327e Generators: a micro detail saved before Micro Details renders as saved while its generator stays on the earlier model
MicroDetails.earlier marks a migrated {anchor, amount}: an earlier-model
generator adds the anchor's height times the amount to its signal as #395
did; microAnchor/microAmount keep that reading on the earlier model, and
any Micro Details control moves the generator onto the reference's
controls and the anchor's curvature.
2026-11-25 06:57:21 +00:00
Rebornim 2f5b802530 Shelf preview: test imports in one group 2026-11-25 02:22:21 +00:00
Rebornim a7e15a489c Generators: preview review round (pictures of any removed generator dropped, a test for the orb's restored images, imports) 2026-11-25 02:21:07 +00:00
Rebornim 3ec569def7 Generators: review fixes for the previews (an image read twice goes once and the orb gets its own back, pictures of a deleted generator dropped) 2026-11-25 02:18:40 +00:00
Rebornim 577981a3d2 Generators: the enlarged preview first opens beside the small one 2026-11-25 01:44:17 +00:00
Rebornim b1c8bd6718 Generators: a click on the preview opens it enlarged in a tool window, following the settings 2026-11-25 01:36:09 +00:00
Rebornim cc9b981112 Shelf preview: the settings hash before the tests 2026-11-24 13:15:29 +00:00
Rebornim 21b5180dc2 Generators: Use Texture goes along when the kind changes between the four kinds that have it 2026-11-24 13:14:07 +00:00
Rebornim 0402ba32a5 Generators: the panel's preview shows the generator as set, rendered one at a time while its settings change 2026-11-24 12:49:45 +00:00
Rebornim 9519f35873 Generators: second review round (one box radius formula, named cache key fields, tests for inspect and a half-given pick pixel) 2026-11-24 12:37:03 +00:00
Rebornim 1ed1f5ca5d Generators: review fixes (one type per file, a stale point pick drops, an image still loading blends black on both render paths, inspect reports the new controls) 2026-11-24 12:31:47 +00:00
Rebornim cb0a6f8a28 Generators: names and comments to the review guidelines; the bake hint without a hardcoded shortcut 2026-11-24 12:11:24 +00:00
Rebornim 4944032379 Property sheet: Escape cancels a typed value even where a shortcut takes the key; a press on the track drops the value typed in its row 2026-11-24 12:09:45 +00:00
Rebornim b40f743878 Generators: the seven new kinds in the picker with their panels, gradient stop places for UV Random Color and picking a point on the mesh 2026-11-24 12:09:45 +00:00
Rebornim 90d1c3e738 Generators: every generator panel on the property sheet, as the approved mockups 2026-11-24 12:09:44 +00:00
Rebornim f3d5cbe40c Generators: UV Checker, a checker and grid over each UV tile with the islands' borders
A new kind with the reference's controls: Seed, Checker Color Mode (Uniform, or Random per UV island), Checker Color, Checker Grid Tile, Checker Grid Opacity, UV Borders Color and UV Borders Width. Fitted to the reference's color captures: four checker squares per grid tile, dark squares a shade of the light color; minor grid lines every quarter square and major ones on the square edges, each layer laid over the last at the grid opacity; texels within the border width (0.2 is 3 texels at 2K) of an island's edge take the border color; random mode gives each island its own light color; the mask reads the mean of the sRGB-encoded channels, as the reference does. On the test gun 99.9% of texels match the reference within 1/255, at the default and with the grid off (the rest lie on seams where two islands touch in UV, which coverage alone can't tell apart). Lines and borders test a texel's whole footprint, so they stay visible below 2K. Commands only.
2026-11-24 12:09:41 +00:00
Rebornim 44a8af0943 Generators: UV Random Color, one random value per UV island
A new kind with the reference's controls: Seed and Color Source Mode (Random, or Custom Gradient with its colors). Each UV island (triangles joined across shared UV edges, as polygon fill groups them) gets a seeded random color, or the gradient's color at a random point, and the mask reads the mean of its channels. The reference's random numbers are its own, so islands differ in value but not in kind: on the test gun every island is one flat value in both, with island means spread alike (0.52 ± 0.16 against the reference's 0.50 ± 0.15). As a mask it is gray; a colored fill would need generators in content stacks. Generator maps now hold one whole-map field for UV Border Distance, Dripping Rust and UV Random Color. Commands only.
2026-11-24 12:09:41 +00:00
Rebornim 59fd1bc705 Polygon fill: the triangle grouping moves to geom, for generators to share
TrianglePartition and the UV edge key (with its corner grid) move from the engine into texturecraft-geom unchanged, beside the mesh they group, with a uv_islands constructor polygon fill now uses for its UV island mode. The compositor can then group texels by UV island for the UV island generators without depending on the engine.
2026-11-24 12:09:41 +00:00
Rebornim f3c8103579 Generators: Dripping Rust, rust grown from the occlusion and run down in drips
A new kind with the reference's controls: Rust Spreading, Rust Contrast, Spreading Smoothness, Drips Intensity, Drips Smoothness, Drips Samples Amount, Position axis, Seed and Invert. Fitted to the reference: the rust rises with the occlusion, is blurred by the spreading smoothness, and each texel then takes the most rust found uphill along the chosen axis of the mesh's bounds over the samples, fading with distance (93 texels at 2K at intensity 1), blurred by the drips smoothness and scanned by spreading and contrast (spreading 0 and 1 are exactly black and white, as in the reference). The reference's grunge is not reproduced: the Dirt grunge breaks the rust up at the measured strength instead, so the look is close in level but not texel for texel (correlation 0.55 on the test gun, versus about 0.75 for the fitted model with its noise averaged out). The field is built once per layout, occlusion map and setting, with the UV Border Distance gradient's cache and blur now shared in one module. Commands only; no replaceable inputs yet (it reads the baked occlusion and the mesh's bounds whole).
2026-11-24 12:09:41 +00:00
Rebornim c2cad52627 Generators: review fixes for Micro Details and the new kinds
Saved values are brought into range when read (a hand-edited project's infinite smoothness or huge AO radius no longer reaches the blurs and occlusion search), with tests. The UV Border Distance gradient is built once before tiles composite, not by every tile at once; its cache key adds the g-buffer's address and a denser coverage fingerprint, and its Smoothness blur follows each UV tile's own resolution. The micro and border caches keep at most 256 MB besides the newest entry. A generator's own controls are resolved once per plan instead of per texel; project.inspect shows them. Docs say which space the 3D kinds' points live in (the bounds scaled evenly, like the reference's position map) and that an empty micro slot reads a flat height.
2026-11-24 12:09:41 +00:00
Rebornim 13062a8efd Generators: Grayscale Conversion; the kinds with only their own controls share one field
Grayscale Conversion is a new kind with the reference's controls: an image (effect.set input: image; an empty slot reads black) repeated Tile times across the UV square and turned by Rotation about its centre, made gray by one of the eight conversions Use Texture already has, then Balance, Contrast and Invert like the global controls. Safe Rotation turns in quarter turns only so the image keeps tiling; that rule is inferred, as the reference captures had no image plugged in. Its image counts as a used resource.

3D Distance, 3D Linear Gradient, UV Border Distance and Grayscale Conversion now keep their controls in one boxed KindControls field (one variant per kind) instead of a field each, so a generator effect stays small as kinds are added; their behaviour is unchanged. Commands only; the picker leaves the new kinds out until their panels are designed.
2026-11-24 12:09:41 +00:00
Rebornim 9562b30c2b Generators: UV Border Distance, white at the UV islands' borders fading inwards
A new kind with the reference's controls: Distance (1 reaches about half a UV tile in), Smoothness, Balance, Contrast and Invert. Each covered texel's exact Euclidean distance to the nearest uncovered texel of its UV tile (the tile's edge counting as a border) sets a linear gradient; Smoothness blurs it with the empty space around the islands, softening the borders towards black; balance and contrast act like the global controls. The gradient is built once per UV layout and setting and cached. On the test gun it matches the reference within 0.002 to 0.011 mean error on every captured setting. Commands only; the picker leaves it out until its panel is designed.
2026-11-24 12:09:41 +00:00
Rebornim 0ab43ea76c Generators: 3D Linear Gradient between a start and an end point
A new kind with the reference's controls: 3D Position Start and End (0 to 1 across the mesh's bounds, scaled evenly like 3D Distance; bottom to top by default), Balance, Contrast and Invert. The value is how far along from the start to the end a texel lies, balanced and contrasted like the global controls; on the test gun it matches the reference within 0.001 on every captured setting, as 3D Distance does. It shares 3D Distance's command module; each refuses the other's controls, and both refuse the earlier model's and the global ones. Commands only: picking the points on the mesh and the panel come with its mock.
2026-11-24 12:09:41 +00:00
Rebornim 815bdb2e47 Generators: 3D Distance, white around a point fading over a radius
A new kind with the reference's controls: Position X, Y and Z across the mesh's bounds (scaled evenly, the longest side spanning 0 to 1, as the reference's position map is), Radius, Offset, Contrast and Invert. The value falls from 1 at the point to 0 at the radius and is then slid through by a histogram scan (offset 0 all black, 1 all white; contrast 1 a hard edge); it matches the reference within 0.001 on every captured setting. It reads its Position input like Position does, has no earlier model or global controls (both refused), and swapping onto it drops the earlier offset. Commands only: the picker leaves it out until its panel is designed.
2026-11-24 12:09:41 +00:00
Rebornim 73900d4252 Generators: Micro Details add a height or normal image's curvature and occlusion
Curvature, Ambient Occlusion and the three wear kinds take the reference's Micro Details: Use Micro Details (Curvature and Ambient Occlusion), Micro Height, Micro Normal, Curvature Type (Standard, Sobel, Smooth), Curvature Intensity, Height Details Intensity, AO Radius and AO Depth, with the images as the microHeight and microNormal inputs of effect.set (an image or a value; an empty slot reads black). Fitted to the reference app: the micro height becomes a normal, and that normal's divergence (Smooth: the height against blurred copies of itself) is added to the curvature input before the detail sizes blur it, with a small per-type lift; the micro normal adds its own divergence. Ambient Occlusion is multiplied by a horizon occlusion of the micro height over 16 directions. Both are built once per mesh map, image and settings and cached; derivatives and radii are per texel at 2K, so the look holds across resolutions. Off by default, so existing projects render as before; the controls move an earlier-model generator onto the reference's controls, are refused on kinds without them, and the images stay across swaps between kinds that have them.
2026-11-24 12:09:41 +00:00
Rebornim 31e834c10d Wear generators: Use Custom Grunge reads an image instead of the kind's own grunge
Metal Edge Wear, Fiber Glass Edge Wear and Dirt take the reference's Use Custom Grunge switch and its grunge image (effect.set input: grunge). Once on, the image's gray replaces the kind's built-in pattern, fitted to the reference app: repeated grunge-scale times across the UV square from half way across the image, or across the mesh's bounds when triplanar; mid gray adds nothing, a brighter image wears edges more and leaves less dirt; the seed leaves it in place. An empty slot reads black. The image moves an earlier-model generator onto its wear controls, is refused on kinds without them, counts as a used resource and stays across swaps between wear kinds. Use Texture and the custom grunge share one slot placement; a generator's texture is boxed so the generator effect stays small.
2026-11-24 12:09:40 +00:00
Rebornim 922c8e8a7a Generators: Use Texture on Curvature, Ambient Occlusion, Position and World Space Normals
A texture blends over the section-adjusted signal before the global controls: read in UV (scaled about the centre) or triplanar, turned gray by one of eight conversions, inverted, contrasted and brightened, then blended by one of ten modes at its opacity. Its image is the texture input of effect.set; an empty slot reads black. The panel shows Use texture at the end of Parameters, the texture's rows once it is on, and its slot first in Image inputs.
2026-11-24 12:09:40 +00:00
Rebornim 38f2f66719 Generators: the offset belongs to the earlier controls
Like level, softness and noise, the offset keeps a generator on its earlier controls, and moving onto the wear, section or light controls drops it, so no unseen shift stays under controls without an Offset.
2026-11-24 12:09:40 +00:00
Rebornim 35ac5bc2ea Generators: Position and Light read the mesh bounds, review fixes
Position and Light read the mesh's own position across its bounds (an
image in the Position input still overrides it): the baked Position map's
normalisation is a bake setting, bounding sphere by default, which
squeezes the reference's 0..1 per axis. The light dials start at 0 on the
left and turn clockwise like the reference's. Commands refuse an input
the generator does not read and `direction` on kinds that point no way;
the detail size hint follows the sizes in use; tests check the exact blur
radius, a blurred position and the axis dropdown by its section.
2026-11-24 12:09:40 +00:00
Rebornim 02bda17b9f Generators: Light on the reference's angles, highlight and attenuation
Light takes the reference app's controls: a horizontal and a vertical angle, each a dial beside
an Angle slider in degrees, highlight glossiness and level, and light attenuation. It shades
the world space normal (else the mesh's normal) towards the light and fades the side away from
it across the position map (else the mesh's bounds); invert shades the far side instead. Both
maps can read an image input instead, and Light has no global adjustments. Light generators saved
before keep their level, softness, noise and direction and render as before; a light control
moves one onto the new controls.
2026-11-24 12:09:40 +00:00
Rebornim 05a0ff5118 Generators: Position, World Space Normals and Curvature/AO sections on the reference's controls
Curvature, Ambient Occlusion, Position and the new World Space Normals take the reference
app's section controls under the global ones: invert, blur (occlusion and normals), balance
(a power curve on position and normals, linear on occlusion), contrast and brightness, and for
position and normals three axes, each inverted, blended over the others with its own mode and
weighted. Position reads the baked position map, else the mesh's bounds; World Space Normals
the baked world space normal, else the mesh's normal; both can read an image input instead.
Generators saved before keep their level, softness and noise and render as before; a section
control moves one onto the new controls, and level, softness, noise or direction move it back.
The curvature section names its detail sizes Sharp to Huge and its modes Dual and Unprocessed;
the global invert is a False/True button.
2026-11-24 12:09:40 +00:00
Rebornim d7d9f7bc43 Generators: global blur reaches 72 texels at 2K
The widest global blur matches the reference's: 16 steps of 4.5 texels at 2K, up from 64.
Global blur is new in this pass, so no saved project changes.
2026-11-24 12:09:40 +00:00
Rebornim 2539643ad9 Curvature sizes: comment without a trailing period 2026-11-24 12:09:40 +00:00
Rebornim 4d00158fdb Wear generators: no dead controls
Edges smoothness reached the widest blurred curvature level at about 7 of 16, so the rest of
the slider changed nothing: two wider levels cover the whole range. Ambient occlusion masking
below 0.14 masked nothing on Metal Edge Wear. Mode and sizes on a new Metal Edge Wear and global
blur, balance or contrast on the wear controls were accepted and ignored; they now keep the
earlier model or are refused, as are wear controls a kind doesn't have. Only the blurred levels
a generator reads are built. The labels before the reference's names parse again.
2026-11-24 12:09:40 +00:00
Rebornim fdd2d72b7c Fiber Glass Edge Wear: its seed breaks the woven grunge up differently
The weave the fibreglass grunge uses has no seed, so changing the seed changed nothing.
A seeded grunge now varies the weave's strength, and a test checks every wear kind's
grunge changes with the seed.
2026-11-24 12:09:40 +00:00
Rebornim 606fa32106 Generators: Metal Edge Wear, Dirt and Fiber Glass Edge Wear on the reference's wear controls
The wear kinds take the reference app's controls (wear level and contrast, grunge amount and
scale, triplanar, edges smoothness, ambient occlusion masking, curvature weight, edges masking),
computed from curvature, its blurred levels, ambient occlusion and a grunge pattern of our own
per kind. Fiber Glass Edge Wear is a new kind. Generators saved before keep their level, softness
and noise and render as before; editing a wear control moves one onto the new controls, and
level, softness or noise keep an added one on the earlier model.
2026-11-24 12:09:40 +00:00
Rebornim 471b21cb7d Generator picker: the reference's names on orb thumbnails, swapping the kind in place
Generators carry the reference app's names (Metal Edge Wear, Ambient Occlusion, Light, Position).
The generator slot opens the shared resource picker with each kind rendered as a mask on the
smart masks' preview orb, a die on seeded kinds, larger thumbnails and no current-item outline.
Thin areas stays loadable but is no longer offered. effect.set {generator} swaps a generator's
kind in place, keeping its position, blending and opacity.
2026-11-24 12:09:40 +00:00
FredApps 021ff6fe8b Merge pull request #794 from storytold/context-menu-parity
Align top menus, default workspace, and dialogs
2026-11-24 12:00:16 +01:00
FredAppsandClaude Opus 5.5 039b454867 Keep the resizable Export window from widening itself every frame
The Output templates and List of exports tabs size their columns from the
window's width, and some of their rows are a little wider than the column.
In the fixed-size window that overflow was clipped; in the resizable one it
widened the window, the next frame's columns took the new width, and the
window grew each frame until it ran off the screen, so clicks and hovers
missed their controls (nine export tests failed).

- The tab body lays out in a child area fixed to the body's rect, so an
  overflow is clipped as before and cannot widen the window.
- Each output map card takes the column's width; it took the width the
  card before it left, so every card was 9 points wider than the last.
- The input maps column is 210 points, wide enough for its naming-pattern
  row; at 170 its info icon was outside the window.
- The Save template and Load UI Layout pickers keep the reference titles
  the tests check ("Save template", "Select a UI layout file.").

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 11:03:23 +01:00
FredAppsandClaude Opus 5.5 b57657438c Drop CodeRabbit's marker comments from the protocol doc
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 09:05:50 +01:00
coderabbitai[bot] b6b761da86 Fix session log persistence and defer the sample project save prompt until selection
<!-- coderabbit-ai-generated:v1 -->
2026-11-24 08:01:32 +00:00
FredAppsandClaude Opus 5.5 e604486216 Bound the session log folders and import MaterialX from Import Resources
Each desktop run made a new logs/session-* folder that was never removed,
so the logs folder grew with every start. Starting a run now removes all
but the newest earlier runs' folders, keeping ten in all.

Removing File > Import MaterialX material... left no way to import a
.mtlx from the GUI. Import Resources now lists .mtlx files and imports
them as file.importMaterialX does, as a fill layer. The protocol doc no
longer points at the removed Import PBR texture folder item.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 08:48:18 +01:00
chasse20 6bc4f3cafc Fix sample project picker and menu review findings 2026-11-24 02:23:29 -05:00
Chris Hassebrook 998e68da74 Merge pull request #788 from vangel76/feat/786-export-usd-asset
Export textures can write the model as a USD file that uses the exported textures
2026-11-24 00:40:47 -05:00
Dylan M. Taylor 9f955aabb6 Write TextureCraft browser downloads through craft-zip (#792) 2026-11-23 23:52:57 -05:00