It is currently July 27th, 2021, 2:11 pm

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

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

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

Post by balala »

Yincognito wrote: July 9th, 2021, 3:45 pm Alright, that makes sense - thanks for letting me know.
You're welcome.
User avatar
Yincognito
Rainmeter Sage
Posts: 3643
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 amBut 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.
You're right, just got the chance to test it out and it worked without problems. I multiplied the scaling matrix with the rotation/skewing matrix (in this order), so in a hypothetical case that such a global scaling TM would be implemented at skin level, all it has to be done is to multiply the skin level TM with whatever local level TM a meter has. The problem is, of course, that the TM drawbacks regarding coordinates would still be present, unless the devs can figure a way to circumvent that (similar to how transformations are applied to Shape meters, for example).

For the record, assuming the normal {scale x};{skew y};{skew x};{scale y};{move x};{move y} form of a TM, used for the 1st transformation aka scaling, and a 2nd TM used for the 2nd transformation aka the rotation - where I replaced "scale" with "zoom" in order for stuff to fit nicely under each other and replaced "x" with "a" and "y" with "b" for the 2nd matrix, the multiplication is as follows (the matrices are written column after column in Rainmeter, obviously excluding the 3rd "0 0 1" row):

Code: Select all

| zoomx  skewx  movex |   | zooma  skewa  movea |   | zoomx*zooma+skewx*skewb+movex*0  zoomx*skewa+skewx*zoomb+movex*0  zoomx*movea+skewx*moveb+movex*1 |
| skewy  zoomy  movey | x | skewb  zoomb  moveb | = | skewy*zooma+zoomy*skewb+movey*0  skewy*skewa+zoomy*zoomb+movey*0  skewy*movea+zoomy*moveb+movey*1 |
|   0      0      1   |   |   0      0      1   |   |     0*zooma+    0*skewb+    1*0      0*skewa+    0*zoomb+    1*0      0*movea+    0*moveb+    1*1 |
Fortunately, in my specific test case, the scaling matrix was quite easy, i.e. TransformationMatrix=#Zoom#;0;0;#Zoom#;0;0, so all it took was to multiply each element of my 2nd (rotation) TM with the #Zoom# value.

P.S. Slightly off topic, but did anyone write a matrix multiplication skin for Rainmeter? Naturally, the vast majority of skin develpers and users don't use TMs, but it's kind of lame to have to manually multiply the above elements when a matrix multiplication skin could do it in an instant and yield the final formulas as strings, according to the two matrices' values, with the only thing the skin developer / user would need to do to be zero-ing out or canceling out possible operands.
User avatar
balala
Rainmeter Sage
Posts: 12970
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

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

Post by balala »

Yincognito wrote: July 9th, 2021, 8:11 pm You're right, just got the chance to test it out and it worked without problems. I multiplied the scaling matrix with the rotation/skewing matrix (in this order), so in a hypothetical case that such a global scaling TM would be implemented at skin level, all it has to be done is to multiply the skin level TM with whatever local level TM a meter has. The problem is, of course, that the TM drawbacks regarding coordinates would still be present, unless the devs can figure a way to circumvent that (similar to how transformations are applied to Shape meters, for example).
I'm glad if you succeeded, but not sure I understand what you mean by "the skin level TM" and what by "whatever local level TM". What do you mean?
User avatar
Yincognito
Rainmeter Sage
Posts: 3643
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, 8:20 pm I'm glad if you succeeded, but not sure I understand what you mean by "the skin level TM" and what by "whatever local level TM". What do you mean?
Well, the discussion was lately about how (or if) a "skin level" scaling could be done - see SilverAzide reply here. In that reply, he correctly wondered how would one try to scale a skin that already contains meters with their own Transformation Matrices ("local level TMs", in short). So, my "what if" scenario was what would the devs need to do to make sure the (hypothetical) skin level scaling works for already "locally transformed" meters, assuming both are done using TMs. The anticipated and confirmed answer was: a "simple" matrix multiplication, i.e. SkinLevelTM x LocalLevelTM (basically, scaling x rotation).

So, in hypothetical code:

Code: Select all

...
[Rainmeter]
...
SkinTransformationMatrix=#ScaleX#;0;0;#ScaleY#;0;0
...
...
...
[SomeMeter]
...
TransformationMatrix=SomeMeterTransformationMatrix
...
The actual TM applied to [SomeMeter] would be SkinTransformationMatrix x SomeMeterTransformationMatrix.

I hope I was clearer this time. ;-)
User avatar
SilverAzide
Rainmeter Sage
Posts: 1369
Joined: March 23rd, 2015, 5:26 pm

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

