Commit Graph
76 Commits
Author SHA1 Message Date
chasse20 368731f7a4 Fix Clippy checks and clean up affected functions 2026-11-10 05:33:20 -05:00
chasse20 a5f09109ea Merge main into PR 234 2026-11-10 05:33:20 -05:00
Chris Hassebrook be989fba6f Harden baked map imports and fix TGA decoding 2026-11-08 08:58:07 +00:00
vangel76 d8ecfb7d42 Merge upstream/main into fix/clippy-chunks-exact-to-as-chunks 2026-11-08 02:27:35 +01:00
chasse20 747068dbdf Fix bake settings and UV tile controls 2026-11-05 22:39:42 -05:00
chasse20 b978bc9525 Recover older project settings 2026-11-04 18:57:05 -05:00
vangel76andClaude Sonnet 5.5 81281c1a0a Merge upstream/main into fix/clippy-chunks-exact-to-as-chunks
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>
2026-11-05 00:06:23 +01:00
chasse20 18a3c98176 Implement clean-room bake settings and improve map accuracy 2026-11-04 03:57:46 -05:00
chasse20 e4405760f1 Major refactor of Bake Mode settings and some UI, lots of cleanup for parity 2026-11-04 02:15:08 -05:00
vangel76andClaude Sonnet 5.5 715baf4760 Use as_chunks where the chunk size is a constant
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>
2026-11-04 01:36:12 +01:00
Brandon Thomas f31e6e1078 Merge remote-tracking branch 'origin/main' into upd-166
# Conflicts:
#	crates/formats/src/mesh_import/tests.rs
2026-11-02 19:25:11 -05:00
Brandon Thomas 448c975412 Merge pull request #164 from Silvertree2010/fix/h5814-obj-export-writes-the-model-name
Keep OBJ and MTL header comments on one line
2026-11-02 19:25:01 -05:00
Brandon Thomas c6dbadee5a Merge pull request #163 from Silvertree2010/fix/h5835-ply-import-rejects-valid-files-w
Fix PLY import when face element precedes vertex element
2026-11-02 19:24:56 -05:00
Brandon Thomas f07930ca8b Merge pull request #151 from Silvertree2010/fix/h5395-export-fails-to-write-files-whos
Fix export failing for file names with a max-length stem
2026-11-02 19:24:52 -05:00
Brandon Thomas 0db4a0cdba Merge pull request #144 from Silvertree2010/fix/h5360-saving-a-project-fails-when-two
Make zip entry names unique when saving bake meshes and resources
2026-11-02 19:24:47 -05:00
BFlat 52c0fb3e5b Merge pull request #169 from storytold/export/obj-companion-stems
OBJ exports whose names sanitize alike keep their own MTL and maps
2026-11-02 22:00:13 +07:00
bflatastic 73031031a3 OBJ exports whose names sanitize alike keep their own MTL and maps
`ball 1.obj` and `ball_1.obj` sanitized to the same companion stem, so
exporting both into one folder overwrote each other's .mtl and textures. A
name the sanitizer changes now gets an FNV-1a hash of the original appended;
names that need no change keep their companions as before.
2026-11-02 21:25:46 +07:00
bflatastic 6dabe66324 Filter radii and height slopes follow each UV tile's own resolution
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).
2026-11-02 21:08:35 +07:00
NetterSilverandClaude Haiku 5.5 c233da2af7 Name unnamed OBJ parts after the file stem
Found while testing crates/formats/src/mesh_import/obj.rs:77 (model.name passed to raw.polygon); stem fallback in mesh_import/mod.rs `read`

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 14:52:17 +01:00
NetterSilverandClaude Haiku 5.5 b6aaf71920 Keep OBJ and MTL header comments on one line
Found while testing crates/formats/src/mesh_export.rs:24

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 14:48:09 +01:00
NetterSilverandClaude Haiku 5.5 6192315968 Fix PLY import when face element precedes vertex element
Found while testing crates/formats/src/mesh_import/ply.rs:164 (nverts is set at line 140)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 14:21:40 +01:00
bflatastic 15a06149d7 OBJ companions are named after the OBJ; the implicit material exports; ids are unique ignoring case 2026-11-02 19:43:54 +07:00
bflatastic c14e500298 Exported material ids and map names stay unique when names collide 2026-11-02 19:06:49 +07:00
bflatastic 92e92ff779 OBJ export writes an MTL material library with each material's maps 2026-11-02 18:20:21 +07:00
NetterSilverandClaude Haiku 5.5 f8558a2f71 Fix export failing for file names with a max-length stem
Found while testing crates/formats/src/export/mod.rs:844 (name built at 476-478)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 11:03:28 +00:00
BFlat 61637df84f Merge pull request #60 from SteamSmith/feat/bake-skew-correction
feat(bake): skew correction for high-poly transfer rays
2026-11-02 16:44:55 +07:00
bflatastic 360d70fcef Merge remote-tracking branch 'origin/main' into feat/bake-skew-correction 2026-11-02 16:10:38 +07:00
bflatastic 59a30187b5 fix(export): use is_multiple_of in the ICC profile writer (clippy -D warnings) 2026-11-02 16:09:01 +07:00
bflatastic d3453cd1f8 Merge remote-tracking branch 'origin/main' into feat/embed-colour-space 2026-11-02 15:59:33 +07:00
NetterSilverandClaude Haiku 5.5 383ce3e576 Make zip entry names unique when saving bake meshes and resources
Found while testing crates/formats/src/project_file/mod.rs:146-147 (also 180-181)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 08:58:00 +00:00
bflatastic d577a7eae8 Merge remote-tracking branch 'origin/main' into fix/review-followups 2026-11-02 15:05:10 +07:00
bflatastic d619b53712 Merge origin/main into feat/cross-app-materials
Keeps both import menu items and formats modules (MaterialX import, MaterialCraft materials); menu parity regenerated (55 of 55).
2026-11-02 14:22:37 +07:00
bflatasticandClaude Opus 5.5 2bf551f2a2 Merge origin/main into feat/cross-app-materials
Keeps both sides of the translation tables, AGENTS rules and the formats module list;
material files in the browser load before the ask-to-save step (they add a layer, not a
new project); Arabic for the eight MaterialCraft strings; menu parity regenerated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 13:45:27 +07:00
SteamSmithandClaude Sonnet 5.5 59f0ab4850 feat(export): record the chosen colour space in the exported colour maps
When file.exportTextures is given a colorSpace, colour maps carry it: an ICC profile in PNG,
JPEG, TIFF and WebP, the chromaticities attribute in EXR. TGA, BMP and HDR have no place for one
and warn. Data maps and exports without a chosen space are unchanged.

