It is currently October 27th, 2021, 11:01 pm

[Suggestion] Blurring otpion for meters

Report bugs with the Rainmeter application and suggest features.
User avatar
Yincognito
Rainmeter Sage
Posts: 4071
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: [Suggestion] Blurring otpion for meters

Post by Yincognito »

death.crafter wrote: August 18th, 2021, 4:41 amSigma is the amount of shadow, or rather the width of the shadow. I don't think its an universal term tho.
I don't think the amount of shadow is a thing, in this case, it's simply an offset at which the (blurred or not) replica of the text is placed at. I guess you could "enrich" the shadow by placing multiple shadows at gradual offsets, then blur each one as desired (probably gradually as well) - by the way, I guess some rainbow effect could be achieved on the text this way, if using different colors, but I'm not sure of that yet. Or, just placing the shadows in 8 directions instead of the initial 4, since this makes the blur even more pronounced - as I said, variations of this can be customized based on the user's preference, nothing is set in stone:

Code: Select all

[Variables]
Color0=0,0,0,64
Color1=0,128,255,64
Color2=255,0,255,255
Color3=255,0,255,255
ShadowOffset=3
ShadowBlur=3
ParameterStep=0.5
ParameterIndex=0
Parameter0=Offset
Parameter1=Blur

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

---Measures---

---Meters---

