It is currently April 19th, 2024, 5:37 pm

Making Alpha Layer Masking?

Get help with creating, editing & fixing problems with skins
User avatar
FreezyJackalope
Posts: 11
Joined: March 11th, 2021, 11:01 am

Re: Making Alpha Layer Masking?

Post by FreezyJackalope »

balala wrote: April 26th, 2021, 5:58 pm Ok, this is not a problem. But for first I'd work with only one, just to see how can this be done. Me personally never joined a Roundline and a Bar meter this way. Would be much easier to work with one single pair for the first. Then, if it works as expected, adding the second pair would be much easier.
Just my opinion...
Here are the images that will be used (I won't actually need to join the bar and the roundline together since this version is small enough to not need the bar, only the roundline):
Image
Image

I'm not exactly sure what kind of sorcery you're going to pull off, but I certainly hope to learn something from it!
User avatar
balala
Rainmeter Sage
Posts: 16144
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Making Alpha Layer Masking?

Post by balala »

FreezyJackalope wrote: April 26th, 2021, 6:08 pm Here are the images that will be used (I won't actually need to join the bar and the roundline together since this version is small enough to not need the bar, only the roundline):
Why those large spaces above and on left of the images?
User avatar
FreezyJackalope
Posts: 11
Joined: March 11th, 2021, 11:01 am

Re: Making Alpha Layer Masking?

Post by FreezyJackalope »

balala wrote: April 26th, 2021, 7:26 pm Why those large spaces above and on left of the images?
Ah, my friend's using them as video overlays for another project so I just repurposed them, I was going to crop them buuuut... I got lazy...
Anyway so here are the cropped versions:

Image
Image
User avatar
balala
Rainmeter Sage
Posts: 16144
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Making Alpha Layer Masking?

Post by balala »

FreezyJackalope wrote: April 26th, 2021, 7:35 pm Ah, my friend's using them as video overlays for another project so I just repurposed them, I was going to crop them buuuut... I got lazy...
Anyway so here are the cropped versions:
What about something like the following code? Just make sure to put the MPBar.png and MPCharge.png images into the @Resources folder:

Code: Select all

[Rainmeter]
Update=1000
BackgroundMode=2
SolidColor=220,220,220,150

[MyMeasure]
Measure=Calc
Formula=Random
UpdateRandom=1
LowBound=0
HighBound=9
MinValue=0
MaxValue=9

[MyMeasure2]
Measure=Calc
Formula=Random
UpdateRandom=1
LowBound=0
HighBound=9
MinValue=0
MaxValue=9

[MeterTotalDisk]
Meter=Roundline
MeasureName=MyMeasure2
X=0
Y=0
W=120
H=120
StartAngle=3.1415
RotationAngle=4.18878973
LineLength=70
LineColor=255,240,0
Solid=1
AntiAlias=1

[MeterTotalDisk2]
Meter=Roundline
MeasureName=MyMeasure
X=0
Y=0
W=120
H=120
StartAngle=3.1415
RotationAngle=4.18878973
LineLength=70
LineColor=255,240,0
Solid=1
AntiAlias=1

[MeterMpBar]
Meter=Image
ImageName=#@#MPBar.png
X=0
Y=0
W=120
H=120
PreserveAspectRatio=1
Container=MeterTotalDisk

[MeterMpCharge]
Meter=Image
ImageName=#@#MPCharge.png
X=0r
Y=0r
W=120
H=120
PreserveAspectRatio=1
Container=MeterTotalDisk2

[MeterVal]
Meter=STRING
MeasureName=MyMeasure
MeasureName2=MyMeasure2
X=60
Y=60
Padding=15,5,15,5
FontColor=220,220,220
FontEffectColor=0,0,0
StringEffect=Shadow
SolidColor=0,0,0,150
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=CenterCenter
AntiAlias=1
Text=%1#CRLF#%2
DynamicVariables=1
Hidden=0
The above code works with random values. In fact the meters are not showing neither disk space, nor anything else, just random values. But I hope you can see if the skin is working as expected. Does it?
User avatar
FreezyJackalope
Posts: 11
Joined: March 11th, 2021, 11:01 am

Re: Making Alpha Layer Masking?

Post by FreezyJackalope »

balala wrote: April 26th, 2021, 8:02 pm What about something like the following code? Just make sure to put the MPBar.png and MPCharge.png images into the @Resources folder:

Code: Select all

[Rainmeter]
Update=1000
BackgroundMode=2
SolidColor=220,220,220,150

[MyMeasure]
Measure=Calc
Formula=Random
UpdateRandom=1
LowBound=0
HighBound=9
MinValue=0
MaxValue=9

[MyMeasure2]
Measure=Calc
Formula=Random
UpdateRandom=1
LowBound=0
HighBound=9
MinValue=0
MaxValue=9

[MeterTotalDisk]
Meter=Roundline
MeasureName=MyMeasure2
X=0
Y=0
W=120
H=120
StartAngle=3.1415
RotationAngle=4.18878973
LineLength=70
LineColor=255,240,0
Solid=1
AntiAlias=1

[MeterTotalDisk2]
Meter=Roundline
MeasureName=MyMeasure
X=0
Y=0
W=120
H=120
StartAngle=3.1415
RotationAngle=4.18878973
LineLength=70
LineColor=255,240,0
Solid=1
AntiAlias=1

[MeterMpBar]
Meter=Image
ImageName=#@#MPBar.png
X=0
Y=0
W=120
H=120
PreserveAspectRatio=1
Container=MeterTotalDisk

[MeterMpCharge]
Meter=Image
ImageName=#@#MPCharge.png
X=0r
Y=0r
W=120
H=120
PreserveAspectRatio=1
Container=MeterTotalDisk2

[MeterVal]
Meter=STRING
MeasureName=MyMeasure
MeasureName2=MyMeasure2
X=60
Y=60
Padding=15,5,15,5
FontColor=220,220,220
FontEffectColor=0,0,0
StringEffect=Shadow
SolidColor=0,0,0,150
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=CenterCenter
AntiAlias=1
Text=%1#CRLF#%2
DynamicVariables=1
Hidden=0
The above code works with random values. In fact the meters are not showing neither disk space, nor anything else, just random values. But I hope you can see if the skin is working as expected. Does it?
Yes, this does work!! But... How, exactly? The only thing I'm seeing that's different is the LineColor, which is set to 255,240,0... And BackgroundMode
User avatar
balala
Rainmeter Sage
Posts: 16144
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Making Alpha Layer Masking?

Post by balala »

FreezyJackalope wrote: April 26th, 2021, 8:15 pm Yes, this does work!! But... How, exactly? The only thing I'm seeing that's different is the LineColor, which is set to 255,240,0... And BackgroundMode
Doesn't matter too much the options of the Roundline meters, nor the LineColor, nor the other ones. The Roundline meters are used just for masking. See that in fact the posted images are used into two Image meters ([MeterMpBar] and [MeterMpCharge]) and both have a container: [MeterTotalDisk] and [MeterTotalDisk2] (see that the [MeterMpBar] and [MeterMpCharge] meters have a Container=MeterTotalDisk and a Container=MeterTotalDisk2 option, accordingly). When a meter has set a containder, you can see from the meter only the parts which are above visible (not transparent) parts of the container. This is what is used here. For some details see this: https://docs.rainmeter.net/manual-beta/meters/general-options/container/
The BackgroundMode (along with SolidColor) into the [Rainmeter] section is used just to create the light background color of the whole skin. These options have nothing to do with the roundlines, are there just to can better see the meters.
User avatar
FreezyJackalope
Posts: 11
Joined: March 11th, 2021, 11:01 am

Re: Making Alpha Layer Masking?

Post by FreezyJackalope »

balala wrote: April 26th, 2021, 8:29 pm Doesn't matter too much the options of the Roundline meters, nor the LineColor, nor the other ones. The Roundline meters are used just for masking. See that in fact the posted images are used into two Image meters ([MeterMpBar] and [MeterMpCharge]) and both have a container: [MeterTotalDisk] and [MeterTotalDisk2] (see that the [MeterMpBar] and [MeterMpCharge] meters have a Container=MeterTotalDisk and a Container=MeterTotalDisk2 option, accordingly). When a meter has set a containder, you can see from the meter only the parts which are above visible (not transparent) parts of the container. This is what is used here. For some details see this: https://docs.rainmeter.net/manual-beta/meters/general-options/container/
The BackgroundMode (along with SolidColor) into the [Rainmeter] section is used just to create the light background color of the whole skin. These options have nothing to do with the roundlines, are there just to can better see the meters.
Oh, I see!!! I can't believe I made such a big deal of such a small problem... Thank you so much!
User avatar
balala
Rainmeter Sage
Posts: 16144
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Making Alpha Layer Masking?

Post by balala »

FreezyJackalope wrote: April 26th, 2021, 8:38 pm Oh, I see!!! I can't believe I made such a big deal of such a small problem... Thank you so much!
No, you didn't do a big deal and there are no small problems. Any problem can be smaller or greater for one or the other. Don't worry, I'm glad if you got it working as expected.
Feel free to come back if any other question arises.