It is currently March 28th, 2024, 4:29 pm

Visions+ by Sgt. E. V. McKay (Updated)

Weather skins
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Visions+ by Sgt. E. V. McKay (Updated)

Post by balala »

SilverAzide wrote: July 7th, 2021, 6:26 pm What I posted is perfectly fine for a newbie looking to increase the size of a skin with minimal effort. No need to get into complex hair-splitting unless that is what he was asking for.
Sorry, but it depends on many things. If you apply your TransformationMatrix, the meter will move as said before. if this is good or not, depends.
User avatar
SilverAzide
Rainmeter Sage
Posts: 2588
Joined: March 23rd, 2015, 5:26 pm
Contact:

Re: Visions+ by Sgt. E. V. McKay (Updated)

Post by SilverAzide »

balala wrote: July 7th, 2021, 6:33 pm Sorry, but it depends on many things. If you apply your TransformationMatrix, the meter will move as said before. if this is good or not, depends.
Wrong. So what if the meter moves? The TransformationMatrix must be applied to ALL meters, as I said. The entire skin will shift. The net result is everything is in the exact same position relative to everything other meter, just larger/smaller, as the OP desired.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Visions+ by Sgt. E. V. McKay (Updated)

Post by balala »

SilverAzide wrote: July 7th, 2021, 6:53 pm Wrong. So what if the meter moves? The TransformationMatrix must be applied to ALL meters, as I said. The entire skin will shift. The net result is everything is in the exact same position relative to everything other meter, just larger/smaller, as the OP desired.
Ok, as you wish. I'm not arguing.
User avatar
Yincognito
Rainmeter Sage
Posts: 7025
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Visions+ by Sgt. E. V. McKay (Updated)

Post by Yincognito »

I wonder if it would be difficult for the devs to implement a general "ScaleSkin" option in the [Rainmeter] section that won't suffer the mouse action related drawback of transformation matrices. Not sure if the amount of skin resize requests would warrant such an addition or how it would fit with the other size / position related options in that section, but I'm sure users would find it nice to have such a simple and effective way to resize skins. It would surely help skin designers as well, as they won't need to write various scale techniques for their skins... :???:
User avatar
SilverAzide
Rainmeter Sage
Posts: 2588
Joined: March 23rd, 2015, 5:26 pm
Contact:

Re: Visions+ by Sgt. E. V. McKay (Updated)

Post by SilverAzide »

Yincognito wrote: July 7th, 2021, 9:22 pm I wonder if it would be difficult for the devs to implement a general "ScaleSkin" option in the [Rainmeter] section that won't suffer the mouse action related drawback of transformation matrices. Not sure if the amount of skin resize requests would warrant such an addition or how it would fit with the other size / position related options in that section, but I'm sure users would find it nice to have such a simple and effective way to resize skins. It would surely help skin designers as well, as they won't need to write various scale techniques for their skins... :???:
From past discussions, I've been led to understand that a feature like this -- while a really wonderful addition -- would be rather substantially difficult to implement, particularly with the need to maintain backward compatibility. My feeble math skills are boggled at the thought of how one would add scaling on a skin that contains "TransformationMatrixed" meters that skew and rotate. Matrix math is beyond me; perhaps it is simple... :confused:
User avatar
Yincognito
Rainmeter Sage
Posts: 7025
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Visions+ by Sgt. E. V. McKay (Updated)

Post by Yincognito »

SilverAzide wrote: July 7th, 2021, 10:53 pm From past discussions, I've been led to understand that a feature like this -- while a really wonderful addition -- would be rather substantially difficult to implement, particularly with the need to maintain backward compatibility. My feeble math skills are boggled at the thought of how one would add scaling on a skin that contains "TransformationMatrixed" meters that skew and rotate. Matrix math is beyond me; perhaps it is simple... :confused:
Ah, I see - you're probably right and it makes sense, the devs would have to think about a ton of scenarios when implementing this. Thanks for letting me know. Regarding how one would add scaling on a skin that contains "TransformationMatrixed" meters that skew and rotate, my initial thought was that a matrix multiplication ("local" matrix transformation x "global" matrix transformation, where the fomer is the meter transformation and the latter is the overall scaling effect) would do. This seems to agree with my initial assessment. I have no idea yet what and how to multiply though, since it's possible some of the actual matrix elements are left out by Rainmeter, but maybe I'll do some tests over the weekend on this, just out of curiosity.

My idea of skin scaling leaned more into a "skin image resize" after all the other stuff are performed (i.e. just before skin redrawing). I'm not sure what actions should be taken regarding meter coordinates, dimensions and such though, so it would be indeed a difficult thing to accomplish (EDIT: on a second thought, I guess most of them would require some artificial multiplication by the scaling factor, and for the rest let the usual opaque pixel vs transparent pixel system handle it)...

The other option - if possible - would be to try this in Lua, but it's likely it will encounter similar hurdles. :confused:
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Visions+ by Sgt. E. V. McKay (Updated)

Post by balala »

Yincognito wrote: July 8th, 2021, 2:39 am Regarding how one would add scaling on a skin that contains "TransformationMatrixed" meters that skew and rotate, my initial thought was that a matrix multiplication ("local" matrix transformation x "global" matrix transformation, where the fomer is the meter transformation and the latter is the overall scaling effect) would do.
Yes, you're right. For such an operation the two matrices have to be multiplied together. For this I'm doing the followings: having the first matrix (the one which rotates, skews or does whatever) I comment it out and create the second matrix (the one for scaling for instance). When I have both matrices, I multiply them, according to the rules of matrices multiplication and are using the result of the multiplication as the final TransformationMatrix, which applies both transformations: the rotation (or skew) and the scaling. It's not as hard as it seems on a first look.
An extremely important thing which have to be kept in mind is that the order of multiplication is important,unlike in case of numbers multiplication (where the order doesn't matter): AxB is not equal at all with BxA.
You can find a few details about this operation in the Applying a Transformation Matrix section of Transformation Matrix Guide.
User avatar
Yincognito
Rainmeter Sage
Posts: 7025
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Visions+ by Sgt. E. V. McKay (Updated)

Post by Yincognito »

balala wrote: July 8th, 2021, 12:52 pm Yes, you're right. For such an operation the two matrices have to be multiplied together. For this I'm doing the followings: having the first matrix (the one which rotates, skews or does whatever) I comment it out and create the second matrix (the one for scaling for instance). When I have both matrices, I multiply them, according to the rules of matrices multiplication and are using the result of the multiplication as the final TransformationMatrix, which applies both transformations: the rotation (or skew) and the scaling. It's not as hard as it seems on a first look.
An extremely important thing which have to be kept in mind is that the order of multiplication is important,unlike in case of numbers multiplication (where the order doesn't matter): AxB is not equal at all with BxA.
You can find a few details about this operation in the Applying a Transformation Matrix section of Transformation Matrix Guide.
Yeah, but what is multiplied though? The (visible part of) TM matrix is a 3x2 matrix, and if you try to multiply it with a similar 3x2 matrix, that won't work, because the number of columns in the first matrix must be equal to the number of rows in the second matrix. That's why I said earlier that:
Yincognito wrote: July 8th, 2021, 2:39 amI have no idea yet what and how to multiply though, since it's possible some of the actual matrix elements are left out by Rainmeter [...]
So, you either have to multiply the 3x3 actual TM from the guide you linked to, or, alternatively, transpose one of the TM-s (I'm guessing, the 2nd one) in order for the multiplication to work.

Like I said, some tests on this are needed. Not a priority for the subject of this discussion since it's not like this is implementable globally on skin level, but just to make sure that it should be done in a certain way. Who knows, maybe some of us will need this someday...
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Visions+ by Sgt. E. V. McKay (Updated)

Post by balala »

Yincognito wrote: July 8th, 2021, 9:11 pm Yeah, but what is multiplied though? The (visible part of) TM matrix is a 3x2 matrix, and if you try to multiply it with a similar 3x2 matrix, that won't work, because the number of columns in the first matrix must be equal to the number of rows in the second matrix. That's why I said earlier that:
Yes, you're perfectly right when you say
Yincognito wrote: July 8th, 2021, 9:11 pm The (visible part of) TM matrix is a 3x2 matrix
because, even if there are only six elements (3x2), the transformation matrix actually is a 3x3 matrix. However because the last row is always 0,0,1 it is omitted (see the Transformation Matrices section of Transformation Matrix Guide). But in reality it does exist, so when you're multiplying the two transformation matrices, you're multiplying in fact a 3x3 matrix with another 3x3 matrix, which can be done fine. The last row after the multiplication is the same 0,0,1.
User avatar
Yincognito
Rainmeter Sage
Posts: 7025
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Visions+ by Sgt. E. V. McKay (Updated)

Post by Yincognito »

balala wrote: July 9th, 2021, 10:34 am Yes, you're perfectly right when you say

because, even if there are only six elements (3x2), the transformation matrix actually is a 3x3 matrix. However because the last row is always 0,0,1 it is omitted (see the Transformation Matrices section of Transformation Matrix Guide). But in reality it does exist, so when you're multiplying the two transformation matrices, you're multiplying in fact a 3x3 matrix with another 3x3 matrix, which can be done fine. The last row after the multiplication is the same 0,0,1.
Alright, that makes sense - thanks for letting me know. Will try it out, but for the moment I got to make a bug report.
Post Reply