[MeterText]
Meter=String
X=0
Y=0
FontFace=Tahoma
FontColor=#Color2#
SolidColor=#Color0#
SolidColor2=#Color1#
GradientAngle=90
InlineSetting= Shadow | (-#ShadowOffset#) | (-#ShadowOffset#) | (#ShadowBlur#) | #Color3#
InlineSetting2=Shadow | (-#ShadowOffset#) | ( #ShadowOffset#) | (#ShadowBlur#) | #Color3#
InlineSetting3=Shadow | ( #ShadowOffset#) | (-#ShadowOffset#) | (#ShadowBlur#) | #Color3#
InlineSetting4=Shadow | ( #ShadowOffset#) | ( #ShadowOffset#) | (#ShadowBlur#) | #Color3#
InlineSetting5=Shadow | (-#ShadowOffset#) |               (0) | (#ShadowBlur#) | #Color3#
InlineSetting6=Shadow |               (0) | ( #ShadowOffset#) | (#ShadowBlur#) | #Color3#
InlineSetting7=Shadow |               (0) | (-#ShadowOffset#) | (#ShadowBlur#) | #Color3#
InlineSetting8=Shadow | ( #ShadowOffset#) |               (0) | (#ShadowBlur#) | #Color3#
FontSize=34
AntiAlias=1
Padding=5,5,5,5
UpdateDivider=-1
Text="Text Effects Demo#CRLF##CRLF##CRLF##CRLF#Shadow [#Parameter[#ParameterIndex]]#CRLF##CRLF##CRLF##CRLF#Text Effects Demo"
LeftMouseUpAction=[!SetVariable Color0 #Color1#][!SetVariable Color1 #Color0#][!UpdateMeter #CURRENTSECTION#][!Redraw]
MiddleMouseUpAction=[!SetVariable ParameterIndex (1-#ParameterIndex#)][!UpdateMeter #CURRENTSECTION#][!Redraw]
MouseScrollUpAction=[!SetVariable Shadow[#Parameter[#ParameterIndex]] ([#Shadow[#Parameter[#ParameterIndex]]]+#ParameterStep#)][!UpdateMeter #CURRENTSECTION#][!Redraw]
MouseScrollDownAction=[!SetVariable Shadow[#Parameter[#ParameterIndex]] ([#Shadow[#Parameter[#ParameterIndex]]]-#ParameterStep#)][!UpdateMeter #CURRENTSECTION#][!Redraw]
DynamicVariables=1
8 Directions.jpg
death.crafter wrote: August 18th, 2021, 4:41 am CPU is the last thing I would be worried about if I use magickmeter. But yeah some folks would care.
Usually these things take CPU only if you don't have hardware acceleration turned on. I don't see much of a usage on my i3, which is rather a low end CPU. Outdated, more appropriately termed.
Yeah, I have HA disabled, as it hides parts of images when animating. I would have posted this as a bug if I was confident there was a feasible solution, but I'm not sure it is, as it's possible to be just a Windows thing. Regarding the CPU usage of these particular effects, I have all the active skins from my suite (i.e. half of the total) at under 1% CPU on idle, but when I activate just this simple sample above, the Rainmeter's CPU usage jumps at 3.5%. For me, that's too much for just this simple code, updated at the "normal" 1 second interval.

EDIT: Damn, my bad. Adding an UpdateDivider=-1 to the meter fixed this - I guess its absence was a leftover from the original code I used as a base to illustrate the same thing (but used differently, to make a white text on a white background visible at the same time with the effect) back when I modified it. That code was obviously from a more newbie user, not bothering with update dividers to save resources and all. Will edit the above sample accordingly.
You do not have the required permissions to view the files attached to this post.
User avatar
death.crafter
Posts: 1071
Joined: April 24th, 2021, 8:13 pm

Re: [Suggestion] Blurring otpion for meters

Post by death.crafter »

Yincognito wrote: August 18th, 2021, 6:16 am I don't think the amount of shadow is a thing, in this case, it's simply an offset at which the (blurred or not) replica of the text is placed at.
I meant like this:

Sigma: 7|5
Screenshot 2021-08-18 121849.png
Sigma: 3|3
Screenshot 2021-08-18 121941.png
You do not have the required permissions to view the files attached to this post.
from the Realm of Death
My Current Desktop
User avatar
Yincognito
Rainmeter Sage
Posts: 4071
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: [Suggestion] Blurring otpion for meters

Post by Yincognito »

death.crafter wrote: August 18th, 2021, 6:54 am I meant like this:

Sigma: 7|5
Screenshot 2021-08-18 121849.png

Sigma: 3|3
Screenshot 2021-08-18 121941.png
Well, it seems you found a way to handle it... ;-)
Changing the alpha of the shadow color helps as well in fine tuning it.
User avatar
death.crafter
Posts: 1071
Joined: April 24th, 2021, 8:13 pm

Re: [Suggestion] Blurring otpion for meters

Post by death.crafter »

Yincognito wrote: August 18th, 2021, 8:12 am Well, it seems you found a way to handle it... ;-)
Changing the alpha of the shadow color helps as well in fine tuning it.
:oops:
It is magickmeter
from the Realm of Death
My Current Desktop
User avatar
Yincognito
Rainmeter Sage
Posts: 4071
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: [Suggestion] Blurring otpion for meters

Post by Yincognito »

death.crafter wrote: August 18th, 2021, 9:42 am :oops:
It is magickmeter
Oh, well, it worked the same way for me (almost the same values for ShadowOffset and ShadowBlur variables) in my 8 directions sample above, but had to lower the alpha of Color3 (i.e. the shadow color, to something like 255,255,255,32 or something). I even replicated your black background color in the screenshot, the color and size of the text and its shadow, tried but probably failed to use the exact same font by its looks - all that for easy comparison, but read your post one more time and saw the similar values and I thought you figured it out using the approach I presented, so I gave up posting it and deleted the skin in the meantime, LOL...

Guess what MagickMeter and Rainmeter do here is not that different. Don't know for other cases though, you'd have to try it yourself. ;-)
User avatar
Jax
Posts: 37
Joined: June 7th, 2021, 11:46 am

Re: [Suggestion] Blurring otpion for meters

Post by Jax »

Yincognito wrote: August 18th, 2021, 2:52 am Well, it's a copy alright, but it can be blurred (ressurected some of my "older" codes on the forum to illustrate it; this applies the shadow in all 4 cardinal directions, but of course it can be adjusted even further if needed; middle click to change the "active" parameter between the shadow's offset and blur, scroll to increase/decrease it, you can look at the log to see the values and compare):
:o I never knew the inlineoption for shadow existed! Thanks for sharing :D

Still, having an blur option for all meters would be great... hope there is an easy way to implement this to rainmeter
Deviantart page // My site // Please make a proper settings menu for your skins
User avatar
Yincognito
Rainmeter Sage
Posts: 4071
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: [Suggestion] Blurring otpion for meters

Post by Yincognito »

Jax wrote: August 20th, 2021, 3:44 am :o I never knew the inlineoption for shadow existed! Thanks for sharing :D

Still, having an blur option for all meters would be great... hope there is an easy way to implement this to rainmeter
Yeah, I kind of suspected you didn't. At least you have something to work with for now, until some hypothetical addition of meter blur to Rainmeter happens (if it does, of course).
User avatar
Active Colors
Moderator
Posts: 876
Joined: February 16th, 2012, 3:32 am
Location: Berlin, Germany

Re: [Suggestion] Blurring otpion for meters

Post by Active Colors »

?

Code: Select all

[Rainmeter]
Update=-1

[Variables]
Shadow=0,0,0

[StyleText]
FontFace=Arial
FontSize=55
FontColor=255,255,255
StringAlign=Left
StringStyle=Bold
AntiAlias=1
Text=Rainmeter

[StyleShadow]
X=1r
Y=1r


; SHADOW

[TextS]
Meter=String
MeterStyle=StyleText | StyleShadow
X=0
Y=0
FontColor=#Shadow#,21

[TextS1]
Meter=String
MeterStyle=StyleText | StyleShadow
FontColor=#Shadow#,19

[TextS2]
Meter=String
MeterStyle=StyleText | StyleShadow
FontColor=#Shadow#,17

[TextS3]
Meter=String
MeterStyle=StyleText | StyleShadow
FontColor=#Shadow#,15

[Text4]
Meter=String
MeterStyle=StyleText | StyleShadow
FontColor=#Shadow#,12

[TextS5]
Meter=String
MeterStyle=StyleText | StyleShadow
FontColor=#Shadow#,9

[TextS6]
Meter=String
MeterStyle=StyleText | StyleShadow
FontColor=#Shadow#,7

[TextS7]
Meter=String
MeterStyle=StyleText | StyleShadow
FontColor=#Shadow#,5

[TextS8]
Meter=String
MeterStyle=StyleText | StyleShadow
FontColor=#Shadow#,5

[TextS9]
Meter=String
MeterStyle=StyleText | StyleShadow
FontColor=#Shadow#,3

[TextS10]
Meter=String
MeterStyle=StyleText | StyleShadow
FontColor=#Shadow#,3

[Text11]
Meter=String
MeterStyle=StyleText | StyleShadow
FontColor=#Shadow#,3

[TextS12]
Meter=String
MeterStyle=StyleText | StyleShadow
FontColor=#Shadow#,2

[TextS13]
Meter=String
MeterStyle=StyleText | StyleShadow
FontColor=#Shadow#,2

[TextS14]
Meter=String
MeterStyle=StyleText | StyleShadow
FontColor=#Shadow#,2

[TextS15]
Meter=String
MeterStyle=StyleText | StyleShadow
FontColor=#Shadow#,2

[TextS16]
Meter=String
MeterStyle=StyleText | StyleShadow
FontColor=#Shadow#,2

[TextS17]
Meter=String
MeterStyle=StyleText | StyleShadow
FontColor=#Shadow#,1

[TextS18]
Meter=String
MeterStyle=StyleText | StyleShadow
FontColor=#Shadow#,1

[TextS19]
Meter=String
MeterStyle=StyleText | StyleShadow
FontColor=#Shadow#,1

[TextS20]
Meter=String
MeterStyle=StyleText | StyleShadow
FontColor=#Shadow#,1

[TextS21]
Meter=String
MeterStyle=StyleText | StyleShadow
FontColor=#Shadow#,1

[TextS22]
Meter=String
MeterStyle=StyleText | StyleShadow
FontColor=#Shadow#,1

[TextS23]
Meter=String
MeterStyle=StyleText | StyleShadow
FontColor=#Shadow#,1

[TextS24]
Meter=String
MeterStyle=StyleText | StyleShadow
FontColor=#Shadow#,1


; TEXT

[Text]
Meter=String
MeterStyle=StyleText
X=0
Y=0
2.PNG
1.PNG
You do not have the required permissions to view the files attached to this post.