It is currently April 26th, 2024, 12:14 pm

Colormatrix bugged?

Get help with creating, editing & fixing problems with skins
AtleastItrid
Posts: 9
Joined: March 11th, 2017, 1:41 pm

Colormatrix bugged?

Post by AtleastItrid »

I use a colormatrix to make my immage appear and then slowly color because Imagetint didn't work for that. The script I use is:

Code: Select all

ColorMatrix1=(#Col#*0.67+0.33);(0.33*(1-#Col#));(0.33*(1-#Col#));0;0
ColorMatrix2=(0.59*(1-#Col#));(#Col#*0.41+0.59);(0.59*(1-#Col#));0;0
ColorMatrix3=(0.11*(1-#Col#));(0.11*(1-#Col#));(#Col#*0.89+0.11);0;0
ColorMatrix4=0; 0; 0; #SON#; 0
ColorMatrix5=0; 0; 0; 0; 1

ActionList1=Repeat Vis, #Speed#, #Dtimes#

Vis=[!SetVariable SON (#SON#+1/#Dtimes#)][!UpdateMeter Icon1][!UpdateMeter Icon2][!UpdateMeter Icon3][!UpdateMeter Icon4][!Redraw][!UpdateMeasure expand]
If I set Dtimes to 20 10 or 1 it works fine, but with other numbers like 12 it doesn't work and only fades in slightly. What did I do wrong? Or is the matrix bugged?
User avatar
balala
Rainmeter Sage
Posts: 16172
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Colormatrix bugged?

Post by balala »

AtleastItrid wrote:I use a colormatrix to make my immage appear and then slowly color because Imagetint didn't work for that. The script I use is:

Code: Select all

ColorMatrix1=(#Col#*0.67+0.33);(0.33*(1-#Col#));(0.33*(1-#Col#));0;0
ColorMatrix2=(0.59*(1-#Col#));(#Col#*0.41+0.59);(0.59*(1-#Col#));0;0
ColorMatrix3=(0.11*(1-#Col#));(0.11*(1-#Col#));(#Col#*0.89+0.11);0;0
ColorMatrix4=0; 0; 0; #SON#; 0
ColorMatrix5=0; 0; 0; 0; 1

ActionList1=Repeat Vis, #Speed#, #Dtimes#

Vis=[!SetVariable SON (#SON#+1/#Dtimes#)][!UpdateMeter Icon1][!UpdateMeter Icon2][!UpdateMeter Icon3][!UpdateMeter Icon4][!Redraw][!UpdateMeasure expand]
If I set Dtimes to 20 10 or 1 it works fine, but with other numbers like 12 it doesn't work and only fades in slightly. What did I do wrong? Or is the matrix bugged?
I couldn't replicate the issue. It's true you've posted the ColorMatrix options, the ActionList1 and the appropriate Vis options as well, but there also are a lot of unknown things: for example all variables. What are their initial values? And how are looking the [Icon1], [Icon2], [Icon3] and [Icon4] meters and how is looking the [expand] measure? With some values I tried, everything is looking all right.
So, you should post the whole code, it would be much much easier for us to help. Or an even better idea would be to pack the whole config and upload it.

Note: Anytime anyone is asking for help, should help us to help. With incomplete information, we simply can't. So, please always upload the packed config or at least post the whole code.
AtleastItrid
Posts: 9
Joined: March 11th, 2017, 1:41 pm

Re: Colormatrix bugged?

Post by AtleastItrid »

Yeah sorry, I will upload it here.

I have set DTimes to a value that works, change it to 10 and it doesnt work anymore.
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 16172
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Colormatrix bugged?

Post by balala »

I'm not sure what would you like to achieve, but I'd think everything is working well (at least as far as I can tell). So, when I'm hovering the mouse over the white quadrant (on the upper left corner of the screen), it grows and the black and white icons gradually appears. When I'm hovering the mouse over any of these icons, it is colored. Then when I leave the skin, the icons are fade out, then the quadrant is decreasing. And it seems that doesn't matter what value do I set for the Dtimes variable, for different values, the speed of the animation is changing, but it always work.
AtleastItrid wrote:I have set DTimes to a value that works, change it to 10 and it doesnt work anymore.
I'd say exactly vice-versa: it seems that the skin will work well, if you're using an integer value for the Dtimes variable. That's happening because if you're using eg 12.5 for this variable, the values set by the Vis and InVis options of the [expand] measure to the SON variable, will not be kept between 0 and 1, as they should. When it's going outside of these limits, the skin is not working well. So, there's no bug at all, just the variables don't change as they should.
And one more observation (or two). I don't know why have you used the ActionTimer plugin to set the value of the Col, Col2 (and so on) variables. I'd use simple !Setvariable bangs on the MouseOverAction and MouseLeaveAction options of the [IconC], [Icon1], [Icon2] (and so on) meters:

Code: Select all

[IconC]
Meter=Image
...
MouseOverAction=[!SetVariable ColC 0][!UpdateMeter IconC][!Redraw]
MouseLeaveAction=[!SetVariable ColC 1][!UpdateMeter IconC][!Redraw]

[Icon1]
Meter=Image
...
MouseOverAction=[!SetVariable Col 0][!UpdateMeter Icon1][!Redraw]
MouseLeaveAction=[!SetVariable Col 1][!UpdateMeter Icon1][!Redraw]

[Icon2]
Meter=Image
...
MouseOverAction=[!SetVariable Col2 0][!UpdateMeter Icon2][!Redraw]
MouseLeaveAction=[!SetVariable Col2 1][!UpdateMeter Icon2][!Redraw]

[Icon3]
Meter=Image
...
MouseOverAction=[!SetVariable Col3 0][!UpdateMeter Icon3][!Redraw]
MouseLeaveAction=[!SetVariable Col3 1][!UpdateMeter Icon3][!Redraw]

[Icon4]
Meter=Image
...
MouseOverAction=[!SetVariable Col4 0][!UpdateMeter Icon4][!Redraw]
MouseLeaveAction=[!SetVariable Col4 1][!UpdateMeter Icon4][!Redraw]

[Icon5]
Meter=Image
...
MouseOverAction=[!SetVariable Col5 0][!UpdateMeter Icon5][!Redraw]
MouseLeaveAction=[!SetVariable Col5 1][!UpdateMeter Icon5][!Redraw]

[Icon6]
Meter=Image
...
MouseOverAction=[!SetVariable Col6 0][!UpdateMeter Icon6][!Redraw]
MouseLeaveAction=[!SetVariable Col6 1][!UpdateMeter Icon6][!Redraw]
Also, if you replace the above options, you can remove the ActionList3, ActionList4, Color, Uncol, ActionList5, ActionList6, Color2, Uncol2, ActionList7, ActionList8, Color3, Uncol3, ActionList9, ActionList10, Color4, Uncol4, ActionList11, ActionList12, Color5, Uncol5, ActionList13, ActionList14, Color6, Uncol6, ActionList15, ActionList16, ColorC and UncolC options of the [expand] measure, because you don't need them any more.
Also I1d add some bangs to stop the appropriate actions of the [expand] measure:

Code: Select all

[MeterString1]
...
MouseOverAction=[!CommandMeasure expand "Execute 1"][!CommandMeasure expand "Stop 2"]
MouseLeaveAction=[!CommandMeasure expand "Execute 2"][!CommandMeasure expand "Stop 1"]