winleafs / Winleafs

Winleafs: Windows application for Nanoleaf lights
GNU General Public License v3.0
84 stars 9 forks source link

Ambilight issues #74

Closed StijnOostdam closed 3 years ago

StijnOostdam commented 5 years ago

I was able to play around in game with a for a bit and I think your implementation is spot on. I have a panel set in front of me and to my left... and it replicates from front to back with a 0.5 sec or less delay as you'd expect, so it's pretty mindblowing for games!

I have noticed issues with the dynamic brightness for ambilight, though. I don't know if it's relevant, but my monitor resolution is 3440x1440.

Problem 1: On an all-black screen with white text, the panels flash on and off rapidly. See example: https://youtu.be/FQK7aaPW3e0

Problem 2: During night scenes or areas where there's very little lighting, the brightness is still abnormally high. In this video, I show how dark it is normally, then activate the ambilight. Brightness stays full blast despite it being dark or transitioning to a black screen. This is with the Let ambilight Control Brightness setting checked. I've also set it to a max of 5 per second, but that didn't seem to help.

See example: https://youtu.be/2W5FK9jxOxc

StijnOostdam commented 5 years ago

The problem for dark screens is as follows: Nanoleafs cannot display any color between black and white (as they are not really colors). It can only display white and all colors. Any color with a low saturation value will be regarded as white by Nanoleaf, so therefore all dark scenes are white with high brightness. So for dark screens with little color, we could do the following (see http://colorizer.org/ for examples):

  1. Anything with a saturation lower than 10: turn the lights off. We need to test if this has the same refresh rate as normal effect updates.
  2. Test with dark scenes and lower minDiversion value in the ScreenGrabber, such that even dark colors are recognized. This could affect the brightness significantly when letting ambilight control brightness, the impact of this can be both positive or negative and should therefore be tested.