The profile is a small version 2.1 matrix/curve profile written from the space's primaries
(Bradford-adapted to D50), tested against the published sRGB colorants.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 01:38:15 -05:00
bflatastic 5e75a592b2 fix(export): keep the <UDIM> name only when it round-trips to the file name
The length limit cuts the longer placeholder at a different place than the tile number,
so a long template got a <UDIM> name that matched none of the files written. A name is
now kept only when putting the tile number back gives the file's own name.
2026-11-02 13:31:22 +07:00
bflatastic 3b1160def5 Merge remote-tracking branch 'origin/main' into fix/review-followups 2026-11-02 13:26:21 +07:00
SteamSmithandClaude Sonnet 5.5 ea4a678a0a fix(bake): bound skew painting and image size, layout only in bake mode
- SkewMap::paint refuses a stroke whose dabs would visit more than 2^26 texels, before any
  texel changes; the dab count alone didn't bound the work of a big brush on a big map.
- bake.skew.set checks the image size from its header (decode_image_within) before decoding.
- The 2D view is shown for the skew brush in bake mode only, not in rendering mode.
- Prepared::correct allows its argument count for clippy; the skew test uses its own folder.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 01:22:14 -05:00
SteamSmithandClaude Sonnet 5.5 7f7970b1fb fix: review follow-ups for MaterialX export and import, Auto-rebake and colour space
- MaterialX export: a tiled file's <UDIM> name comes from the file plan, so a set called
  cloth.1001.body keeps its name; the DirectX normal warning is raised only when a material has a
  normal map.
- colorSpace that isn't a string is an error instead of the format's default.
- MaterialX import: an image that isn't a regular file is skipped with a warning (a pipe in the
  folder would have blocked the read).