Post by SilverAzide »

Yincognito wrote: July 9th, 2021, 8:11 pm

Code: Select all

| zoomx  skewx  movex |   | zooma  skewa  movea |   | zoomx*zooma+skewx*skewb+movex*0  zoomx*skewa+skewx*zoomb+movex*0  zoomx*movea+skewx*moveb+movex*1 |
| skewy  zoomy  movey | x | skewb  zoomb  moveb | = | skewy*zooma+zoomy*skewb+movey*0  skewy*skewa+zoomy*zoomb+movey*0  skewy*movea+zoomy*moveb+movey*1 |
|   0      0      1   |   |   0      0      1   |   |     0*zooma+    0*skewb+    1*0      0*skewa+    0*zoomb+    1*0      0*movea+    0*moveb+    1*1 |
P.S. Slightly off topic, but did anyone write a matrix multiplication skin for Rainmeter? Naturally, the vast majority of skin develpers and users don't use TMs, but it's kind of lame to have to manually multiply the above elements when a matrix multiplication skin could do it in an instant and yield the final formulas as strings, according to the two matrices' values, with the only thing the skin developer / user would need to do to be zero-ing out or canceling out possible operands.
This is really great... I would be so nice if the Transformation Matrix Guide had this example in it. The guide discusses how to do everything BUT how to do the actual math needed to multiply two 3x3 matrices together (or, if it's in there somewhere, it's not as clear as in your example).

Based on your pseudo-code, I don't see why a Lua function couldn't be created to take two TM strings, multiply them together, and return the result in a RM-style TM string. 🤔
Gadgets Wiki GitHub More Gadgets...
User avatar
Yincognito
Rainmeter Sage
Posts: 3643
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

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

Post by Yincognito »

SilverAzide wrote: July 9th, 2021, 9:50 pmThis is really great... I would be so nice if the Transformation Matrix Guide had this example in it. The guide discusses how to do everything BUT how to do the actual math needed to multiply two 3x3 matrices together (or, if it's in there somewhere, it's not as clear as in your example).
Glad you like it, but, well, it's just a matrix multiplication, no big deal - summing up the products between the elements from the 1st matrix' rows and the 2nd matrix columns - though this can very easily get complicated. :oops: Yeah, the manual talks about the multiplication of the TM matrix, but mainly in the context of multiplying it with point coordinates, and only briefly about what (or how) to do to get more transformations on top of each other. Now, if one reads the guide closely, he can probably get hints about how things work or should be done (I only discovered this now, but it's there, hidden in a ton of info in the guide - had I known about this, I wouldn't have done the above manually since it apparently works with bare strings, though it was a nice exercise), but I agree that a standard example, applied to Rainmeter's context, is clearer. ;-)
SilverAzide wrote: July 9th, 2021, 9:50 pmBased on your pseudo-code, I don't see why a Lua function couldn't be created to take two TM strings, multiply them together, and return the result in a RM-style TM string. 🤔
My thought as well, it's as simple as a couple of FOR loops, but I was thinking more of a general matrix multiplicator, not necessarily restricted to a transformation matrix. Remember, there are also color matrices, that work roughly the same way, yet with different number of elements...
User avatar
eclectic-tech
Rainmeter Sage
Posts: 4328
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

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

Post by eclectic-tech »

Are we entering the TransformationMatrix?
Image
Just follow the white rabbit...
User avatar
jsmorley
Developer
Posts: 21973
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

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

Post by jsmorley »

eclectic-tech wrote: July 9th, 2021, 10:58 pm Are we entering the TransformationMatrix?
Image
Just follow the white rabbit...
Any technology where I need to care if the cat in the box is alive or dead is one I stay away from...
User avatar
eclectic-tech
Rainmeter Sage
Posts: 4328
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

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

Post by eclectic-tech »

  This thread has been permanently hijacked for use as a discussion on scaling... go for it!  
User avatar
Yincognito
Rainmeter Sage
Posts: 3643
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

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

Post by Yincognito »

eclectic-tech wrote: July 9th, 2021, 10:58 pm Are we entering the TransformationMatrix?
Just follow the white rabbit...
jsmorley wrote: July 9th, 2021, 11:02 pmAny technology where I need to care if the cat in the box is alive or dead is one I stay away from...
:rolmfao:
I guess I took the red pill, ate the rabbit and resurrected the cat instead - entered The Matrix only to trigger The Walking Dead...

P.S. Very nice skin(s), by the way, eclectic-tech. I would have probably noticed them if not for the captivating exchange between balala and SilverAzide on those little matrices. :D