Repository navigation
ASSET-539: Preserve extra UV sets during ped assembly - #6604
Conversation
|
Tested 8281455 merged with main ab235a2 on Linux/Python 3.12.16: pass Commands (fresh worktree of upstream/main with the PR head merged,
Negative control: Diff read: key validation is strict on both sides ( |
shayderrr
left a comment
There was a problem hiding this comment.
Summary
tools/ped_assemble.py carries extra UV sets end to end: MeshPart.uvs_extra maps positive set indices to VEC2 lists, parsed and validated in _part_from_dict, serialized sorted in part_to_dict, read from TEXCOORD_n glTF attributes, and emitted back as gap-free TEXCOORD_1..n accessors with per-vertex validation. check_region now validates TEXCOORD_[1-9][0-9]* accessors as VEC2. Docs and a 312-line test file cover the round trip and rejection of gaps or bad keys (ASSET-539).
Why merge
Previously extra texture-coordinate sets were silently dropped during ped assembly, losing material data from character models.
Verdict: Approve
Summary
Why mergePreviously extra texture-coordinate sets were silently dropped during ped assembly, losing material data from character models. Verdict: Approve |
ASSET-539, claimed for extra-UV preservation and carried to coordination #6414.
Why
The existing skinned exporter preserves authored
TEXCOORD_1and higher sets, but ped assembly silently discards them during GLB import, JSON serialization and GLB export. The commands still succeed. The existingMeshPart.uvs_extrafield already follows alignment, culling and vertex compaction.Change
Connect that field to the four missing input/output paths. Extra GLB sets use the existing budgeted accessor reader and its VEC2 precheck, including sparse overrides, normalized integer components and interleaved data. JSON uses positive string set indices under
uvs_extra; GLB export emits separate VEC2 attributes and checks consecutive set indices and vertex counts. Primary UVs, skin remapping and material texture-coordinate binding policy retain their existing behavior.The glTF attribute contract defines the supported representations and set numbering. The final synthetic fixture uses four-byte aligned vertex-attribute offsets.
Validation
Windows x64, CPython 3.14.6, CPU only. All inputs are synthetic; no game files were accessed.
a284bad1e9c22881b243d618443d206331403cca, the final seven-method suite reports 11 failed subcases. With this patch all seven pass.skinned_glb.pyproducer andcull-overlap/assemblecommands preserve distinct UV sets after one of two triangles is removed and vertices are compacted. Independent output decoding checks UV values, positions, both joint/weight sets and source-file preservation.git diff --checkpass.tools/f64_omod_probe.py:268, reproduced on untouched main at the same revision. That writer is already covered by f64_omod_probe: pin newline="\n" when writing JSON report #6461 and is unchanged here.Integration
This branch is based on main after #6208, #6283 and #6353 merged. The #5999 precheck is already included through #6208. New UV reads consume the existing implicit-row budget directly.
An isolated combination with the unchanged heads of #5824 (
ffc26593), #6119 (0c783978), #6037 (0afc7914), #5764 (f9e2ff3e) and #6199 (82d19e3c) passes 75 methods, with published tests preserved exactly. The docs paragraph merges cleanly with #6037. Relevant source, instructions and existing fixture files are unchanged between the tested base and freshly checked main1cc6e3c121969761d9dad8fdec99f19928213973.AI-assisted: yes.