It is currently December 8th, 2021, 5:57 pm

Adding shadow to RM text

General topics related to Rainmeter.
Staulphin
Posts: 3
Joined: February 20th, 2010, 12:22 am

Adding shadow to RM text

Post by Staulphin »

My wallpaper changes every minute and since some are light and some are dark I don't want to have to change my RM accordingly. So, how can i edit the white texted version of my skin with a shadow so that it will show up on light and dark backgrounds?
User avatar
jsmorley
Developer
Posts: 22421
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Adding shadow to RM text

Post by jsmorley »

Staulphin wrote:My wallpaper changes every minute and since some are light and some are dark I don't want to have to change my RM accordingly. So, how can i edit the white texted version of my skin with a shadow so that it will show up on light and dark backgrounds?
To any string meter you want, add:

StringEffect=SHADOW
FontEffectColor=xxx,xxx,xxx,xxx

Where xxx,xxx,xxx,xxx is the usual RBGA (Red, Green, Blue, Alpha) settings.

So a blue shadow would be

FontEffectColor=0,0,255,255

If don't use FontEffectColor, the default is a black shadow.
Staulphin
Posts: 3
Joined: February 20th, 2010, 12:22 am

Re: Adding shadow to RM text

Post by Staulphin »

Mooy grassioso!
Staulphin
Posts: 3
Joined: February 20th, 2010, 12:22 am

Re: Adding shadow to RM text

Post by Staulphin »

OK how about the same concept except for with images?
Like for the hands on the clock vision; they are image files. How might I add a shadow to these images?
User avatar
jsmorley
Developer
Posts: 22421
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Adding shadow to RM text

Post by jsmorley »

Staulphin wrote:OK how about the same concept except for with images?
Like for the hands on the clock vision; they are image files. How might I add a shadow to these images?
No automatic way for that. For a lot of things you could just add the shadow directly to the .png files in Photoshop, but of course with the hands of a clock that travel around a circle, the shadow is going to be in the wrong position a good bit of the time in relation to the "light source", making for a very unrealistic effect. Not sure there is a good solution, short of two images (one color and one black) that you load a couple of pixels offset from each other (with the color one in front), but it would still take some doing to get the shadow to move to indicate the light source properly as the hands move around the clock.
User avatar
Alex2539
Rainmeter Sage
Posts: 642
Joined: July 19th, 2009, 5:59 am
Location: Montreal, QC, Canada

Re: Adding shadow to RM text

Post by Alex2539 »

I'm not 100% sure, but i think that the two image method is pretty much exactly what the text effect does. As long as you put them in the right order, it should work just fine! For added effect, maybe make the shadow image semi-transparent ;).
ImageImageImageImage
User avatar
jsmorley
Developer
Posts: 22421
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Adding shadow to RM text

Post by jsmorley »

Alex2539 wrote:I'm not 100% sure, but i think that the two image method is pretty much exactly what the text effect does. As long as you put them in the right order, it should work just fine! For added effect, maybe make the shadow image semi-transparent ;).
Right. My only concern is that as the hands of a clock travel around the 360 degree arc, having a shadow that is offset two pixels "bottom right" is going to look wrong at some points in the arc as the "light source" appears to change instead of the shadow moving to reflect the relationship to the light source. Am I making sense?
scoop6274
Posts: 10
Joined: December 29th, 2009, 4:20 pm

Re: Adding shadow to RM text

Post by scoop6274 »

jsmorley wrote: Right. My only concern is that as the hands of a clock travel around the 360 degree arc, having a shadow that is offset two pixels "bottom right" is going to look wrong at some points in the arc as the "light source" appears to change instead of the shadow moving to reflect the relationship to the light source. Am I making sense?
So, instead of making a circular clock, make a linear clock (either horizontally or vertically) then the shadow will always work, i.e.

1....2.....3....4....5....6....7....8....9....10....11....12
l______l__________l__________________________

Obviously a concept, but hands could still be different lengths for the hour, minute and second hand. This way the shadow for the text and for the hands would fit together perfectly. In fact, I like the idea so I might actually try and create one. But, I wouldn't wait on me to make it. It could take me months! :roll:
User avatar
Alex2539
Rainmeter Sage
Posts: 642
Joined: July 19th, 2009, 5:59 am
Location: Montreal, QC, Canada

Re: Adding shadow to RM text

Post by Alex2539 »

jsmorley wrote:Right. My only concern is that as the hands of a clock travel around the 360 degree arc, having a shadow that is offset two pixels "bottom right" is going to look wrong at some points in the arc as the "light source" appears to change instead of the shadow moving to reflect the relationship to the light source. Am I making sense?
It would work perfectly as long as you actually use two images. Keeping the shadow in the same image would in fact make it look like there was some weird, moving light source. Having two separate image though means that the shadow would always be in the right place.
ImageImageImageImage
User avatar
jsmorley
Developer
Posts: 22421
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Adding shadow to RM text

Post by jsmorley »

Alex2539 wrote:It would work perfectly as long as you actually use two images. Keeping the shadow in the same image would in fact make it look like there was some weird, moving light source. Having two separate image though means that the shadow would always be in the right place.
As long as the shadow was offset just to the right or left, and not right/down or left/up, I guess it would look fine.