It is currently April 27th, 2024, 12:07 pm

Dynamic Effects/Transitions on Text.

Get help with creating, editing & fixing problems with skins
ZXCVBOT

Dynamic Effects/Transitions on Text.

Post by ZXCVBOT »

Recently, I stumbled upon below given forum, while making somthing of my own. I need help for whatever this is called. I searched a lot for "Glowing Effects" and checked out a few so-called neon skins, but most were stationary or used a glowy-font and one even used images whatnot but to no avail. I made something of my own and tried GPT (not a good experience as it did nothing to help.)

https://forum.rainmeter.net/viewtopic.php?t=36853

What I want: Any type of effects on string/text like flickering, breathing, warm, cold, ambient, steady, blinking, color fade, rainbow cycle, twinkle effect, chasing effect, candle flicker, meteor shower, pulse effect, fire effect, color chase, police lights, etc. Not all - some. I can achieve any if I get the idea as how they work or what I have to do in order to achieve the desired results.

Links as to what they look like (Not mine; Not promoting anything; I chose them as they are short and compiled) Unhelpful other links checked (Checked and bit relevant) (Not mine; Not promoting) (Here, they are posted as they are much similar but not the same, and another leads to effects on image, but not on text, which might be helpful, one uses shape, and another images): What I can do: I can use images like the Glow skin mentioned above, yet again, the question arises, how can I substitute the text/string for image/images.

What I succeeded in achieving: Flickering and Breathing.

(Edit: Removed unnecessary code. Added missing effects.) (Edit 2 and a few more: Added some more effects.)

Code:

Code: Select all

[MeasureColor]
Measure=Calc
Formula=( COUNTER % 30 )

[Variables]
ShadowOffset=3
ShadowBlur=3

[MeasureRed]
Measure=Calc
Formula=((2*MeasureColor)%256)

[MeasureGreen]
Measure=Calc
Formula=((3*MeasureColor)%256)

[MeasureBlue]
Measure=Calc
Formula=((3*MeasureColor)%256)

[MeterResult]
Meter=STRING

;Breathing Shadow-Like by balala
;InlineSetting=Shadow | 8 | 8 | 3.5 | (255*Sin(Rad(360*[MeasureColor]/30))),(255*Sin(Rad(180*[MeasureColor]/30))),(255*Sin(Rad(720*[MeasureColor]/30)))

