Commit Graph
1318 Commits
Author SHA1 Message Date
Rebornim abe73ab180 Export: each greyed bit depth list has its own id
disabled_combo took its id from the label alone, so two Output maps rows with a one-depth file type (BMP, JPEG) clashed and shared one accessibility node (review on #827). It is now salted with the row's own id, as the enabled bit depth list is.
2026-11-26 00:52:32 +00:00
Rebornim 254868413e Export: the hover preview is no larger than the map's own size
MapPreview bounded its side only by the requested side and the composite, so a map with its own size (or a smaller export size) previewed larger than the file it writes (review on #827). The file's longer side, from the map's own size, else the export size, now bounds it too.
2026-11-26 00:52:32 +00:00
Rebornim 67ac6e65e4 Export: a glTF specular/glossiness file stays RGBA without a glossiness channel
KHR_materials_pbrSpecularGlossiness reads glossiness from the specularGlossinessTexture's alpha, so a set with specular but no glossiness wrote an RGB file the extension can't use (review on #827). A glossiness alpha the set lacks is now written fully glossy, the extension's glossinessFactor default of 1.
2026-11-26 00:52:32 +00:00
Rebornim 5032edca95 Export: PSD memory budgets only in the browser; a desktop PSD renders a layer at a time
An 8192 PSD of one map and a 4096 "Separate maps" PSD were refused on desktop by the 2 GiB working budget and the 1 GiB batch budget, which main never had (review on #827). Both budgets are now a browser tab's only (PsdBudget::WEB on wasm32); the 30000 px side and 2 GiB file limits stay everywhere.

The merged image is no longer a floating-point canvas: it is built a row at a time from the quantized layers, so only the layer being rendered is in floating point. Peak working bytes by the code's own accounting (default infinite padding):
- 8192, one map, 8-bit: 2.75 GiB (2 GiB source and layer, 512 MiB file, 256 MiB padding); before, 3.75 GiB with the 1 GiB float canvas
- 4096, "Separate maps" on the default 5-channel set: 2.31 GiB at its 16-bit document depth, 1.19 GiB in 8-bit (the encoder's 3x file bytes dominate)

A PSD that cannot be planned no longer stops the set's other files: list_outputs leaves it out with a warning on the set's first file, and is an error only when the PSD was the set's only output.
2026-11-26 00:52:21 +00:00
Rebornim f67270d6ae Export: JPEG 2000 back to greyed; its writer moves to craft-libs
The j2k/jp2 writer is a codec, so it goes to craft-image-codecs first (review on #827); the export wires it in again once craft-libs ships it.
2026-11-25 23:10:25 +00:00
chasse20 b965b750f7 Auto: Fix export planning, previews, and file-list scrolling
Disambiguate colliding PSD filenames and budget only the documents retained for export. Match grayscale WebP previews to the encoded channels and make wide export details reachable by scrolling.

Document built-in preset selection and verify declared JPEG 2000 component precision. Focused Linux tests, affected-package Clippy, and WebAssembly checks passed.
2026-11-25 23:10:17 +00:00
chasse20 a53bba9af6 Auto: Integrate main’s shared Nightly launcher
Bring in the shared Linux Nightly tarball launcher, its contract tests, and the packaging documentation. Preserve the approved PSD batch export and template settings repairs.
2026-11-25 22:40:05 +00:00
chasse20 7d59a82e1b Auto: Fix PSD batch exports and preserve template settings
Bound retained PSD output and preserve document names, layer names, and preview channels. Keep saved presets and draft map overrides usable, report explicit grayscale J2K colour spaces, and let active picks handle Escape first.

Validated with local export regressions, Clippy, layering, and WebAssembly compilation.
2026-11-25 22:35:31 +00:00
skylar taylor-barrick dcf91a4f05 Use the shared nightly launcher template (#835)
Renders the plain nightly tar's launcher from craft-common-actions' shared template.

Independent check: dylanmtaylor compared all 14 app launcher PRs byte for byte with the template rendered from the registry (https://github.com/storytold/craft-common-actions/pull/367#issuecomment-7172085284); this head was re-checked against craft-common-actions main 88148a5.
2026-11-25 16:17:41 -06:00
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