feat(ugc): brushed_colors, LEGO color ids drawn as brushed steel

The client's Materials.xml has no brushedSteel or matteSteel colors, so the
Brushed Steel shader (mapShaders 89) was never used. brushed_colors names
color ids to draw with it whatever their type (e.g. the drum lacquered
298, 300, 1002, 1004); a named color wins over the metal and glow colors.
Empty by default. The docs note that the client registers the brushed
reflection and noise textures itself (0x00453730), so the .nif needs none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-09-28 10:18:07 -05:00
parent 6c45d4abdb
commit f3922b3bcb
7 changed files with 24 additions and 2 deletions

View File

@@ -1148,6 +1148,12 @@ TEST(UgcShaders, LooksComeFromTheColorData) {
EXPECT_EQ(UgcModel::LookOf(329, plastic, rules), UgcModel::eLook::GLOW); // LU Toolbox's glow colors
EXPECT_EQ(UgcModel::LookOf(50, plastic, rules), UgcModel::eLook::GLOW);
EXPECT_EQ(UgcModel::LookOf(9016, plastic, rules), UgcModel::eLook::GLOW);
UgcModel::LookRules named;
named.colors[298] = UgcModel::eLook::BRUSHED;
named.colors[329] = UgcModel::eLook::BRUSHED;
EXPECT_EQ(UgcModel::LookOf(298, steel, named), UgcModel::eLook::BRUSHED); // a named color wins over its type
EXPECT_EQ(UgcModel::LookOf(329, plastic, named), UgcModel::eLook::BRUSHED); // and over the glow colors
EXPECT_EQ(UgcModel::LookOf(150, steel, named), UgcModel::eLook::METAL);
UgcModel::LookRules none;
none.materialTypes.clear();
none.paletteMetallic = false;