Jump to content
Corsair Community

Keyboard-Ambilight


Darth Affe

Recommended Posts

Hey Guys,

 

lately I implemented an Ambilight-Layer for Artemis.

Since all the capture-logic and stuff could easily transfered, I decided to create a small standalone application providing only this ambilight-feature as a CUE.NET-example.

 

It's nothing too fancy in terms of UI or error-handling but I thought if someone is interested in stuff like this it might be worth posting it here.

The capture is done by reading the front-buffer of the graphic card, so it works for everything on your primary-screen (windowed-games, movies, idling on the desktop, etc.) not bypassing the front-buffer (a lot of games do this in fullscreen mode).

 

A note about CPU-usage: 1920x1080 @ 20FPS update rate uses 1-2% on my system (i7 2600K) with default settings. But if you're using higher resolutions or to high settings you might completely eat your CPU. If you run into performance-issues try reducing the capture-rate (down to 10 looks quite good, 5 is bearable), increasing downsampling (4K resolution should use 8 or more) or reducing the mirrored amount.

 

Usage: After unpacking the zip just start the exe (.NET 4.0 or newer has to be installed) and you'll have a new system-tray-icon. Clicking this icon will open a simple configuration-window (settings are automatically stored).

 

EDIT: Updated to V1.0.1

- Fixed calculation-error in Mirror-Mode

- Added Min-Lightness-Setting

 

EDIT: Updated to V1.0.1.1

- Added Gamma-Setting to allow stronger colors without preventing full black keys

 

EDIT: Updated to V1.0.1.2

- Updated CUE.NET to support the K95 Platinum lightbar

 

EDIT: Updated to V1.0.1.3

- Fixed an issue with DPI-scaled systems

 

Download: http://cue.wyrez.org/KeyboardAmbilight.zip (or the attachment of this post)

Source: https://github.com/DarthAffe/CUE.NET/tree/master/Examples/Ambilight/Example_Ambilight_full

 

Demo-Video (using aggressive settings with high update-rates and no smoothing): [ame]

[/ame]

KeyboardAmbilight.zip

Link to comment
Share on other sites

Hey Guys,

 

lately I implemented an Ambilight-Layer for Artemis (coming with the next version).

Since all the capture-logic and stuff could easily transfered, I decided to create a small standalone application providing only this ambilight-feature as a CUE.NET-example.

 

It's nothing too fancy in terms of UI or error-handling but I thought if someone is interested in stuff like this it might be worth posting it here.

The capture is done by reading the front-buffer of the graphic card, so it works for everything (games, movies, idling on the desktop, etc.) that happens on your primary-display.

 

A note about CPU-usage: 1920x1080 @ 20FPS update rate uses 1-2% on my system (i7 2600K) with default settings. But if you're using higher resolutions or to high settings you might completely eat your CPU. If you run into performance-issues try reducing the capture-rate (down to 10 looks quite good, 5 is bearable), increasing downsampling (4K resolution should use 8 or more) or reducing the mirrored amount.

 

Usage: After unpacking the zip just start the exe (.NET 4.0 or newer has to be installed) and you'll have a new system-tray-icon. Clicking this icon will open a simple configuration-window (settings are automatically stored).

 

Download: http://cue.wyrez.org/KeyboardAmbilight.zip (or the attachment of this post)

Source: https://github.com/DarthAffe/CUE.NET/tree/master/Examples/Ambilight/Example_Ambilight_full

 

Demo-Video (using aggressive settings with high update-rates and no smoothing):

 

Can you add an option to keep keyboard lit or dimly lit under completely black scenes (for night), for example when viewing my linux ssh terminal the kb goes black :), making it hard to see at night.

Link to comment
Share on other sites

Can you add an option to keep keyboard lit or dimly lit under completely black scenes (for night), for example when viewing my linux ssh terminal the kb goes black :), making it hard to see at night.

 

I just created a new version - attachement and links are updated.

Just try messing around with MinLightness. (Note that on keyboards without 16m color-mode you need to set it at least to 12 to have some effect.)

Link to comment
Share on other sites

I just created a new version - attachement and links are updated.

Just try messing around with MinLightness. (Note that on keyboards without 16m color-mode you need to set it at least to 12 to have some effect.)

 

great works perfect, thanks!

Link to comment
Share on other sites

  • 4 weeks later...
It seems to be impossible to have black keys for black parts of the screen while also having saturated colors on the other keys. When i set MinLightness to low values colors are very washed out. In your Video though this seems possible to get black and strong colors together. Is this due to the new version you made and is it possible then to get the old version?
Link to comment
Share on other sites

Increasing MinLightness should reduce the contrast. To get completely black keys you 'll have to set MinLightness to 0.