;Glowing-Blur by Yincognito
InlineSetting=Shadow | (-#ShadowOffset#) | (-#ShadowOffset#) | (#ShadowBlur#) | (255*Sin(Rad(200*[MeasureColor]/30))),(255*Sin(Rad(60*[MeasureColor]/30))),(255*Sin(Rad(100*[MeasureColor]/30))),255
InlineSetting2=Shadow | (-#ShadowOffset#) | (#ShadowOffset#) | (#ShadowBlur#) | (255*Sin(Rad(200*[MeasureColor]/30))),(255*Sin(Rad(60*[MeasureColor]/30))),(255*Sin(Rad(100*[MeasureColor]/30))),255
InlineSetting3=Shadow | (#ShadowOffset#) | (-#ShadowOffset#) | (#ShadowBlur#) | (255*Sin(Rad(200*[MeasureColor]/30))),(255*Sin(Rad(60*[MeasureColor]/30))),(255*Sin(Rad(100*[MeasureColor]/30))),255
InlineSetting4=Shadow | (#ShadowOffset#) | (#ShadowOffset#) | (#ShadowBlur#) | (255*Sin(Rad(200*[MeasureColor]/30))),(255*Sin(Rad(60*[MeasureColor]/30))),(255*Sin(Rad(100*[MeasureColor]/30))),255

;Breathing Gaussian-Blur
;InlineSetting=Shadow | 0 | 0 | 25.0 | (255*Sin(Rad(360*[MeasureColor]/30))),(255*Sin(Rad(180*[MeasureColor]/30))),(255*Sin(Rad(720*[MeasureColor]/30)))
InlineSetting=Shadow | 5 | 5 | 10 | (255*Sin(Rad(200*[MeasureColor]/30))),(255*Sin(Rad(60*[MeasureColor]/30))),(255*Sin(Rad(100*[MeasureColor]/30))),255

;Font-RGB-Gradiented Stationary
;InlineSetting2=GradientColor | 180 | 255,0,0,100 ; 0.0 | 0,255,0,255 ; 0.5 | 0,0,255,255 ; 1.0

;Low Health
;FontColor=(72*Sin(Rad(360*[MeasureColor]/30))),(3*Sin(Rad(180*[MeasureColor]/30))),(3*Sin(Rad(180*[MeasureColor]/30)))

;Healing
;FontColor=(255*Sin(Rad(360*[MeasureColor]/32))),(255*Sin(Rad(180*[MeasureColor]/32))),(255*Sin(Rad(720*[MeasureColor]/64)))

;Flickering
;FontColor=(255*Sin(Rad(360*[MeasureColor]/30))),(255*Sin(Rad(180*[MeasureColor]/30))),(255*Sin(Rad(720*[MeasureColor]/3)))

;RED-BLACK
;FontColor=(255*Sin(Rad(120*[MeasureColor]/30))),(255*Sin(Rad(12*[MeasureColor]/30))),(255*Sin(Rad(12*[MeasureColor]/30))),255

;PURPLE-PINK
;FontColor=(255*Sin(Rad(90*[MeasureColor]/30))),(255*Sin(Rad(30*[MeasureColor]/30))),(255*Sin(Rad(120*[MeasureColor]/30))),255

;ORANGE-BLUE
;FontColor=(255*Sin(Rad(90*[MeasureColor]/30))),(255*Sin(Rad(30*[MeasureColor]/30))),(255*Sin(Rad(360*[MeasureColor]/30))),255

;BLUE-YELLOW-ORANGE
;FontColor=(255*Sin(Rad(120*[MeasureColor]/30))),(255*Sin(Rad(60*[MeasureColor]/30))),(255*Sin(Rad(360*[MeasureColor]/30))),255

;CYAN-GREY-MAROON
;FontColor=(255*Sin(Rad(300*[MeasureColor]/30))),(255*Sin(Rad(90*[MeasureColor]/30))),(255*Sin(Rad(90*[MeasureColor]/30))),255

;StringEffect=Border
;FontEffectColor=[MeasureRed],[MeasureGreen],[MeasureBlue],128
DynamicVariables=1
Antialias=1

FontFace=Segoe UI Variable
FontColor=220,220,220
;StringStyle=Bold
FontSize=80
Text="TEST"
(Edit) END NOTES:
I am not good at math or rainmeter, just telling. :oops: Also, I am answering my own questions, so, really any help will be good as I am a newbie here.
I do not have an idea as to how this InlineSetting works in the program as manuals say Shadow X Offset | Y Offset | Blur Amount | Color for shadow but working on type of effect is another thing all in all.
The thing is it does not need InlineSetting(s), the calculation is the only thiing that makes it up-and-running, since I do not know how it works, I am just changing values and have come up with this, rgb change as per the dynamic nature of the formula it does not end but has been provided a beginning, the update cycle fixes time for total rgb change and is further made effective by the time it takes to read and calculate the value of one color - that is red is calculated and takes 1/3 of update time and is ever-changing as done by formula, same is the process of green and blue.
Since I do not know the inner-workings, do not criticise, but correct the mistakes.
TLDR: I need help in creating dynamic effects on text.

Any help is appreciated. Thank you in advance.
Last edited by ZXCVBOT on September 21st, 2023, 6:43 pm, edited 3 times in total.
User avatar
Yincognito
Rainmeter Sage
Posts: 7175
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Dynamic Effects/Transitions on Text.

Post by Yincognito »

ZXCVBOT wrote: September 20th, 2023, 9:14 amWhat I want: Any type of effects on string/text like flickering, breathing, warm, cold, ambient, steady, blinking, color fade, rainbow cycle, twinkle effect, chasing effect, candle flicker, meteor shower, pulse effect, fire effect, color chase, police lights, etc. Not all - some. I can achieve any if I get the idea as how they work or what I have to do in order to achieve the desired results.
These effects will most likely need different approaches, so it makes no sense to mix them, even in a list (I understand the idea of listing all you can possibly want though). What I would like to know is which one you want to start with? Remember, take it one effect at a time, not all at once. ;-)

Glowing? That's easy, just add the desired inline shadow in multiple directions (I used the up, down, left and right directions there, but you can adjust that as you see fit). In that code, the nested syntax is just for easier scrolling and middle mouse toggling to better see the result, it's by no means an absolute necessity. If you want glowing various parts of the string with different color (like a color wheel here or here, for example), just set up the inline patterns' regexes accordingly (you'd probably have to set up the colors manually).
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
ZXCVBOT

Re: Dynamic Effects/Transitions on Text.

Post by ZXCVBOT »

Made another change to first post, Thanks to Yincognito - This along with FontColor does the job:

Code: Select all

;BLUR-GLOWY by Yincognito
InlineSetting=Shadow | (-#ShadowOffset#) | (-#ShadowOffset#) | (#ShadowBlur#) | (255*Sin(Rad(200*[MeasureColor]/30))),(255*Sin(Rad(60*[MeasureColor]/30))),(255*Sin(Rad(100*[MeasureColor]/30))),255
InlineSetting2=Shadow | (-#ShadowOffset#) | (#ShadowOffset#) | (#ShadowBlur#) | (255*Sin(Rad(200*[MeasureColor]/30))),(255*Sin(Rad(60*[MeasureColor]/30))),(255*Sin(Rad(100*[MeasureColor]/30))),255
InlineSetting3=Shadow | (#ShadowOffset#) | (-#ShadowOffset#) | (#ShadowBlur#) | (255*Sin(Rad(200*[MeasureColor]/30))),(255*Sin(Rad(60*[MeasureColor]/30))),(255*Sin(Rad(100*[MeasureColor]/30))),255
InlineSetting4=Shadow | (#ShadowOffset#) | (#ShadowOffset#) | (#ShadowBlur#) | (255*Sin(Rad(200*[MeasureColor]/30))),(255*Sin(Rad(60*[MeasureColor]/30))),(255*Sin(Rad(100*[MeasureColor]/30))),255
Yincognito, can you please explain how the commented fontcolor ones work? If I can understand that bit, I can probably do this thing on my own.

Really thanking you :thumbup:
Last edited by balala on September 21st, 2023, 6:29 pm, edited 1 time in total.
Reason: Please use <code> tags whenever are posting codes. It's the </> button.
User avatar
Yincognito
Rainmeter Sage
Posts: 7175
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Dynamic Effects/Transitions on Text.

Post by Yincognito »

ZXCVBOT wrote: September 21st, 2023, 5:42 pmYincognito, can you please explain how the commented fontcolor ones work? If I can understand that bit, I can probably do this thing on my own.

Really thanking you :thumbup:
You mean the commented lines from your code in the initial post?
Well, the short answer would be that I have no freaking clue, since I didn't write them... and the intermediate answer would be that it's just simple math. :lol:

Joking aside, in case you want the long answer, in that code:
- MeasureColor continually iterates from 0 to 29 due to the ( COUNTER % 30 ) formula, where % means modulo aka remainder of COUNTER / 30 division
- because of the above, in those lines, [MeasureColor] / 30 basically iterates from 0 (i.e. 0 / 30) to almost 1 (i.e. 29 / 30)
- Rad() converts the degrees to radians for use with the Sin() function, so, for example, Sin(Rad(360*[MeasureColor]/30)) will go from Sin(0) to Sin(360) in degrees, basically graphing a full sinusoidal, obviously different for other cases
- finally, the Sin() value is multiplied with a number between 0 (no color in the channel) and 255 (full color in the channel) to get all sorts of values for the Red (R), Green (G), Blue (B) channels of the font color (the Alpha aka A aka opacity seems constant at the maximum of 255 in those options, so no transparency), based on the iteration of MeasureColor between the 0 to 29 values

You can easily test what values would the R, G, B color channels take if you:
- copy-paste the value of the desired FontColor option in the Google's search box
- replace [MeasureColor] with x
- since Google lacks a Rad() function to convert from degrees to radians, just multiply with pi/180 instead to achieve the same
- watch the vertical values the 3 graphs will take for the 0 to 29 horizontal interval

For example, for the:

Code: Select all

;Low Health
;FontColor=(72*Sin(Rad(360*[MeasureColor]/30))),(3*Sin(Rad(180*[MeasureColor]/30))),(3*Sin(Rad(180*[MeasureColor]/30)))
paste and replace to have in the Google's search box:

Code: Select all

(72*Sin(pi/180*(360*x/30))),(3*Sin(pi/180*(180*x/30))),(3*Sin(pi/180*(180*x/30)))
and watch the vertical values of the graph for the 0 to 30 horizontal interval:
RGB Graph.jpg
then feel free to do this for the other font colors to see what they come up with.

Notes:
- I didn't link to basic notions such as degrees, radians, sine function or color definitions in Rainmeter, so in case it's needed, feel free to Wiki them
- apparently, Google tries to copy Microsoft's stupidity in removing useful features from their apps, like setting the graph colors in their calculator...
You do not have the required permissions to view the files attached to this post.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
ZXCVBOT

Re: Dynamic Effects/Transitions on Text.

Post by ZXCVBOT »

THANK YOU Yincognito!
I had to read your post a few more times than I should have.

New Questions :? :
1. The graph makes no sense, as I am seeing only 2 of 3 lines (I think they might be values referring to colors). Can you explain as to what the graph is showing.

2. Can I change "x" to the formula of MeasureColor merged with MeasureRed, etc. to attain specific color-code (rrggbb or rrrgggbbb).

3. "finally, the Sin() value is multiplied with a number between 0 (no color in the channel) and 255 (full color in the channel) to get all sorts of values for the Red (R), Green (G), Blue (B) channels of the font color": Is the value from

Code: Select all

(72*Sin(pi/180*(360*x/30))),(3*Sin(pi/180*(180*x/30))),(3*Sin(pi/180*(180*x/30)))
telling this: rrr,ggg,bbb as 72,3,3 as beginning?

This changes things. I experimented a bit and look at the note below.
Note: Experinting with measures will change the said look of meters and they will not make any sense.
User avatar
Yincognito
Rainmeter Sage
Posts: 7175
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Dynamic Effects/Transitions on Text.

Post by Yincognito »

ZXCVBOT wrote: September 22nd, 2023, 1:23 pm THANK YOU Yincognito!
I had to read your post a few more times than I should have.

New Questions :? :
1. The graph makes no sense, as I am seeing only 2 of 3 lines (I think they might be values referring to colors). Can you explain as to what the graph is showing.

2. Can I change "x" to the formula of MeasureColor merged with MeasureRed, etc. to attain specific color-code (rrggbb or rrrgggbbb).

3. "finally, the Sin() value is multiplied with a number between 0 (no color in the channel) and 255 (full color in the channel) to get all sorts of values for the Red (R), Green (G), Blue (B) channels of the font color": Is the value from

Code: Select all

(72*Sin(pi/180*(360*x/30))),(3*Sin(pi/180*(180*x/30))),(3*Sin(pi/180*(180*x/30)))
telling this: rrr,ggg,bbb as 72,3,3 as beginning?

This changes things. I experimented a bit and look at the note below.
Note: Experinting with measures will change the said look of meters and they will not make any sense.
1. You see only 2 of the 3 graphs because 2 of the graphs are the same in the example above, so they overlap one another. Also, since, Google removed the possibility to select one of the graphs and bring it to the front, you can't see the 3rd graph at all, unless of course you use an example where all 3 graphs use different formulas and they don't overlap.

Yes, those 3 graphs represent the R, G and B values that the FontColor whose formulas you use will take (on their Y axis), if looking at their 0 to 30 interval (on their X axis). Obviously, the graph colors don't match what colors they represent, since you can't set custom colors for them anymore, which is also Google's fault. Anyway, it was just an example, you can use any graphing tool or site you want...

2. You could, but it will not do what you expect. First, because [MeasureRed] is not used at all in the commented FontColor options you indicated earlier, so the graphs will not represent what happens in the skin anymore (which was the whole point in mentioning this Google graph test). Second, because each comma separated formula you have in the search box is representing one of the R, G or B progressions - in other words, if you want a specific value for red, say 10, then the entire 1st formula in the search box (up to the first comma) would have to be replaced by 10. Of course, if you do actually use [MeasureRed] as the value for red in your FontColor option in the skin, you can indeed replace the 1st formula with the equivalent of what you have in [MeasureRed], i.e. ((2*x)%256).

3. Yes, it is telling the R, G, B values and their progression while [MeasureColor] in the skin (aka x in the search box formulas) goes from 0 to 29. No, those R, G, B will not be 72,3,3 in the beginning (if by beginning you mean when x=0 then they will be 0,0,0 according to the results of those formulas; if by beginning you mean at skin refresh then it will depend on what value from 0 to 29 would MeasureColor aka (COUNTER % 30) have since that's what x stands for in this example).
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
ZXCVBOT

Re: Dynamic Effects/Transitions on Text.

Post by ZXCVBOT »

Now, that you mentioned, I saw that Measures-Red,Green,Blue are not used anywhere in the posted code, but I did change this bit in my version.

I had 2 (sort-of) unrelated questions about Random (related to Flickering and change in order of colors):

Code: Select all

[MeasureRandom1]
Measure=Calc
Formula=Random
Lowbound=10
Highbound=200
1. The above just provides 1 value (duh). If and that's a big if I were to make it dynamic in nature, what should I use in meter?
I could probably use some loop but I do not have an idea as to where to begin.

2. If I were to "choose" randomly from Measures-Red,Green,Blue how would I do it?

Finally, do Lowbound and Highbound really work? As I saw the values they provided and they were way off the charts.
Edit: Spelling mistake in Highbound- They work.

Things I understand now:
Counter - the thing that gets the values change all the time (I did not see its manual). The most important thing important in the formula.
The formula for changing colors/effects - The second most important thing - explained by Yincognito - and does not need anything more.
Basic calculations and change in speeds - * and + Increase the speed of changing of effects. / and - decrease the speed of changing of effects. The third most important thing.

(I can not post the updated code as it is full of garbage right now and needs proper "adjustments" and "beautification" and yep- debugging as I am getting tons of errors.)
User avatar
Yincognito
Rainmeter Sage
Posts: 7175
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Dynamic Effects/Transitions on Text.

Post by Yincognito »

ZXCVBOT wrote: September 23rd, 2023, 9:22 am Now, that you mentioned, I saw that Measures-Red,Green,Blue are not used anywhere in the posted code, but I did change this bit in my version.

I had 2 (sort-of) unrelated questions about Random (related to Flickering and change in order of colors):

Code: Select all

[MeasureRandom1]
Measure=Calc
Formula=Random
Lowbound=10
Highbound=200
1. The above just provides 1 value (duh). If and that's a big if I were to make it dynamic in nature, what should I use in meter?
I could probably use some loop but I do not have an idea as to where to begin.

2. If I were to "choose" randomly from Measures-Red,Green,Blue how would I do it?

Finally, do Lowbound and Highbound really work? As I saw the values they provided and they were way off the charts.
Edit: Spelling mistake in Highbound- They work.

Things I understand now:
Counter - the thing that gets the values change all the time (I did not see its manual). The most important thing important in the formula.
The formula for changing colors/effects - The second most important thing - explained by Yincognito - and does not need anything more.
Basic calculations and change in speeds - * and + Increase the speed of changing of effects. / and - decrease the speed of changing of effects. The third most important thing.

(I can not post the updated code as it is full of garbage right now and needs proper "adjustments" and "beautification" and yep- debugging as I am getting tons of errors.)
1. Not sure what you mean by making it dynamic in nature, as that can be a lot of things. Try to be more specific, like you were at 2. for example.

2. Well, since the random function only yields a number and the measure names are strings, you'd need to convert that number to a string, obviously. So, for example, you'd set LowBound=1 and HighBound=3 since there are 3 measures for R, G, and B, then add a:

Substitute="1":"Red","2":"Green","3":"Blue"

line to convert the possible numbers produced by MeasureRandom1 to the suffixes of your other 3 measures. Then, if you want to choose from those 3 measures in, say, the value for red in the FontColor option of your desired meter, you'd write:

FontColor=[&Measure[&MeasureRandom1]],0,0,255
DynamicVariables=1

so that the red value above is the value of [Measure...] where the dots can be either "Red", "Green" or "Blue", effectively using the string value of your MeasureRandom1 as part of the name of the measure you want to choose - see Variables > Nesting Variables in the manual for details. Naturally, if you want to do this for the green and blue values, you'd need to create another 2 measures yielding similar random values converted to strings, and use a correspondingly similar nested syntax for the values which are 0 above.

P.S. If by any chance you meant choosing randomly IN your Red, Green and Blue measures, it's just about making those 3 yield random values from 0 to 255 similar to MeasureRandom1 above, and using them in your FontColor option, like:

FontColor=[MeasureRed],[MeasureGreen],[MeasureBlue],255

Note: In case you actually want to transition between colors or color channels, none of the above will be suited, and you'll have to do it the old fashioned (but effective, given enough math) way, by using formulas.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
ZXCVBOT

Re: Dynamic Effects/Transitions on Text.

Post by ZXCVBOT »

Firstly, thanks for the reply.
I meant making the Random numbers "dynamic" - Random choosing multiple numbers, each one after the other -
1. 234
2. 345
3. 456.....
Once Random chooses a number, it has to choose another. It is unachievable if there is no loop, as once Random chooses a number, it tends to stay the same. It can be changed when we create some sort of loop - but just for the measure that chooses the number. Once the loop resets, it would choose another and go on.

All I'm asking is that whether this is achievable or not?
User avatar
Yincognito
Rainmeter Sage
Posts: 7175
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Dynamic Effects/Transitions on Text.

Post by Yincognito »

ZXCVBOT wrote: September 24th, 2023, 9:48 am Firstly, thanks for the reply.
I meant making the Random numbers "dynamic" - Random choosing multiple numbers, each one after the other -
1. 234
2. 345
3. 456.....
Once Random chooses a number, it has to choose another. It is unachievable if there is no loop, as once Random chooses a number, it tends to stay the same. It can be changed when we create some sort of loop - but just for the measure that chooses the number. Once the loop resets, it would choose another and go on.

All I'm asking is that whether this is achievable or not?
I really shouldn't repeat what's already written in the manual, when you check the options related to this, but if I understand it correctly (still not sure about that), then adding an UpdateRandom=1 to your MeasureRandom1 should do what you seem to expect - no loop required.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth