Color Modulation: Difference between revisions
No edit summary |
|||
| (11 intermediate revisions by the same user not shown) | |||
| Line 2: | Line 2: | ||
== Modes == | == Modes == | ||
There are 6 modes | There are 6 modes used in FFL.<ref>https://github.com/ariankordi/ffl/blob/97eecdf3688f92c4c95cecf5d6ab3e84c0ee42c0/include/nn/ffl/FFLModulateParam.h#L11</ref> | ||
=== Constant === | === Constant === | ||
For textures where only one color replacement is needed. The red channel is colorized. | For textures where only one color replacement is needed. The red channel is colorized. | ||
Used by: | Used by: [[Beard (model)|Beard (shape)]], [[Nose]], [[Forehead]], [[Hair]], Fill | ||
<syntaxhighlight lang="c"> | <syntaxhighlight lang="c"> | ||
| Line 16: | Line 16: | ||
=== Texture Direct === | === Texture Direct === | ||
For textures where no color modulation is required. The texture is “passed through” the shader with no modifications. | For textures where no color modulation is required. The texture is “passed through” the shader with no modifications. | ||
Used by: [[Makeup]], [[Faceline]], [[Mask]]<syntaxhighlight lang="c"> | |||
Used by: | |||
<syntaxhighlight lang="c"> | |||
rgb = TextureRGB | rgb = TextureRGB | ||
a = TextureA | a = TextureA | ||
| Line 26: | Line 22: | ||
=== Rgb Layered === | === Rgb Layered === | ||
For textures where | For textures where up to three colors need to be filled. | ||
Used By: Mouth, Eye | Used By: [[Mouth]], [[Eye]] | ||
<syntaxhighlight lang="c"> | <syntaxhighlight lang="c"> | ||
| Line 38: | Line 34: | ||
For textures where there is a single color that needs to be filled, and an alpha channel. | For textures where there is a single color that needs to be filled, and an alpha channel. | ||
Used by: Mustache, Eyebrow, Mole, FaceLine, FaceBeard, | Used by: [[Mustache]], [[Eyebrow]], [[Mole]], FaceLine ([[Wrinkle]]??), [[Beard (texture)|FaceBeard]], [[Noseline]] | ||
<syntaxhighlight lang="c"> | <syntaxhighlight lang="c"> | ||
| Line 47: | Line 43: | ||
=== Luminance Alpha === | === Luminance Alpha === | ||
For textures that need to fill two colours, and alpha | For textures that need to fill two colours, and alpha | ||
Used by: [[Glass]] | |||
<syntaxhighlight lang="c"> | |||
r = ColorR * TextureG | |||
a = TextureR | |||
</syntaxhighlight> | |||
=== Alpha Opaque === | |||
Single-channel modulation with an opaque background. | |||
Used by: [[Cap]] | |||
<syntaxhighlight lang="c"> | |||
rgb = ColorR * TextureR | |||
a = 1.0 | |||
</syntaxhighlight> | |||
== References == | |||
<references />{{Render-Navbox}}{{Colortable-Navbox}} | |||
}{{Colortable-Navbox}} | |||
Latest revision as of 10:47, 24 September 2025
Color modulation is the process in which a texture is modified to add color. There are various strategies used by face libraries. In general, textures are split into color channels, and each channel is filled with a respective color.
Modes
[edit | edit source]There are 6 modes used in FFL.[1]
Constant
[edit | edit source]For textures where only one color replacement is needed. The red channel is colorized.
Used by: Beard (shape), Nose, Forehead, Hair, Fill
rgb = ColorR
a = 1.0
Texture Direct
[edit | edit source]For textures where no color modulation is required. The texture is “passed through” the shader with no modifications.
Used by: Makeup, Faceline, Mask
rgb = TextureRGB
a = TextureA
Rgb Layered
[edit | edit source]For textures where up to three colors need to be filled.
rgb = ColorR * TextureR + ColorG * TextureG + ColorB * TextureB
a = TextureA
Alpha
[edit | edit source]For textures where there is a single color that needs to be filled, and an alpha channel.
Used by: Mustache, Eyebrow, Mole, FaceLine (Wrinkle??), FaceBeard, Noseline
rgb = ColorR * TextureR
a = TextureR
Luminance Alpha
[edit | edit source]For textures that need to fill two colours, and alpha
Used by: Glass
r = ColorR * TextureG
a = TextureR
Alpha Opaque
[edit | edit source]Single-channel modulation with an opaque background.
Used by: Cap
rgb = ColorR * TextureR
a = 1.0