|
|
Am 18.11.2016 um 17:38 schrieb Cousin Ricky:
> These four images are all rendered spectrally.
>
> Image subtractive-arith.jpg uses straightforward arithmetic averaging of
> 4 colors. Clearly, arithmetic averaging is not the way to simulate the
> mixing of pigments.
From my experience, you get the best results by applying the following
algorithm:
- For each colour involved, compute its luminance.
- For each colour, compute the lightness from the luminance.
- Compute the arithmetic average of all the lightness values.
- Compute the result luminance from the averaged lightness.
- For each colour involved, normalize it to unity luminance
by dividing each component by the colour's computed luminance.
- Compute the arithmetic average of the normalized colours.
- Renormalize the result colour to the result luminance
by multiplying each component with the result luminance.
POV-Ray 3.7.1 supports this type of averaging in pigment maps and colour
maps, using "blend_mode 3" (IIRC); by default, it uses Y=V^2.4 as the
formula to convert between luminance (Y) and lightness (V).
Post a reply to this message
|
|