Commit Graph
1309 Commits
Author SHA1 Message Date
chasse20 47c6ea8f21 Auto: Fix headless export options and reduce export memory use
Integrate main and honor per-map sizes and shader sidecars through MCP. Preserve texture writes when an optional sidecar fails, and cover both outcomes through the tool transport.

Bound layered PSD working memory, preserve set and UDIM names, and report effective dithering. Match previews to stored channels and identify linear grayscale JP2 samples correctly.

Reuse sample buffers, cache unchanged template plans, and share identical grayscale preview textures. Remove the obsolete direct XML dependency. Apply the maintainer’s preset attribution decision and retain the ICC credit and codec notices.
2026-11-25 21:48:17 +00:00
Chris Hassebrook 2d86cc04ba Merge pull request #799 from Rebornim/feat/bake-pass-2
Bake mode pass 2: settings layout, bakers list, sync, automatic cage and map preview
2026-11-25 15:34:55 -05:00
Chris Hassebrook c064acb9c9 Merge pull request #826 from Rebornim/feat/generators-pass-c
Generators on the reference app's controls, seven new kinds, and a live preview
2026-11-25 15:07:52 -05:00
chasse20 2a765088c6 Auto: Fix export bounds, preview allocations, and dialog controls
Preserve native PSD layer sizes and UDIM suffixes, validate the canvas before allocation, and keep MaterialX and USD references compatible with the exported files. Record linear JP2 data correctly and protect browser shader sidecars from path collisions.

Borrow preview coverage, reuse built-in presets, group PSD plans by tile, and avoid redundant codec and diffusion buffers. Release preview textures on dismissal and keep map controls reachable, distinguishable, and readable across themes.

Integrate main's layer menus and Cargo debug configuration. Update dependency notices, preset attribution, and export documentation.
2026-11-25 19:55:35 +00:00
chasse20 54ae40b14a Auto: Integrate main and fix bake selection and preview lifetimes
Validate every selected texture set before starting a real or quick bake. Apply linked settings atomically, reject invalid copy selectors, and preserve only the maps needed by a display preview.

Reuse fitted geometry across streamed maps, bound cage projection scratch, and stop discarded work. Release stale scene and thumbnail resources on project replacement. Keep pending imports safe across updates and restore keyboard focus after bake menus and dialogs close.

Add regressions for selection, cancellation, project replacement, and keyboard navigation. Retain main's packaging, dependency, and export changes.
2026-11-25 19:55:33 +00:00
chasse20 fc04f96857 Auto: Integrate main and fix generator masks, caches and previews
Resolve Micro Height against the requested draw and current atlas layout. Invalidate whole-map fields after geometry edits, reuse admitted fields across tiles, and stop rust runoff at gaps between UV islands.

Render configured preview inputs, cancel evicted image requests, and clear stale previews and point picks when the project changes. Reduce temporary curvature fields and repeated occlusion sampling work.

