Keep the fill layer and image conversion in TextureCraft while reading glTF material factors and embedded images from craft-mesh. This carries the engine feature from #296 and preserves its end-to-end test.
Co-authored-by: NetterSilver <133535268+Silvertree2010@users.noreply.github.com>
Carry forward the bare material assignment behavior from #361 and consume the shared glTF image data for the high-poly base color map.
Co-authored-by: NetterSilver <133535268+Silvertree2010@users.noreply.github.com>
Previously, if any object in an OBJ mesh lacked texture coordinates, all UVs across all objects were discarded and replaced with a full automatic unwrap.
Skip empty models without indices, preserve existing UVs on textured objects while assigning default UVs to untextured helper/sub-objects, and report a warning without forcing a full mesh unwrap.
The 8 GiB MAX_TOTAL guard on open and the save-side check are removed (maintainer
decision). The per-resource and mesh limits stay.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The worker cap of 8 and the fixed 3 GiB in-flight budget are gone. Prefs gets
'cores kept for the UI' (default 1, 0 or more) and 'max RAM while saving'
(default 50% of the free RAM).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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>
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>
Review point: with no worker thread the fallback built a whole in-memory zip per
entry; it now writes each entry straight into the file like the serial writer,
and the test covers that path.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Opening a project file stops at 8 GiB of decompressed data (MAX_TOTAL), but
saving had no matching check, so a too big project saved fine and then failed
to open. Saving now counts the bytes the loader would count and refuses before
the temporary file is created, with an error that names the size and the limit;
the existing file stays as it was. The limit itself is unchanged. A test checks
that the count equals what load counts for a real file.
Fixes#215. Refs #200
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Saving compressed every zip entry one after the other with deflate level 6 on a
single thread; the baked maps were about three quarters of the time. The entries
are independent, so native builds now compress them on up to 8 worker threads
(one core is left to the UI) and copy the finished entries into the file in the
original order with raw_copy_file. Entry names, order, methods, CRCs and sizes
are unchanged, the format is unchanged, older versions open the files.
Memory stays bounded: a worker only starts an entry while the estimated size of
the entries started and not yet written is under 3 GiB, and baked maps and pixel
tiles stream into the compressor instead of building a raw copy first. wasm and
single-core machines keep the serial writer. The atomic tmp + fsync + rename
path is unchanged.
Refs #200, fixes#214
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
`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.
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).
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>
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>
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>
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>
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>