Meshlets with 32-bit counts; vehicle interiors off the body paint; fur toggle #29

Manually merged
github merged 1 commit from gh-pr/29/head into gh-pr/29/base 2026-11-26 20:04:10 +00:00
Owner

@⁠holdmysocks on GitHub · 2026-11-23 03:35 UTC · original
holdmysocks:claude/viewer-fixes → master · +119 −13 · 5 files · 1 commits · merged 2026-11-23 03:40 UTC

Shredded motorcycle (levels.rpf@117e11d010)

The meshlet index buffer header holds u32 triangle and remap counts; they were read as u16. The bike's body (70,057 triangles, 69,901 remap entries, 65,534 vertices) was cut to 4,521 triangles and drawn as spikes. The descriptors' 16-bit remap start wraps on such a mesh and is now unwrapped along the meshlet order. All 70,057 triangles decode, none dropped.

Vehicle interiors took the body colour

standard_vehicle_2lyr covers the whole car, so seats, dashboards, lamp housings and mechanical parts were painted. A material is now body paint only when neither layer binds a detail texture (lyr0diffusetex, lyr1diffusetex) and its meshes hang on body bones. Materials with a detail texture, or whose bones are mostly interior, lamp or mechanical ones (seat, steering, doorcard, light, siren, engine …), get a neutral stand-in (classification.stand_in: "trim").

This is an inference, stated in classification.paint_rule. What the data shows: vertex colour alpha is a part id (0–255) into the material palette (slot 19df25d7), and the stored palette is a placeholder the game replaces per vehicle. Colouring by it gives per-panel debug colours (tried and backed out). The real per-part colours are not decoded, so interiors are grey, not their true colours.

Cached vehicle exports from before are exported again in the viewer.

Fur toggle

A "fur guide strands" / "hair guide strands" checkbox on the side panel hides the grooms without dropping the choice (--no-fur in automation).

Checked

  • cargo test -p sixng-core: 97 pass (new: meshlets with 32-bit counts, the trim stand-in).
  • Rendered in the rebuilt viewer: the motorcycle (intact), the ambulance outside and inside (grey interior, painted body), baller2_hi (grey interior, painted body).

Not done

  • The ambulance's "missing interior pieces": after this change its dashboard and rear compartment draw complete in the viewer, so I could not identify a missing piece. Its spawn configurations list about 100 part models by name hash; only 5 resolve to model names, and they are not bone names. Whether those are what is missing is unknown.
  • True interior colours (needs the palette the game builds per vehicle).
  • Only three vehicles were rendered. A vehicle whose body panels hang on unusual bones, or whose painted panels carry a detail texture, would lose its paint under this rule.
**@⁠holdmysocks** on GitHub · 2026-11-23 03:35 UTC · [original](https://github.com/holdmysocks/SixNG/pull/29) `holdmysocks:claude/viewer-fixes` → `master` · +119 −13 · 5 files · 1 commits · merged 2026-11-23 03:40 UTC ## Shredded motorcycle (`levels.rpf@117e11d010`) The meshlet index buffer header holds u32 triangle and remap counts; they were read as u16. The bike's body (70,057 triangles, 69,901 remap entries, 65,534 vertices) was cut to 4,521 triangles and drawn as spikes. The descriptors' 16-bit remap start wraps on such a mesh and is now unwrapped along the meshlet order. All 70,057 triangles decode, none dropped. ## Vehicle interiors took the body colour `standard_vehicle_2lyr` covers the whole car, so seats, dashboards, lamp housings and mechanical parts were painted. A material is now body paint only when neither layer binds a detail texture (`lyr0diffusetex`, `lyr1diffusetex`) and its meshes hang on body bones. Materials with a detail texture, or whose bones are mostly interior, lamp or mechanical ones (seat, steering, doorcard, light, siren, engine …), get a neutral stand-in (`classification.stand_in: "trim"`). This is an inference, stated in `classification.paint_rule`. What the data shows: vertex colour alpha is a part id (0–255) into the material palette (slot `19df25d7`), and the stored palette is a placeholder the game replaces per vehicle. Colouring by it gives per-panel debug colours (tried and backed out). The real per-part colours are not decoded, so interiors are grey, not their true colours. Cached vehicle exports from before are exported again in the viewer. ## Fur toggle A "fur guide strands" / "hair guide strands" checkbox on the side panel hides the grooms without dropping the choice (`--no-fur` in automation). ## Checked - `cargo test -p sixng-core`: 97 pass (new: meshlets with 32-bit counts, the trim stand-in). - Rendered in the rebuilt viewer: the motorcycle (intact), the ambulance outside and inside (grey interior, painted body), `baller2_hi` (grey interior, painted body). ## Not done - The ambulance's "missing interior pieces": after this change its dashboard and rear compartment draw complete in the viewer, so I could not identify a missing piece. Its spawn configurations list about 100 part models by name hash; only 5 resolve to model names, and they are not bone names. Whether those are what is missing is unknown. - True interior colours (needs the palette the game builds per vehicle). - Only three vehicles were rendered. A vehicle whose body panels hang on unusual bones, or whose painted panels carry a detail texture, would lose its paint under this rule.
Meshlet index buffers: the triangle and remap counts in the header are
u32, not u16 with a zero after them. A motorcycle body (alvinov1_hi,
70,057 triangles, 69,901 remap entries) was cut to 4,521 triangles and
drawn as spikes. The descriptors' 16-bit remap start wraps on such a
mesh and is unwrapped along the meshlet order.

Vehicle paint: standard_vehicle_2lyr covers the whole car, so interiors,
lamp housings and mechanical parts took the body colour. A material is
now body paint only when neither layer binds a detail texture
(lyr0diffusetex, lyr1diffusetex) and its meshes hang on body bones;
materials with a detail texture, or whose bones are mostly interior,
lamp or mechanical ones (seat, steering, doorcard, light, siren, engine
...), get a neutral stand-in (classification.stand_in "trim"). This is
an inference: vertex colour alpha is a part id (0-255) into the
material palette (slot 19df25d7), the stored palette is a placeholder
the game replaces, and the per-part colours are not decoded.
classification.paint_rule states the rule. Cached vehicle exports from
before are exported again in the viewer.

Viewer: a "fur guide strands" / "hair guide strands" checkbox on the side
panel hides the grooms without dropping the choice (--no-fur in
automation).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:04:09 +00:00
github manually merged commit a52f939ab4 into gh-pr/29/base 2026-11-26 20:04:10 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.