The Corsair User Forums  

Go Back   The Corsair User Forums > Corsair Product Discussion > Corsair Utility Engine (CUE) 1.x and 2.x > CUE 1.x and 2.x SDK

 
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 11-05-2016, 08:26 PM
Darth Affe's Avatar
Darth Affe Darth Affe is offline
//TODO add user title
Darth Affe's PC Specs
 
Join Date: Sep 2015
Location: UTC+1
Posts: 125
POST ID # = 878114
Darth Affe Reputation: 15
Woah! Keyboard-Ambilight

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...Ambilight_full

Demo-Video (using aggressive settings with high update-rates and no smoothing):
Attached Files
File Type: zip KeyboardAmbilight.zip (680.8 KB, 267 views)

Last edited by Darth Affe; 04-08-2017 at 09:22 AM. Reason: Version update
  #2  
Old 11-10-2016, 08:43 AM
noir noir is offline
Registered User
 
Join Date: Jun 2015
Posts: 88
POST ID # = 878533
noir Reputation: 20
Default

nice work, works great on my strafe rgb :)
  #3  
Old 11-10-2016, 09:54 PM
brainless's Avatar
brainless brainless is offline
Registered User
 
Join Date: Aug 2016
Location: Germany
Posts: 363
POST ID # = 878597
brainless Reputation: 11
Default

Getting an error: MSVCP140.dll is missing.

But I have Visual C++ Redistributable für Visual Studio 2015 and .NET Framework 4.6.1 installed?!
__________________
  #4  
Old 11-10-2016, 11:01 PM
noir noir is offline
Registered User
 
Join Date: Jun 2015
Posts: 88
POST ID # = 878602
noir Reputation: 20
Default

Quote:
Originally Posted by brainless View Post
Getting an error: MSVCP140.dll is missing.

But I have Visual C++ Redistributable für Visual Studio 2015 and .NET Framework 4.6.1 installed?!
Install the VC++ 2015 run-times, maybe you installed the 64bit version, also try to install the 32bit runtime.
https://www.microsoft.com/en-us/down....aspx?id=48145
  #5  
Old 11-12-2016, 07:07 AM
noir noir is offline
Registered User
 
Join Date: Jun 2015
Posts: 88
POST ID # = 878724
noir Reputation: 20
Default

Quote:
Originally Posted by Darth Affe View Post
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...Ambilight_full

Demo-Video (using aggressive settings with high update-rates and no smoothing): https://www.youtube.com/watch?v=o4t6M25bM24
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.
  #6  
Old 11-12-2016, 08:54 AM
Darth Affe's Avatar
Darth Affe Darth Affe is offline
//TODO add user title
Darth Affe's PC Specs
 
Join Date: Sep 2015
Location: UTC+1
Posts: 125
POST ID # = 878731
Darth Affe Reputation: 15
Default

Quote:
Originally Posted by noir View Post
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.)
  #7  
Old 11-13-2016, 03:14 AM
noir noir is offline
Registered User
 
Join Date: Jun 2015
Posts: 88
POST ID # = 878808
noir Reputation: 20
Default

Quote:
Originally Posted by Darth Affe View Post
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!
  #8  
Old 12-08-2016, 02:26 PM
Liquid Cobalt Liquid Cobalt is offline
Registered User
 
Join Date: Oct 2014
Posts: 19
POST ID # = 881839
Liquid Cobalt Reputation: 10
Default

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?
  #9  
Old 12-08-2016, 03:49 PM
Darth Affe's Avatar
Darth Affe Darth Affe is offline
//TODO add user title
Darth Affe's PC Specs
 
Join Date: Sep 2015
Location: UTC+1
Posts: 125
POST ID # = 881847
Darth Affe Reputation: 15
Default

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.
  #10  
Old 12-11-2016, 12:01 PM
Darth Affe's Avatar
Darth Affe Darth Affe is offline
//TODO add user title
Darth Affe's PC Specs
 
Join Date: Sep 2015
Location: UTC+1
Posts: 125
POST ID # = 882188
Darth Affe Reputation: 15
Default

@Liquid Cobalt: I just added the gamma-correction I mentioned earlier. Just increase the value to something > 1 - to get stronger colors.
  #11  
Old 12-12-2016, 05:24 PM
Liquid Cobalt Liquid Cobalt is offline
Registered User
 
Join Date: Oct 2014
Posts: 19
POST ID # = 882330
Liquid Cobalt Reputation: 10
Default

Thank you very much! I think a huge part of my problem was the fact that i had Mirror-Amount set to 100% because i wanted to "see" my whole screen on the keyboard.
  #12  
Old 12-30-2016, 04:25 PM
Afroasasyn Afroasasyn is offline
Registered User
Afroasasyn's PC Specs
 
Join Date: Dec 2016
Posts: 2
POST ID # = 884400
Afroasasyn Reputation: 10
Default

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?
  #13  
Old 12-30-2016, 05:41 PM
Darth Affe's Avatar
Darth Affe Darth Affe is offline
//TODO add user title
Darth Affe's PC Specs
 
Join Date: Sep 2015
Location: UTC+1
Posts: 125
POST ID # = 884415
Darth Affe Reputation: 15
Default

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.
  #14  
Old 01-13-2017, 04:41 PM
Afroasasyn Afroasasyn is offline
Registered User
Afroasasyn's PC Specs
 
Join Date: Dec 2016
Posts: 2
POST ID # = 886477
Afroasasyn Reputation: 10
Default

Hello again :) I just bought a Corsair M65 PRO and I wonder if there is any possibility to use something like lighting link for this Ambilight effect.
  #15  
Old 01-13-2017, 06:18 PM
Darth Affe's Avatar
Darth Affe Darth Affe is offline
//TODO add user title
Darth Affe's PC Specs
 
Join Date: Sep 2015
Location: UTC+1
Posts: 125
POST ID # = 886487
Darth Affe Reputation: 15
Default

Quote:
Originally Posted by Afroasasyn View Post
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).
 

Tags
ambilight, artemis, cue.net

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:33 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.