It is currently April 27th, 2024, 10:55 am

Can I use TransformationMatrix to create perspektiv

Get help with creating, editing & fixing problems with skins
User avatar
sa1nt4ch
Posts: 49
Joined: December 16th, 2020, 8:30 am
Location: Switzerland

Can I use TransformationMatrix to create perspektiv

Post by sa1nt4ch »

Hy I worked my way throu TransformationMatrix Guide.
I did get my head around skewing and rotating so far so good. But what I acualy want to do is using TransformationMatrix to create Perspektive.

so to transform a plain square into some thing like this
Unbenannt.png
Simple skewing does not do the trick since the the angle in all corners are difrent and the length of the vertical / horizontal are diffrent as well.

Has any one got the hang of this and can give me a hint.
You do not have the required permissions to view the files attached to this post.
User avatar
death.crafter
Rainmeter Sage
Posts: 1399
Joined: April 24th, 2021, 8:13 pm

Re: Can I use TransformationMatrix to create perspektiv

Post by death.crafter »

sa1nt4ch wrote: August 8th, 2021, 12:30 pm Hy I worked my way throu TransformationMatrix Guide.
I did get my head around skewing and rotating so far so good. But what I acualy want to do is using TransformationMatrix to create Perspektive.

so to transform a plain square into some thing like this Unbenannt.png

Simple skewing does not do the trick since the the angle in all corners are difrent and the length of the vertical / horizontal are diffrent as well.

Has any one got the hang of this and can give me a hint.
No. But you can use MagickMeter if you are prepared to go to greater lengths to achieve it.

https://github.com/khanhas/MagickMeter

https://github.com/khanhas/MagickMeter#how-to-install

https://github.com/khanhas/MagickMeter/wiki

https://github.com/khanhas/MagickMeter/wiki/Effects#perspective
from the Realm of Death
User avatar
sa1nt4ch
Posts: 49
Joined: December 16th, 2020, 8:30 am
Location: Switzerland

Re: Can I use TransformationMatrix to create perspektiv

Post by sa1nt4ch »

sounds intersting will have a look at it.

can it distort only images or Meters as well. cose that will be the final goal.
User avatar
death.crafter
Rainmeter Sage
Posts: 1399
Joined: April 24th, 2021, 8:13 pm

Re: Can I use TransformationMatrix to create perspektiv

Post by death.crafter »

sa1nt4ch wrote: August 8th, 2021, 9:50 pm sounds intersting will have a look at it.

can it distort only images or Meters as well. cose that will be the final goal.
It can create images or distort images. And you need an image meter to use the image created.

So no, it can not distort meters. But you can create text and shapes with it and use it as meters.
https://github.com/khanhas/MagickMeter/wiki#measure-options
from the Realm of Death
User avatar
sa1nt4ch
Posts: 49
Joined: December 16th, 2020, 8:30 am
Location: Switzerland

Re: Can I use TransformationMatrix to create perspektiv

Post by sa1nt4ch »

Pitty, I intendet to do histograms and lines that disapere into the distance.

Some thing like this
hologram-perspective-depth-150450-2560x2546-61861575798908yhai0whidw.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
Yincognito
Rainmeter Sage
Posts: 7175
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Can I use TransformationMatrix to create perspektiv

Post by Yincognito »

You can use Path Shape meters and sin() and cos() to create perspective histograms, but it will be quite complicated and probably not worth the effort. You could even use a set of Line Shapes moving on the X axis and stretched on the Y axis to easier achieve your goal, but you won't be able to use the "histogram meter" for it, you'll have to simulate it manually, so to speak.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
sa1nt4ch
Posts: 49
Joined: December 16th, 2020, 8:30 am
Location: Switzerland

Re: Can I use TransformationMatrix to create perspektiv

Post by sa1nt4ch »

I went over the Matrix again, and figured that if I wanted to creat perspektiv I would need to muliply not with x but with a funktion.
User avatar
death.crafter
Rainmeter Sage
Posts: 1399
Joined: April 24th, 2021, 8:13 pm

Re: Can I use TransformationMatrix to create perspektiv

Post by death.crafter »

sa1nt4ch wrote: August 9th, 2021, 1:24 pm I went over the Matrix again, and figured that if I wanted to creat perspektiv I would need to muliply not with x but with a funktion.
Perspective, by nature, needs z level transformation matrix. So, I don't think you can do it in Rainmeter, since it doesn't support it.
from the Realm of Death
User avatar
balala
Rainmeter Sage
Posts: 16176
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Can I use TransformationMatrix to create perspektiv

Post by balala »

sa1nt4ch wrote: August 9th, 2021, 1:24 pm I went over the Matrix again, and figured that if I wanted to creat perspektiv I would need to muliply not with x but with a funktion.
You can't by TransformationMatrix. See and read the last paragraph before the Help! It's not working! section and / or the first paragraph of the same Help! It's not working! section of TransformationMatrix Guide.
User avatar
Yincognito
Rainmeter Sage
Posts: 7175
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Can I use TransformationMatrix to create perspektiv

Post by Yincognito »

sa1nt4ch wrote: August 9th, 2021, 1:24 pm I went over the Matrix again, and figured that if I wanted to creat perspektiv I would need to muliply not with x but with a funktion.
Like balala mentioned, you can't achieve perspective with TransformationMatrix, because if you have two parallel lines, they'll still be parallel after skewing. In other words, you can't create a trapezoid from a rectangle, only a parallelogram.

What you want can only be achieved by building your shape more or less "manually". For example, here (and especially in the post afterwards) I built a histogram using a Path Shape. Now, if one appropriately modifies the angles between the path lines and gradually reduces the height of the histogram, he can create a perspective effect. Bear in mind though, that this is not particularly easy to do - but it's doable nevertheless. It only depends on how much you want it.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth