Commit Graph
296 Commits
Author SHA1 Message Date
chasse20 091869033a Auto: Preflight export paths and label tiled atlas previews
Reject selections that use one output path as both a file and a folder before rendering or starting a desktop export. Expose tile metadata in export.plan and use it to label atlas previews, including ambiguous filenames.

Write quantized 8-bit PSD rows directly into the merged-image buffer. Cover path conflicts in both orders, partial desktop writes, and visible atlas captions with regression tests.
2026-11-28 00:21:21 +00:00
RebornimandClaude Opus 5.5 088a217d7b Merge main into feat/export-pass
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 23:00:30 +00:00
chasse20 03edcaa1c6 Auto: Integrate main into the reviewed IOR changes
Preserve the approved IOR save and reflectance changes alongside main’s per-project autosave names, opt-in mesh normal recomputation, and legacy generator inspection. The prepared merge required no manual conflict resolution.
2026-11-27 04:59:40 +00:00
aiongg d6dfd69bcd Merge pull request #850 from Ap3pp3rs94/feat/mesh-export-recompute-normals
feat(mesh): make normal recomputation a real export option
2026-11-26 18:01:18 -05:00
vangel76 da7dab8118 Merge storytold main (1f77416a) into feat/749-ior-specular-f0 2026-11-26 21:55:19 +01:00
ATOM 0fbfec1c3d fix(mesh): weld recomputed normals and make export opt-in 2026-11-26 10:36:05 -06:00
chasse20 ae51095d55 Auto: Integrate main and bind save completion to its project
Preserve rebuilt UVs, undoable bake meshes and the shared window-close path. Keep each close and save dialog with its requesting project, wait for pending writes before restart, and leave already saved edits clean after a later stroke is canceled.

Capture archive inputs once, share encoded mesh buffers and release parsed bake geometry before writing. Split the new save types into dedicated files and cover project replacement, restart eligibility and snapshot lifetimes with regressions.
2026-11-26 15:09:23 +00:00
FredApps 6b64c5b9af Merge main into feat/export-pass 2026-11-26 09:05:57 +01:00
FredApps 2cbbebfd3f Preserve texture set hover in the IOR branch merge 2026-11-26 08:27:47 +01:00
Rebornim c58fd59547 Export: a tiled map's UDIM name pattern is expanded once per map, not once per tile 2026-11-26 03:56:38 +00:00
Rebornim 48dc483215 Export: a PSD layer is quantized to RGBA as it widens, without a floating-point RGBA copy 2026-11-26 03:50:04 +00:00
aiongg 8180c82fab Merge storytold main (3c026860) into the minimal port 2026-11-26 03:21:25 +00:00
Rebornim 61c601e040 Export: a PSD planning warning outlives the file that carried it when reserved or repeated names drop that file 2026-11-26 02:33:55 +00:00
chasse20 21b86d98f6 Auto: Validate rebuilt UV layouts and trim save and reload allocations
Integrate main's dialog and bake-state changes. Reject inconsistent saved layouts at archive and session boundaries, and preserve vertex splits between independently packed materials.

Stream UV coordinates in bounded batches, transfer stored mesh bytes on successful reopen or reimport, and skip import reports that those callers discard. Set the archive version on the owned save snapshot to avoid copying the layer graph twice.

Cover material boundaries, malformed snapshots, locked coordinates and keyboard activation. Update the format and command documentation.
2026-11-26 01:03:44 +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 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
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
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
aiongg 8a83057ac3 Repin craft-libs to storytold next 8fa4db64a9 and egui to b9770908e 2026-11-25 19:15:14 +00:00
aiongg 8af1bf8456 Repin craft-libs to storytold next aa401985d 2026-11-25 15:52:23 +00:00
aiongg 4292f553f5 Repin craft-libs to storytold next d1bdf8e5da 2026-11-25 13:44:23 +00:00
FredApps 6b6d77ae4e Merge main into IOR specular reflection branch
Preserve the current export template tests and the authored Specular/Glossiness IOR regression.
2026-11-25 11:19:25 +01:00
vangel76 ce2718a139 Test the IOR specular setting across projects, templates, export and shading
Round-trips cover project save and reopen, older projects and templates without the
field, and template save and apply. The F0 export is checked against the CPU tracer's
Metallic/Roughness F0 at IOR 1.8 in both modes; the GPU tracer is compared with the
CPU tracer and the viewport with and without the setting. Specular/Glossiness export
and shading stay identical with the setting on.
2026-11-25 10:53:03 +01:00
aiongg 1d855c734f Merge main into the minimal port
Conflicts: apps/texturecraft/src/main.rs (kept the port's Decision/frame_guard/framework::install and main's exit hook, Nightly banner and os_window identity; dropped macOS movable), crates/ui-egui/src/lib.rs (kept both mods), crates/ui-egui/src/titlebar.rs (kept PREFIX and NIGHTLY_ICONS). Added install_headless to main's two new test harnesses.
2026-11-25 06:35:30 +00:00
aiongg a85b1437aa Repin craft-libs to storytold next 16001e7210 and egui to storytold b15ffe9bfc 2026-11-25 06:31:20 +00: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 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 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 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
FredApps 6c72fcb34e Fix Windows test cfg gate for write_batch_atomic_in_dir_with_hook 2026-11-25 10:22:16 +07:00
FredApps 0535d1ddc6 Export templates: reject file/folder conflicts and confine writes with cap-std 2026-11-25 10:11:54 +07:00
vangel76 a59e29bea1 Space the UV layout guards 2026-11-25 00:55:25 +01:00
vangel76 8f60ded96f Save the rebuilt UV layout in the project file
A project with rebuilt mesh UVs now stores the UV of every triangle
corner in uv_layout.bin. Reopening and reimporting the project's own
mesh apply that layout instead of running the unwrapper again, so a
later unwrapper change cannot move saved paint. A format 4 project
with rebuilt UVs but no valid layout is refused.
2026-11-25 00:42:46 +01:00
vangel76 f4a8283d74 Export templates: subfolders and spec-based URP/USD templates 2026-11-25 00:15:22 +01:00
vangel76 65bd175d05 Merge upstream main into fix/725-background-project-save 2026-11-24 22:57:52 +01:00
aiongg f86ed91063 Repin craft-libs to 283490a083: a rail popup dragged onto a tab strip docks its panel 2026-11-24 20:15:56 +00:00
aiongg dcbdd00650 Repin craft-libs to 9fd8b0cdaa 2026-11-24 19:12:39 +00:00
aiongg 172d85528d Repin to craft-libs 3ad64a26ea: rail drag hand-over through DockArea::continue_move, Delete and Backspace apart through the keymap, Answer::Saved 2026-11-24 17:07:48 +00:00