Re: Visions+ by Sgt. E. V. McKay (Updated)
Posted: July 9th, 2021, 7:40 pm
You're welcome.
You're welcome.
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).
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 |
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?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).
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).
Code: Select all
...
[Rainmeter]
...
SkinTransformationMatrix=#ScaleX#;0;0;#ScaleY#;0;0
...
...
...
[SomeMeter]
...
TransformationMatrix=SomeMeterTransformationMatrix
...
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).Yincognito wrote: ↑July 9th, 2021, 8:11 pmP.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.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 |
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. 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 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).
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...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.
Any technology where I need to care if the cat in the box is alive or dead is one I stay away from...eclectic-tech wrote: ↑July 9th, 2021, 10:58 pm Are we entering the TransformationMatrix?
Just follow the white rabbit...
This thread has been permanently hijacked for use as a discussion on scaling... go for it! |
eclectic-tech wrote: ↑July 9th, 2021, 10:58 pm Are we entering the TransformationMatrix?
Just follow the white rabbit...