- Auto-rebake: remembers which inputs each map image was baked from, so undoing a rebake brings
  back a map that is out of date and rebakes it; not scheduled automatically on the web build,
  where a bake would run on the page's thread.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 01:14:04 -05:00
BFlat 98ad4a75ed Merge pull request #77 from test-bit-sys/fix/cli-info-builtin
cli: support builtin:<id> in info command
2026-11-02 13:02:06 +07:00
bflatastic 1fc73bc87d Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	apps/texturecraft-cli/tests/cli.rs
2026-11-02 12:33:55 +07:00
bflatastic 88c92dbf71 Merge remote-tracking branch 'origin/main' into HEAD 2026-11-02 12:23:33 +07:00
bflatasticandClaude Opus 5.5 c092e7766b MaterialCraft materials: .mcmat fills with live graph inputs
- core: Fill::link (MaterialLink: package resource, graph, exposed inputs, presets,
  image inputs, size); BakedMap::interop_id / for_input shared mesh-map identifiers
- formats: own .mcmat reader (no MaterialCraft dependency) and 16-bit mesh-map PNGs
- engine: material.load takes .mcmat and .mcraft; material.link.set / .preset / .cook /
  .saveSource; LinkJob re-cooks through materialcraft-cli at the texture set's
  resolution with baked mesh maps as graph inputs; fresh resource names per cook keep
  undo and the decoded-image cache consistent; packages count as used resources
- ui: linked-material section in fill properties (presets, sliders, colors, toggles,
  options) cooking on a worker thread, one process per layer, stale results redone;
  Open in MaterialCraft; File > Import material...; .mcmat drops; library shelf lists
  .mcmat and rescans on focus; 8 new strings in every language
- tests: materialcraft_link (import, params, undo, duplicates, mesh maps, save, and a
  real materialcraft-cli round trip when MATERIALCRAFT_CLI is set)
- docs: README, features, control protocol, architecture, AGENTS, ROADMAP, parity

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 12:12:00 +07:00
bflatastic 8e5c748c36 Merge feat/materialx-export into feat/materialx-import
# Conflicts:
#	crates/formats/src/lib.rs
2026-11-02 11:38:19 +07:00
bflatastic 74a036540e Merge remote-tracking branch 'origin/main' into pr75
# Conflicts:
#	ROADMAP.md
2026-11-02 11:26:21 +07:00
bflatastic 9d1a989efa MaterialX import: clamp uvtiling like a fill's UV scale, reuse the resource size limit
uvtiling is clamped to 0.001..=1000, the range layer.fill.projection accepts. Image files are capped by resource_cmds::MAX_BYTES instead of a second copy of the number.
2026-11-02 11:26:02 +07:00
bflatastic 76b24c4e3d Export colour space: tag MaterialX colour maps with it, warn when a colour map is not converted
The .mtlx tags colour textures with the export's colour space: srgb_texture, lin_rec709, acescg, or lin_ap0_scene for ACES2065-1 (MaterialX 1.39 has no AP0 space; the export warns). A colour map packed into one channel (L) is not converted and now says so. The $colorSpace variable's description lists every value.
2026-11-02 11:24:24 +07:00
bflatastic baf2390691 Merge feat/materialx-export into feat/export-colour-space
# Conflicts:
#	ROADMAP.md
2026-11-02 11:19:11 +07:00
bflatastic bc57653868 Merge remote-tracking branch 'origin/main' into pr50
# Conflicts:
#	ROADMAP.md
2026-11-02 11:15:32 +07:00
bflatastic cc90af09e0 MaterialX export: tag colour maps with their file's colour space, write the .mtlx atomically, warn on clashing set names
Float files (EXR, HDR) hold linear values, so their colour maps are tagged lin_rec709 instead of srgb_texture. The .mtlx goes through formats::write_atomic, and a set whose name sanitises to an earlier set's file name is skipped with a warning instead of overwriting it.
2026-11-02 11:15:03 +07:00
SteamSmith 650af529e2 Merge remote-tracking branch 'origin/main' into feat/bake-skew-correction
# Conflicts:
#	ROADMAP.md
2026-11-01 20:25:01 -05:00