Viewer: bonnet and boot struts follow the panel #153

Manually merged
github merged 1 commit from gh-pr/153/head into gh-pr/153/base 2026-11-26 20:13:45 +00:00
Owner

@⁠holdmysocks on GitHub · 2026-11-24 13:23 UTC · original
holdmysocks:claude/bonnet-struts → master · +73 −0 · 1 files · 1 commits · merged 2026-11-24 13:46 UTC

What

Reported by the user: "I noticed the hood struts do not move properly with the hood opening animation."

With the bonnet (or boot) opened in the viewer, the two halves of a gas strut came apart: the cylinder stayed fixed to the lid, the rod stayed fixed to the body, and they pointed in their closed directions.

How the models are built: each half is a bone on one side with a target bone on the other. strut_female_<x> hangs from the panel and has strut_female_target_<x> on the body; strut_male_<x> hangs from the body and has strut_male_target_<x> on the panel. Other rods use <x>_lookat with <x>_target. A half turns about its own mount to keep aiming at its target.

The viewer now does that: after the hinges are posed, every such bone whose target hangs from a different panel (or from the body) is turned from where its target was to where it is now. Nothing changes while the panels are closed.

Checked

  • akane and banshee rendered with the bonnet open (--bonnet 0.9) with the build in target\release and with this branch, same camera. On the akane the strut is now one piece from the wing to the lid; before, the rod lay on the wing and the cylinder hung under the lid.
  • Of the vehicles in the viewer's cache that have a bonnet bone, 115 have strut bones under the bonnet or boot (63 bonnet only, 45 both, 7 boot only).
  • cargo build -p sixng-gui passes.

Not done

  • No unit test for the bone pairing.
  • Only two cars were looked at. Doors with stay rods use the same rule but were not rendered.
  • The opening angle is still the slider's, not a stored limit, so a strut can be drawn longer than it could extend.
  • The Metal renderer shares this code path (the pose is computed before drawing); it was not run.
**@⁠holdmysocks** on GitHub · 2026-11-24 13:23 UTC · [original](https://github.com/holdmysocks/SixNG/pull/153) `holdmysocks:claude/bonnet-struts` → `master` · +73 −0 · 1 files · 1 commits · merged 2026-11-24 13:46 UTC ## What Reported by the user: "I noticed the hood struts do not move properly with the hood opening animation." With the bonnet (or boot) opened in the viewer, the two halves of a gas strut came apart: the cylinder stayed fixed to the lid, the rod stayed fixed to the body, and they pointed in their closed directions. How the models are built: each half is a bone on one side with a target bone on the other. `strut_female_<x>` hangs from the panel and has `strut_female_target_<x>` on the body; `strut_male_<x>` hangs from the body and has `strut_male_target_<x>` on the panel. Other rods use `<x>_lookat` with `<x>_target`. A half turns about its own mount to keep aiming at its target. The viewer now does that: after the hinges are posed, every such bone whose target hangs from a different panel (or from the body) is turned from where its target was to where it is now. Nothing changes while the panels are closed. ## Checked - akane and banshee rendered with the bonnet open (`--bonnet 0.9`) with the build in `target\release` and with this branch, same camera. On the akane the strut is now one piece from the wing to the lid; before, the rod lay on the wing and the cylinder hung under the lid. - Of the vehicles in the viewer's cache that have a bonnet bone, 115 have strut bones under the bonnet or boot (63 bonnet only, 45 both, 7 boot only). - `cargo build -p sixng-gui` passes. ## Not done - No unit test for the bone pairing. - Only two cars were looked at. Doors with stay rods use the same rule but were not rendered. - The opening angle is still the slider's, not a stored limit, so a strut can be drawn longer than it could extend. - The Metal renderer shares this code path (the pose is computed before drawing); it was not run.
Each half of a gas strut is a bone on one side (panel or body) with a target bone on the other. With a hinged panel swung, every such bone is turned about its mount from where its target was to where it is now, so the halves stay in line.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:13:43 +00:00
github manually merged commit 9387fd30b3 into gh-pr/153/base 2026-11-26 20:13:45 +00:00
github-bot referenced this pull request from a commit 2026-11-26 20:14:08 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.