Saints Row IV About NPC Hair Shaders

While examining various characters' textures, I noticed that some have "white hair" which suggests that they could take advantage of the random hair color shaders. However, copy & pasting the hair color data from one character to another simply does not work. Taking character "Linda" as an example - she clearly has white hair on her textures, and yet adding the shader data into her listing in "character_definitions" gives her randomly-colored sideburns, but her hair "wig" remains black. Another example - this happens on character "Angies":

IQexOtg.jpg


I examined the "matlib" files, and noticed that they list one hair color texture, but while comparing it to other models with random hair shading I saw that they also have one color they're referenced to, so I am not sure what enforces this shader in-game.

Are these shaders hard-coded into the NPCs' files?
 
Last edited:
The matlibs will likely only ever show one shader ball texture in the material. The "hair_color" shader balls added in the character_definitions.xtbl are possible overrides that code may randomly choose. This hair variant materials system is only setup for use by the character's heads. Since the head is a separate element and the ponytail is technically a part of the body, the colorization does not happen in tandem. The hair in this case is not even using the colorization that happens on clothes, it is using a specific shaderball for its colorization, which is defined in material 1 of the body matlib file, "hair_black_01_sb". Keep in mind these matlibs are crunched and ultimately spit out pegs that define that actual textures that are used.
 
Head/Hair colorization is a separate system from that of the body colorization, that is assigned via the "Palette", found in the character_definitions.xtbl. Textures that you may find that appear white are almost always colorized by shader ball texture assignments found in the materials. Textures that have clear sections colored with red, green and blue are almost always colored by the color palette assignments.
 
Indeed, I never thought palette swapping is related to the hair colors. However, I didn't understand why some characters get partial hair coloration. The character I put above as an example "Angies" appears to have "white hair" on her textures, that's why I assumed that the hair color command will work, but this only works partially on her head and not on her ponytail. This must be a "matlib" thing, but there's no way to properly edit them at this time.
 
Back
Top