Preserve generator IDs and saved values while updating picker wording. Consolidate generator regression tests and credit the Nightly icon set inherited from main.
2026-11-25 19:25:49 +00:00
aiongg 71e2e3f2bc Merge pull request #834 from aiongg/ci-dep-line-tables
Dependencies keep line tables in dev and test builds
2026-11-25 08:33:00 -05:00
aiongg a8538b761a Dependencies keep line tables in dev and test builds 2026-11-25 13:31:26 +00:00
Rebornim eda6f834de Generators: a whole-map field's sampled mesh map is a type of its own (clippy type_complexity) 2026-11-25 07:42:35 +00:00
Rebornim 5f33d84f1e Generators: only the session's own composite drops anchor heights it no longer reads
Thumbnails, solo layers and histograms evaluate cut-down stacks without
every reader: they now build only missing heights and drop none, so a
thumbnail refresh no longer throws away the viewport's. Doc full stops on
the touched preparation functions.
2026-11-25 07:40:42 +00:00
Rebornim 0d1f687b9a Generators: a histogram's cut stack reads the anchor heights the whole stack prepared
A histogram evaluates the stack cut below an effect: it rebuilt every
anchor height under the cut's stack key, replacing the viewport's, so the
next render built them again. A cut now builds only heights that are
missing and leaves the set's prepared ones as they are. Review tidying:
blank lines, histogram scan comment, the field cache test reads the
cache's size.
2026-11-25 07:35:22 +00:00
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
Chris Hassebrook 14f6502029 Merge pull request #771 from vangel76/fix/layer-target-menus-768
Layers: open context menus from material and mask thumbnails
2026-11-25 01:07:29 -05:00
Rebornim 3b56a8e6b3 Export: Sketchfab Metalness (separate maps) template, one map per Sketchfab metalness channel with DirectX normals, Sketchfab's default
Based on #258 by Aalzard.
Spec: https://help.sketchfab.com/en/articles/16152630-pbr-maps, https://help.sketchfab.com/en/articles/16152634-materials-pbr and https://help.sketchfab.com/en/articles/16152621-normal-map-bump-map
The base color has no alpha: Sketchfab's docs don't say its opacity reads it.
2026-11-25 05:49:03 +00:00
Rebornim ba6dcf5240 Export: Roblox SurfaceAppearance (separate maps) template, colour with opacity in alpha, OpenGL normal, metalness and roughness, named with the suffixes Roblox's reimport assigns
Based on #258 by Aalzard.
Spec: https://create.roblox.com/docs/art/modeling/surface-appearance, https://create.roblox.com/docs/art/modeling/texture-specifications and https://create.roblox.com/docs/art/modeling/reimport
Roblox's MaterialVariant gets no template of its own: its docs don't say whether it reads the colour map's alpha, the only difference the old one made.
2026-11-25 05:49:03 +00:00
Rebornim 498394a11d Export: Redshift Standard Material (separate maps) template, one map per Standard Material input the texture set has, normals in OpenGL as Redshift expects
Spec: https://help.maxon.net/r3d/maya/en-us/Content/html/Standard_Material.html and https://help.maxon.net/r3d/maya/en-us/Content/html/Bump+Map.html
2026-11-25 05:49:03 +00:00
Rebornim 0d1df0580e Export: glTF Specular Glossiness (archived extension) template, a specular/glossiness set's diffuse with opacity and its specular with glossiness in alpha, as Khronos' archived extension lays them out
Spec: https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Archived/KHR_materials_pbrSpecularGlossiness/README.md
Only the set's own Specular and Glossiness channels are written; converting a metallic/roughness set is left out, since no target documents that conversion.
2026-11-25 05:49:03 +00:00
Rebornim f165f47699 Export: Unreal Engine Subsurface Profile (Packed) template, the packed Unreal maps plus a SubsurfaceMask map of the scatter weight for the material's Opacity input
Spec: https://dev.epicgames.com/documentation/en-us/unreal-engine/subsurface-profile-shading-model-in-unreal-engine
2026-11-25 05:49:03 +00:00
Rebornim e2db799bec List of exports: the file tree on the frame colour beside the console
The tree sits on the frame colour, its scroll bar in a strip at its right: each set a bold name
after its chevron, its files indented and the size, file type and bit depth columns placed after
the longest file name, each file's path as tooltip. The fold strip (») has the window's colour
with a divider before the console; the console's "Console" header sits on the window colour, its
lines on the frame colour. Open output directory sits at the tab row's right, 9 px above the
divider. The console's least and starting width is the reference's at TextureCraft's window width.
2026-11-25 05:49:03 +00:00
Rebornim bde768fdf7 Output templates: the reference's columns and swatch colours, aligned map cards and a used map's square
The tab lays out on the reference's columns: Presets (built-in templates with a locked file glyph, the
selected one in the frame colour and bold, no accent), the outputs 10 px from both dividers, and
the Input maps and Mesh/Converted maps panes keeping their width at the window's right. Output map
cards are 48 px with a 6 px inset: grip, name field cut at the front while not typed in, "$", the
channel swatches in the reference's colours moved onto TextureCraft's window colour with their
channel's underline, then file type over bit depth on one column beside duplicate and remove. A
built-in template's cards keep their full look (its lock says it is read-only). A map an output
reads shows a small square of its colour; Converted maps are plain text. The drag hint is the map
entries' tooltip, and the count strip reads "N output maps will be exported".
2026-11-25 05:49:03 +00:00
Rebornim a0d996fc0c Export textures: the window's look and the Settings tab on the reference's columns, with sentence-case tabs and the bottom bar
The window's own look (export_window/export_look, drawn): controls a step darker than the window
with a light edge, hovered and lit faces a step lighter, boxed checks, rounded sentence-case tabs that
open into the body, orange only on Export, scroll bars in a 12 px strip beside each list.
Settings lays out on the reference's columns and pitches: the texture set list (the selected row
in the frame colour with a light edge), General Export Parameters with Normal map format and
Color space under Padding (Color space says in its tooltip that data maps stay linear), the
output directory as a field with "…", the extra-file ticks under the parameters, and a set's
page with one pen column for its parameters and its Output maps rows. The tab row's right-hand
control sits 9 px above the divider. ui_snapshots export_window_snapshots captures every tab at
the reference window size.
2026-11-25 05:49:03 +00:00
Rebornim 276f5d9f78 Output templates: hovering a channel swatch shows the file its output writes, small, with each channel and its source; export.preview samples one output map 2026-11-25 05:49:03 +00:00
Rebornim 20270b4f38 Export textures: Esc closes the window as Cancel does, after an open list, rename or channel question
Fixes #284
2026-11-25 05:49:03 +00:00
Rebornim b569f3dbe8 Export textures: Export shader settings writes <project>_shaders.json, the shader's model and settings and the texture sets using it
The tick is saved with the export settings like Export USD asset; the window sends every texture set of the export with its last command (shaderParameters of file.exportTextures), and the browser adds the file to its download.
2026-11-25 05:37:55 +00:00
Rebornim 269bfb0270 Export: an output map can have its own size, which wins over the export size
A texture set's Output maps row has a size list (Export size, or 128x128 to 8192x8192); file.exportTextures and export.plan take it as maps[].size, and a PSD is as large as its largest layer.
2026-11-25 05:37:55 +00:00
Rebornim c561a0578f Export: PSD file type writes every output map of a texture set as a layer of one file
The layers and the merged image are written with craft-psd's PsdBuilder. The USD asset and MaterialX leave the PSD out (with a warning for the USD asset).
2026-11-25 05:37:55 +00:00
Rebornim 7a3b95e798 Export: JPEG 2000 file types, lossless, as a raw codestream (j2k) or a JP2 file (jp2)
Encoded by the j2k crate (MIT OR Apache-2.0, pure Rust; craft-image-codecs only reads JPEG 2000), which needs Rust 1.96, so the README asks for 1.96.
2026-11-25 05:31:29 +00:00
FredApps 201f32fac4 Merge pull request #824 from vangel76/feat/export-templates-clean
Export templates: subfolders in file names and spec-based URP and USD templates
2026-11-25 05:50:18 +01:00
FredApps f9ba93a7be Give each confined export temp a unique short id
A directory-scoped batch previously reused one .export.{pid}.{attempt}.tmp
namespace of 256 names for every staging file and backup. Exports larger
than that limit, or overwrites of about half as many existing files, failed
even when every output path was valid. Each allocation now gets its own
short identifier, while the collision retries stay within that namespace.
2026-11-25 11:07:53 +07:00
FredApps 77850f6374 Use a short temp name for confined export writes 2026-11-25 10:54:11 +07:00
FredApps 0e1d9dfff1 Export templates: reject in-tree symlink folder aliases
Stage capability-scoped temps in the output root so the mid-batch
escape test can actually install a parent symlink, and refuse
export folders that are symbolic links so two names cannot resolve
to the same file.
2026-11-25 10:43:23 +07:00
Rebornim d2a4b44a1d Back-to-back cage test: chunk the indices with as_chunks_mut 2026-11-25 03:33:19 +00:00
FredApps 6c72fcb34e Fix Windows test cfg gate for write_batch_atomic_in_dir_with_hook 2026-11-25 10:22:16 +07:00
Rebornim c4958764f1 Automatic cage: fit along a vertex's own normal where welding cancelled it
Parts welded back to back (or a double-sided sheet) sum to a zero averaged normal; the transfer ray there falls back to the surface normal, so the fit now measures along the vertex's own normal too instead of finding no direction and keeping only the padding
2026-11-25 03:21:35 +00:00
FredApps 0535d1ddc6 Export templates: reject file/folder conflicts and confine writes with cap-std 2026-11-25 10:11:54 +07:00
FredApps 454fb75295 Merge remote-tracking branch 'origin/main' into pr-824 2026-11-25 09:51:09 +07:00
Rebornim e0c4fc49e9 Map-alone bake test: clear the colours the sample read when it baked 2026-11-25 02:36:37 +00:00
Rebornim 1d7669c038 Bake mode pass 2: synced sets check only that their values agree
The edited set's checks already bound every value it changes, so a legacy value it may keep (flat parameters, presets) also reaches the sets sharing it; a synced set is refused only when a copied value clashes with its own, such as a minimum above its maximum. Also fixes the new tests' sample resolution and a clippy lint
2026-11-25 02:22:41 +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 d9f43048c5 Bake mode pass 2: review fixes, critic round 1
- Partner validation skips the edited sets and is set apart by blank lines
- A drag whose pointer left the window starts a new line on its return
- Tests for a legacy preset on synced sets and for each sync source rule
2026-11-25 02:02:05 +00:00
Rebornim 582c6853b5 Bake mode pass 2: review fixes
- Automatic cage: coincident vertices of different mesh-name groups keep separate distances
- A sync edit fails, changing no set, when a partner's merged settings would be invalid
- A high poly read during a paint stroke is added once the stroke ends, so its cancel or undo keeps it
- Quick bake and the map preview read the low poly's colours for the requested map even when it is unchecked
- The set picker's differing-values note compares with the set bake.sync will take settings from
- Map thumbnails redraw when the UV tiles' scales change
- Checkbox drags start on the primary button only and reach rows crossed between two frames
- A long texture set name or folder is cut to fit its row
- Map preview tests require a new picture, not just a missing one
2026-11-25 01:57:26 +00:00
Rebornim 577981a3d2 Generators: the enlarged preview first opens beside the small one 2026-11-25 01:44:17 +00:00
Rebornim 99c14baaed Map preview tests wait up to a minute for a bake, not a fixed number of frames 2026-11-25 01:38:54 +00:00