Material library: the game's parameter defaults (SIX-68) #424

Manually merged
github merged 14 commits from github-bot/gh-424 into gh-pr/424/base 2026-11-27 02:26:51 +00:00 AGit
Owner

@⁠holdmysocks on GitHub · 2026-11-26 23:29 UTC · original
holdmysocks:six68-muv-defaults → master · +1107 −136 · 23 files · 14 commits · merged 2026-11-27 02:14 UTC

SixNG now uses the game's defaults for layered-material parameters that a preset and its base material leave out (SIX-68).

What changes

  • Defaults file. The game reads its defaults from $(target)/data/dynamic_art/muv_parameter_default_values (content type DYNAMIC_ART_MUV_PARAMETER_DEFAULTS_FILE). It is a PSO in data.rpf that only the table of contents reaches. matlib::Defaults::read finds it as the small plain PSO with root e5f515b3.
  • Contents. The file holds four parameter maps: 80 floats, 10 colours, 6 ints and 5 textures, keyed by parameter name.
  • Where the defaults are kept. The material index stores them (index version 7), and Library::load takes them from the index when it can. sixng materials prints them under defaults, with names where they are recovered.
  • Where they apply:
    • tint-mask layers: opacity 1, scale 1, rotation and translation 0, flags 8
    • tile scale and rotation: 1 and 0
  • Effect on real data. 23,186 masked layers had no opacity of their own. 22,985 of them have an opaque tint, so they now show.
  • Not applied:
    • weapon roughness stays 0.5 when missing. The file gives 0, but in the weapon shader that parameter is a blend target, not the base roughness.
    • colour: the default is transparent black, which already means no tint.
  • PSO map reader fix (meta7a). Maps now read all their hash-table groups. Before, only the first 16 slots were read: this file gave 12 of its 80 floats.

Tests

  • New tests: missing_parameters_take_the_game_defaults and pso_map_reads_every_group.
  • All sixng-core tests pass, and sixng-gui builds.
  • Checked on real data with sixng materials.
  • Viewer check (RTX 4080), before and after on four characters' default outfits, with SIXNG_NO_MUV_DEFAULTS=1 for the before render:
    • swim shorts: plain black becomes a wave print (three colour layers with no opacity of their own)
    • polo: a fine knit stripe appears
    • jeans: their light-blue wash layer applies, so the denim is lighter and smoother
    • t-shirt: barely changes
  • Garments that carry a direct colour from the ped data don't go through the fabric path, so they are unchanged.
**@⁠holdmysocks** on GitHub · 2026-11-26 23:29 UTC · [original](https://github.com/holdmysocks/SixNG/pull/424) `holdmysocks:six68-muv-defaults` → `master` · +1107 −136 · 23 files · 14 commits · merged 2026-11-27 02:14 UTC SixNG now uses the game's defaults for layered-material parameters that a preset and its base material leave out (SIX-68). **What changes** - **Defaults file.** The game reads its defaults from `$(target)/data/dynamic_art/muv_parameter_default_values` (content type `DYNAMIC_ART_MUV_PARAMETER_DEFAULTS_FILE`). It is a PSO in data.rpf that only the table of contents reaches. `matlib::Defaults::read` finds it as the small plain PSO with root `e5f515b3`. - **Contents.** The file holds four parameter maps: 80 floats, 10 colours, 6 ints and 5 textures, keyed by parameter name. - **Where the defaults are kept.** The material index stores them (index version 7), and `Library::load` takes them from the index when it can. `sixng materials` prints them under `defaults`, with names where they are recovered. - **Where they apply:** - tint-mask layers: opacity 1, scale 1, rotation and translation 0, flags 8 - tile scale and rotation: 1 and 0 - **Effect on real data.** 23,186 masked layers had no opacity of their own. 22,985 of them have an opaque tint, so they now show. - **Not applied:** - weapon roughness stays 0.5 when missing. The file gives 0, but in the weapon shader that parameter is a blend target, not the base roughness. - colour: the default is transparent black, which already means no tint. - **PSO map reader fix (`meta7a`).** Maps now read all their hash-table groups. Before, only the first 16 slots were read: this file gave 12 of its 80 floats. **Tests** - New tests: `missing_parameters_take_the_game_defaults` and `pso_map_reads_every_group`. - All `sixng-core` tests pass, and `sixng-gui` builds. - Checked on real data with `sixng materials`. - Viewer check (RTX 4080), before and after on four characters' default outfits, with `SIXNG_NO_MUV_DEFAULTS=1` for the before render: - swim shorts: plain black becomes a wave print (three colour layers with no opacity of their own) - polo: a fine knit stripe appears - jeans: their light-blue wash layer applies, so the denim is lighter and smoother - t-shirt: barely changes - Garments that carry a direct colour from the ped data don't go through the fabric path, so they are unchanged.
Read muv_parameter_default_values (DYNAMIC_ART_MUV_PARAMETER_DEFAULTS_FILE)
from data.rpf through its table of contents, keep it in the material index
and use it where a preset and its base material leave a tint-mask or tile
parameter out. PSO maps now read every hash-table group.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 00:39:45 +00:00
# Conflicts:
#	crates/sixng-core/src/meta7a.rs
github-bot changed target branch from master to gh-pr/424/base 2026-11-27 02:26:50 +00:00
github manually merged commit 383aa1fa5b into gh-pr/424/base 2026-11-27 02:26:50 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.