The saturation of colors (without increasing min lightness) depends highly on the reflected source. (The video I choosed works really good here - that's why I used it: p)

 

The settings used in the video were really aggressive settings:

  • Update-Rate: 40 (this shouldn't matter as long as there isn't fast, flashing stuff going on)
  • Ambilight-Mode: Mirror (this shouldn't matter at all)
  • Mirror-Amount: 10% [on displays with resolutions > 1920x1080 this should be a bit lower] (increasing this too far might cause the colors to get washed out.)
  • Downsampling: 2 (this is used mainly for performance purposes and shouldn't be a problem as long as you don't max it out on low resolution screens)
  • Smoothing: None (this is important to get sharp edges and colors, but might be a bit annoying in the long run)
  • Min Lightness: 0 (this is important too, since you can't get black with values > 0 [or > 11 if 16.8m colors mode is disabled])
  • From the rest only vertical flip and black-bar-detection bottom is enabled.

 

But I'm afraid, that the main problem is the lack of strong colors in the source most of the time.

I could try to implement a setting to perform some sort of a simple gama-correction. This might help to get strong colors without reducing the contrast.

Link to comment
Share on other sites

  • 3 weeks later...
Hello! I'm impressed of your work with this sweet keyboard illumination, great work! With movies or just normal PC usage this app works like a charm, but I have problem with games. When I play for example Batman Arkham Knight/Devil May Cry or any game in fullscreen mode, keyboard LEDs freezes and don't change with picture displayed on the screen. Everything start working back when I change in-game setting to display in window mode (which give me colors of my entire desktop) or when I just exit the game. Is there any solution to this problem?
Link to comment
Share on other sites

Oh, I didn't even realize that (I play everything windowed or fullscreen-windowed if the game supports it), but you're right.

This is a limitation coming from the way I capture the screen. Unlike screen-capture software (fraps or stuff like this) I don't interact with the game (and do dll-injection, function-hooking and stuff), but simply ask DirectX for the front-buffer (the last image reported to be drawn). For performance reasons a DirectX-fullscreen-application bypasses all of this management. Instead it draws 'directly on the screen', so I'm not able to get that image.

 

You can visualize that behavior by running a video and fullscreen the player (the ambilight should work correct now). Now just let the video running and start the game. You'll still see the visualization of the video, even if on your screen the game completly hides the video, which is still the top-most content on the screen for me.

Link to comment
Share on other sites

  • 2 weeks later...
I wonder if there is any possibility to use something like lighting link for this Ambilight effect.

 

No, since lighting link doesn't offer SDK support there is no easy way to integrate it (an own driver will of course always work but is really a lot of work).

Link to comment
Share on other sites

  • 2 months later...
I quickly downloaded this because I have been looking for something like this forever. However, to my surprise, it didn't work. After a little bit of debugging, I found out that the program will refuse to work if I have two monitors enabled. Can you add multi-monitor support to the program? I am eager to use ambilight.
Link to comment
Share on other sites

I quickly downloaded this because I have been looking for something like this forever. However, to my surprise, it didn't work. After a little bit of debugging, I found out that the program will refuse to work if I have two monitors enabled. Can you add multi-monitor support to the program? I am eager to use ambilight.

 

That's weird - I tested it with multiple monitors and it works fine for me. (I think most of the people using it do have more than one monitor to be honest.)

 

What exactly is the problem? Is there any error message or just a hard crash?

Link to comment
Share on other sites

Can you make it so works also on the light edge in K95 RGB Platinum?

 

I pushed an update - check the start-post.

 

 

Started by executing the program, it goes to tray then. Keyboard is still not ambilit up (Corsair RGB Strafe MX Silent). I have CUE SDK enabled. I disabled my other monitor and it started working on my one monitor that was enabled.

 

Ok that's weird. Sounds like windows doesn't correctly return your primary monitor if the second one is connected.

You should check and maybe reapply your primary-monitor-settings in the windows display settings and maybe your display driver.

Link to comment
Share on other sites

I pushed an update - check the start-post.

 

 

 

 

Ok that's weird. Sounds like windows doesn't correctly return your primary monitor if the second one is connected.

You should check and maybe reapply your primary-monitor-settings in the windows display settings and maybe your display driver.

 

I found out the problem has to do with DPI scaling. I normally have it set to 150% but as soon as I try the program at 100%, it works fine. My only problem now is I can't read text easily on non-dpi-aware applications. This thing is cool as hell though!

Link to comment
Share on other sites

I found out the problem has to do with DPI scaling. I normally have it set to 150% but as soon as I try the program at 100%, it works fine. My only problem now is I can't read text easily on non-dpi-aware applications. This thing is cool as hell though!

 

same problem... hope Darth can fix this! :laughing:

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...