Vehicles: a part model listed twice on one bone is fitted once #215

Manually merged
github merged 1 commit from gh-pr/215/head into gh-pr/215/base 2026-11-26 20:18:51 +00:00
Owner

@⁠holdmysocks on GitHub · 2026-11-24 22:26 UTC · original
holdmysocks:claude/double-bumper → master · +20 −3 · 2 files · 1 commits · merged 2026-11-24 22:36 UTC

What

A model that two fitted parts both place on the same bone is now put on once, in sixng vehicle and in the viewer.

On pickups the rear bumper (and its small mount) is an element of the bed part (body slot 1c9dd6fe) and also of the part in slot 8d48fd33, with the same asset and the same bone. Both parts are in the configuration, so the bumper was exported and drawn twice in the same place: invisible in a render, but doubled geometry in the GLB.

  • vehexport.rs: after the fit list is built, repeats of (model, bone) are dropped. What the stock pieces lose (hides) is still taken from every element. The result JSON gains repeated_elements_skipped.
  • model_view.rs: the kit placement loop skips a (model, bone) it has already placed.

Checked

  • Count over vehicles.json (format 16, 4,063 configurations): 90 configurations fit one model twice on one bone outside the brake slots: 68 body + slot 8d48fd33, 17 slots 98b9b49a + c98dbea6, 3 slots 46268fee + 57f3c1f7, 2 within slot 8d0cf489. A further 153 are brake models in two slots, which are not fitted on a bone anyway.
  • sixng vehicle reclaimerclassic: configuration 0 goes from 18 to 16 pieces (218,062 to 214,124 triangles), configuration 8 from 27 to 25; repeated_elements_skipped is 2 in both. Configuration 4 (flatbed, no rear bumper part) is unchanged.
  • Viewer: reclaimerclassic_hi configuration 0 renders with bed, bumper and wheels as before.
  • cargo test --workspace --locked passes.

Not decoded / not done

  • Why the data lists the bumper under both parts is not known (the slot part may exist so another bumper can replace it). The name of slot 8d48fd33 is not known.
  • Only reclaimerclassic was exported and rendered; the other three slot pairs were counted, not looked at.
  • The viewer's triangle count before and after was not measured, only the picture.
  • The Metal renderer was not built or run. No unit test.
**@⁠holdmysocks** on GitHub · 2026-11-24 22:26 UTC · [original](https://github.com/holdmysocks/SixNG/pull/215) `holdmysocks:claude/double-bumper` → `master` · +20 −3 · 2 files · 1 commits · merged 2026-11-24 22:36 UTC ## What A model that two fitted parts both place on the same bone is now put on once, in `sixng vehicle` and in the viewer. On pickups the rear bumper (and its small mount) is an element of the bed part (body slot `1c9dd6fe`) and also of the part in slot `8d48fd33`, with the same asset and the same bone. Both parts are in the configuration, so the bumper was exported and drawn twice in the same place: invisible in a render, but doubled geometry in the GLB. - `vehexport.rs`: after the fit list is built, repeats of (model, bone) are dropped. What the stock pieces lose (`hides`) is still taken from every element. The result JSON gains `repeated_elements_skipped`. - `model_view.rs`: the kit placement loop skips a (model, bone) it has already placed. ## Checked - Count over `vehicles.json` (format 16, 4,063 configurations): 90 configurations fit one model twice on one bone outside the brake slots: 68 body + slot `8d48fd33`, 17 slots `98b9b49a` + `c98dbea6`, 3 slots `46268fee` + `57f3c1f7`, 2 within slot `8d0cf489`. A further 153 are brake models in two slots, which are not fitted on a bone anyway. - `sixng vehicle reclaimerclassic`: configuration 0 goes from 18 to 16 pieces (218,062 to 214,124 triangles), configuration 8 from 27 to 25; `repeated_elements_skipped` is 2 in both. Configuration 4 (flatbed, no rear bumper part) is unchanged. - Viewer: `reclaimerclassic_hi` configuration 0 renders with bed, bumper and wheels as before. - `cargo test --workspace --locked` passes. ## Not decoded / not done - Why the data lists the bumper under both parts is not known (the slot part may exist so another bumper can replace it). The name of slot `8d48fd33` is not known. - Only reclaimerclassic was exported and rendered; the other three slot pairs were counted, not looked at. - The viewer's triangle count before and after was not measured, only the picture. - The Metal renderer was not built or run. No unit test.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:18:49 +00:00
github manually merged commit 456538e317 into gh-pr/215/base 2026-11-26 20:18:51 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.