Open kaetemi opened 4 years ago
Up to 4 color channels, using one color mask texture with a mask in each channel.
KTX allows metadata to go with the texture for this https://github.com/ryzom/ryzomcore/issues/610
Possible to include the predefined palettes per texture as well in the metadata, to simplify configuration.
I remember testing that in 2018 :) It worked fine but only with a little sample program, I have no idea what resources it needs for Ryzom :(
For armors, I used 3 textures : base color texture + skin mask + user mask (armor)
To reduce client size, a panoply pixel program can be implemented for colorizing armor at runtime, rather than pre-building textures for all color combinations. Currently we are not constrained by GPU resources, so this does not add any notable overhead. Potato systems may regress and use an option to disable custom colors entirely.
This may allow more colors, multiple colors per piece, and more variants of textures for enhanced customization.
https://developer.nvidia.com/cg-toolkit-download can be used to generate ARB fragment programs and DX9 pixel shaders.
Armors seem to be using only two material setups. Either it's using a regular material with a single texture and optional alpha test and 2-sided flag, or it's using the cubemap reflection shader material.
Panoply generation works by first detecting the hue of the existing image, then setting the hue relative to that. It also applies a contrast and saturation filter. The base hue, etc, may need to be set as custom metadata of the DDS files.