-
-
Notifications
You must be signed in to change notification settings - Fork 265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ambient + Custom colors effect for ROG Strix #1582
Conversation
Refact AsusUSB.cs
Added AuraMsg.cs
Decrease saturation.
@DLdota hello, thanks for PR, that's quite a lot of changes! Honestly, the main reason I didn't add "ambient" RGB (or literally coloring keyboard into average or dominant color of the screen) is performance cost for that You seem to have a powerful CPU, but when I try that on my G14 I get like 4-5% CPU usage constantly (which is really a lot) I don't mind to merge it, but then it will have to be a veeery big asterisk that it will hamper performance significantly :| as otherwise it will be a shitstorm of topics and comments that "g-helper destroys someone's laptop" ... |
@DLdota so, I decided to dig into performance issues a bit more. And it looks like screenshotting / measuring color is not the only thing that takes resources. It is also a I have migrated everything to I have also did a split of It's already merged into main 5c45003 I may still look for faster / less taxing methods to do screenshots and measure colors, may be we can pull something out here actually. |
@seerge Nice work! And the current method can be optimized 2-3 times using STRETCH_DELETESCANS to get screen with a small resolution (300 or 400) pixels and then resize it qualitatively to 4x2. |
@DLdota ok, good. If you want - you can try to update your PR to match current implementation (with If you don't - let me know , and I will try to come up with something by myself I have quickly looked into alternative ways to make screenshot using DirectX, but it requires including bunch of extra libraries in the app, and therefore increases total size by a lot. And I'm trying to avoid it atm. |
Reduced CPU load to 0.15% (checked via ProcessHacker) |
@DLdota cool, but can you migrate your additions into current state of main branch (that uses |
Done! |
@DLdota good! this time it consumes something between 0.1-0.2 on 1600p display and 0.3% when 4k monitor is set as main in my case :) that will work. Merging then. Thanks. |
When I set ambient mode on ROG STRIX G533ZW not all the keys all lighting up. The ones that are lighted up work fine in ambient mode and function as supposed. But the ones not working stays off all the time. When I switch to other lighting mode, all the keys are working fine. |
@D9r31Y05 can you post a photo of your keyboard? How does Heatmap mode look on your device? |
@DLdota I think that light zones that you used at Line 522 in 96cbcba
Don't match with devices that support per-key RGB (as then each zone = 1 key, not a real "zone") As far as I remember OpenRGB has separate protocol, to set backlight per real zone, not key. Do you mind to check that ? :) I can't test anything of that as I simply don't own a Strix device. |
@D9r31Y05 can you check OpenRGB app and test if it allows you to set RGB colors there per Zone (not per key!) and if works for you there ? Your keyboard is technically divided into 4 vertical zones. And each can light up all together instead of lighting up individually key by key. |
@seerge I will check this out today and report back. |
@seerge I tried OpenRGB app. The only setting in the drop down menu zone working to change the color of the laptop and keyboard is all zones or keyboard zone. Lightbar or lid doesn't do anything at all. I can change color per key in the keyboard zone but nothing else. To change lid or logo or lightbar I have to change everything at the same time in keyboard or all zones. As you can see in the last 2 pictures I put the keyboard in purple and the lid and lightbar in green and blue but no change registered. |
@D9r31Y05 oke, clear. Then it could be difficult to properly do multiple colors backlight for ambient mode on your device. As you need to send correct colors not to 4 zones, but to each button individually, and consider it's actual (physical) location on keyboard :) For me - it's almost unrealistic to do (as i don't even have a strix model), may be someone else can contribute I can offer a "temporary" solution - to color whole keyboard into 1 average screen color. Same as G-Helper does now for all models w/o per-key RGB (like Zephyrus or Flow). |
@D9r31Y05 check this build |
@seerge Tried it and same behavior. Some keys stay off no matter what is on the screen. |
@seerge I tried the ambient effect added in OpenRGB with effect plugin. It is working as it should. Sampling my screen and using screen copy. All my keys and laptop zones are lighting up correctly and reacting to what is shown on the screen. The effect is getting applied per key. I think @DLdota is a contributor to the ambient effect in the OpenRGB plugin. UPDATE: After further testing with OpenRGB Ambient mode, the effect works but there is a strobing flickering effect and the smoothness is nowhere as good as the Ambient effect implemented in G-Helper. UPDATE 2: After further further testing the OpenRGB Ambient mode is now as smooth as the one in G-Helper. Cannot find how to reproduce the strobing flickering effect and the smoothness is now ok. |
@D9r31Y05 can you quickly check this build ? It should be only a single-zone Ambient, but I want to check if my attempt to set all RGB per key works ? |
@seerge Tried it and all the zones and keys are the same ambient color reacting to the screen. It works like you want. |
it's a lottery without information about led indexes.
almost the same. but It’s not clear which button corresponds to which led index. |
I dont think they are correct, cuz the screenshot shows that the lightbar zone didnt change color to green. |
@DLdota which screenshot ? I took indexes from here https://gitlab.com/CalcProgrammer1/OpenRGB/-/blob/master/Controllers/AsusAuraCoreController/AsusAuraCoreLaptopController.cpp |
@D9r31Y05 can you try this build and check if zones work ? |
@seerge Yes I can clearly see different laptop lighting zones reacting to different color in my screen. |
@seerge I am not able to test and post photo right now. I'll be able tomorrow. Sorry for the delay. |
@DLdota well, i assume for your case led layout is just different (much less zones) :) if you can tweak it to also work for you that would be cool. As per-key zones seem to work ok (just confirmed it in another issue) #1615 (comment) I think your model is one of those Line 356 in fad7396
|
yes, very soon |
@seerge Here are the screenshot of the zone reacting to the screen. |
@seerge Here is a video of the ambient effect with zone with G-Helper. 20231120_090612.mp4Here is the same video but with the ambient effect from Open RGB ambient effect. 20231120_090805.mp4 |
Great, looks ok as for me |
Yes thank you for fixing it! |
Just saying it here. I use a laptop with an extra monitor. The ambient mode uses the point of contact between my laptop screen and monitor for the keyboard colour. Basically where the edge of screen meet. Is it intended like that? |
@HaziqBD ambient mode makes a screenshot of your main display (in windows), and then sets keyboard to average color of the screen or 4 vertical zones on this screen (depending on what kind of backlight you have) |
@seerge ouh ok. Been wondering how it works. Thanks for the info |
Hello! It seems to be not working properly on G14 2022. Whole keyboard is white (1zone keyboard, that's okay), but it does not change colors, only intensity of white. |
yes ur right, Due to excessive rapid compression, the black color eats other colors. need to do the compression like the 4-zone method and it will be noticeably better. i will make PR. |
video_2023-11-10_00-37-42.mp4
Ambient effect use ~ 0.4% CPU.
I also rewrote USB.cs cuz it was mess