Unlocking the Night: Crafting an Blue Night Filter with the Purkinje Effect

What is the Purkinje Effect?

The Purkinje effect, also known as the Purkinje shift, refers to the eye’s tendency to shift its peak luminance sensitivity toward the blue end of the color spectrum under low illumination conditions during dark adaptation. As light levels decrease, colors—especially reds—appear darker relative to other hues.
image

My Night Filter Recipe


Here’s how I whipped up my night filter trick:

  1. Rod Cell Response (LMSR’s R): Rod cells, found in the retina, play a crucial role in perceiving brightness in dim environments. I only use the response of rod cells to determine the final brightness of the filtered image(because gain broke lumen).
  2. Blue Hue: Inspired by shadertoy, I choose a specific blue hue. This particular shade significantly influences the perception of nighttime scenes. Choosing the right blue can make or break the overall night impression.
  3. Oklab Color Mixing: I experimented with the Oklab color space for blending colors. While it’s hard to pinpoint exactly what makes it visually appealing, the results speak for themselves—it enhances the overall aesthetics.
  4. Reinhard Tone Mapping: To maintain consistency, I used the Reinhard tone mapping algorithm to handle the difference between rod cell response and overall brightness, ensuring values stay within the 0-1 range.

References

1 Like