It is currently May 1st, 2024, 5:11 pm

Scrolling Image Wallpaper Help

Get help with creating, editing & fixing problems with skins
User avatar
Yincognito
Rainmeter Sage
Posts: 7185
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Scrolling Image Wallpaper Help

Post by Yincognito »

eclectic-tech wrote: October 15th, 2018, 5:45 pmNOTE: There is an issue I ran into with an image larger than 6062x768, if I increase the image vertically to 768 and maintain the aspect ratio, the large image (8299x768) is being clipped improperly... not sure if this is an issue on my machine, or with the ImageCrop action, but it does work with 6062x768 image (image is too large to attach).
Therobertguy2 wrote: April 6th, 2023, 4:20 amI did notice there were issues mentioned with images larger than 6062x768, but I'm not sure if that is with regard to just width or also height. In addition, the image that came with the skin did not do anything when loaded so I'm not sure if this is an issue with my specific display setup or if the skin is not working bc of software reasons.

Edited Image Dimensions: 6138x1440
Monitor: 2560x1440 165hz
Windows 11 OS
Image: Omori headspace background, found in omori-game website code in the sources tab under www.omori-game.com\img\whitespace\space_parallax.png (you have to click the door in the bottom of the screen or it will not appear in the sources);
Direct link to OG tileable image can be found here
Hardware acceleration is on for Rainmeter
If eclectic-tech's experience is also with Hardware Acceleration (HA) on, then THAT is the issue. I know this for sure for a long time, since I worked a lot with animations, Bitmap meters and generally cropped image mozaics. One solution is to disable HA and everything will work just fine (albeit all the workload will be then on the CPU alone, without significant help from the GPU), another is to extend the mozaic both vertically and horizontally instead of just horizontally (basically, if you have an image 99360 x 414 px corresponding to 240 "frames" of 414 x 414 px placed horizontally, make it instead a 6624 x 6210 px image corresponding to the same number of 414 x 414 "frames", but placed in a mozaic of 16 cols x 15 rows instead of a 240 cols x 1 row one; the former will be clipped improperly, the latter will be clipped properly, even though they would have the same content, since the dimensions of the latter are smaller; of course, the code will have to be adjusted accordingly, but the changes are not complicated).

I'm not entirely sure on this one, but while the HA is the key here, this issue might also depend on the image format, since some formats come with certain limits.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5407
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Scrolling Image Wallpaper Help

Post by eclectic-tech »

@Yincognito
Thanks for the research! This should help in cases involving large images especially as new system screen resolutions continue to increase :thumbup:
User avatar
Therobertguy2
Posts: 4
Joined: April 6th, 2023, 2:10 am
Location: Texas, USA

Re: Scrolling Image Wallpaper Help

Post by Therobertguy2 »

Yincognito wrote: April 8th, 2023, 1:08 pm If eclectic-tech's experience is also with Hardware Acceleration (HA) on, then THAT is the issue. I know this for sure for a long time, since I worked a lot with animations, Bitmap meters and generally cropped image mozaics. One solution is to disable HA and everything will work just fine (albeit all the workload will be then on the CPU alone, without significant help from the GPU), another is to extend the mozaic both vertically and horizontally instead of just horizontally (basically, if you have an image 99360 x 414 px corresponding to 240 "frames" of 414 x 414 px placed horizontally, make it instead a 6624 x 6210 px image corresponding to the same number of 414 x 414 "frames", but placed in a mozaic of 16 cols x 15 rows instead of a 240 cols x 1 row one; the former will be clipped improperly, the latter will be clipped properly, even though they would have the same content, since the dimensions of the latter are smaller; of course, the code will have to be adjusted accordingly, but the changes are not complicated).

I'm not entirely sure on this one, but while the HA is the key here, this issue might also depend on the image format, since some formats come with certain limits.
I tried disabling hardware acceleration, but I still can't get anything to display. Just for kicks, I also converted the png to bmp to see if a simpler format would help, but it still didn't resolve it. The reason I don't suspect my image is the problem is that the original image this skin was made for (the Super Smash Bros wallpaper) does not work either, with HA on or off, and even on a 1080 60hz screen with a new install of Rainmeter (if resolution or refresh rate had any effect on the skin). From what I understand, Rainmeter is 100% backwards compatible and this skin is only about 5 years old, so I don't think it would be a compatibility issue. I'm kind of curious, are you able to get eclectic-tech's original skin to work on your end?

Also, regarding your solution of cropping the image differently: I'd be happy to do the image work in paint.net, but I have no clue how to modify Rainmeter code that would actually work with that, since I'm new to all of this lol (this is the first skin I've even looked at the code for).

In any case though, I appreciate the amount of looking into this you have done! Lemme know if there is anything else I could try.
User avatar
Yincognito
Rainmeter Sage
Posts: 7185
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Scrolling Image Wallpaper Help

Post by Yincognito »

Therobertguy2 wrote: April 8th, 2023, 5:06 pm I tried disabling hardware acceleration, but I still can't get anything to display.
Just to be clear, I didn't take a look at your skin or image (yet), I only referred to the specific situation when the image dimensions are too big and the cropping fails due to clipping above a certain limit. That is definitely HA's "fault".

As for the code to crop it differently (i.e. on both columns and rows as opposed to only on columns), it is pretty trivial - a general example for a simple case would look like this:

Code: Select all

[YourImageMeterOrWhatever]
Meter=Image
ImageName=...the path to your image...
ImageCrop=(Trunc([Frame]%#Cols#)*#HSize#),(Trunc([Frame]/#Cols#)*#VSize#),#HSize#,#VSize#
DynamicVariables=1
This assumes that you have a [Frame] Calc measure that iterates from 0 or 1 to the total number of "frames" in the mozaic image, that #Cols# is the number of such frames horizontally in the mozaic, and that #HSize# and #VSize# are the horizontal and vertical resolution of a frame. Basically, this uses % aka the modulo operation to get the number of the column corresponding to the frame you want to display, and the integer part of the division to get the number of the row corresponding to the same thing. If it's easier, picture the mozaic as a table:

Code: Select all

x-x-x-x-x-x-x-x-x-x
x-x-x-x-x-x-x-x-x-x
x-x-x-x-x-x-x-x-x-x
x-x-x
An x represents a frame in the schematic above. If you want to display frame number 32 in the mozaic (i.e. [Frame], with the index starting at 0), then you have to crop from 32 % 10 (aka 2) times the horizontal resolution of a frame (since there are 10 frames per row) when it comes to horizontal cropping, and int(32 / 10) = int(3.2) (whose integer part is 3) times the vertical resolution of a frame when it comes to vertical cropping.

That being said, I'll take a look at your specific case, as did others in this thread, surely a solution can be found to achieve what you want. I'll let you know if I need further clarification on your scenario or what you'd like to achieve. ;-)
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Yincognito
Rainmeter Sage
Posts: 7185
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Scrolling Image Wallpaper Help

Post by Yincognito »

eclectic-tech wrote: April 8th, 2023, 4:42 pm @Yincognito
Thanks for the research! This should help in cases involving large images especially as new system screen resolutions continue to increase :thumbup:
Ah, well, it was not so much a research, but something I've been confronted with myself in my own (huge image) animation skins. Not sure if I mentioned this in a bug report here, but then it could simply be an inherent limitation of the HA implementation in Rainmeter (who knows, maybe for some obvious reasons)... :confused:
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Yincognito
Rainmeter Sage
Posts: 7185
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Scrolling Image Wallpaper Help

Post by Yincognito »

Therobertguy2 wrote: April 8th, 2023, 5:06 pmI'm kind of curious, are you able to get eclectic-tech's original skin to work on your end?
You're right, it did not work. The reason is simple: he uses the #CURRENTSECTION# built-in variable to refer to the image meter's height that he uses in computing positions and cropping values ... but the value of that height is not yet known because at the time he interrogates it the meter (and of course, the image it refers to) is not yet drawn. One of the alternatives to this is simple - predefine the image dimensions as variables and use them instead:

Code: Select all

; Make a copy of your image, expand your image canvas to twice the image width and paste the copy so your new image is side-by-side of the original. 
; Save the new image as "SSBU_Panoramic2.png" in @Resources folder

[Rainmeter]
Update=20
AccurateText=1
DynamicWindowSize=1
Group=#ROOTCONFIG#
OnRefreshAction=[!Move "0" "0"][!ZPos -2]

; ========= Variables ==========
[Variables]
; Adjust these according to the width and height of the image referred to above
ImageW=6062
ImageH=561

; ========= Measures ==========
[MeasureLoop]
Measure=Loop
StartValue=0
EndValue=3031
Increment=1
LoopCount=0
InvertMeasure=0
DynamicVariables=1

; ========= Meters ==========
[MeterImage]
Meter=Image
ImageName=#@#SSBU_Panoramic2.png
X=0
Y=(#SCREENAREAHEIGHT#/2-#ImageH#/2)
; X, Y, W, H, Origin
ImageCrop=[MeasureLoop:],0,#SCREENAREAWIDTH#,#ImageH#
DynamicVariables=1
Sliding Wallpaper.jpg
P.S. Adjusting the above code to your case (e.g. ImageW and ImageH) should solve the problem you faced as well - let me know how it worked out.
You do not have the required permissions to view the files attached to this post.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Therobertguy2
Posts: 4
Joined: April 6th, 2023, 2:10 am
Location: Texas, USA

Re: Scrolling Image Wallpaper Help

Post by Therobertguy2 »

Decided to check in at work and I'm glad I did! I didn't bring my laptop, so I won't be able to check it here, but I'll try it out as soon as I get home. Thanks a ton in advance to you and everyone else who replied to this thread!

Like I said, this is my first time using Rainmeter and I found it exclusively for this scrolling functionality while scouring the internet, but I have a feeling I'll be using it as long as I'm using Windows :D

I'll edit this post to let you know how it goes!

EDIT: It worked! But I was given a sore reminder of my lack of knowledge of Rainmeter when my desktop icons disappeared behind the skin lol. Guess I'll be looking to either replace the icons with skins or section this skin to a part of my desktop without icons. Either way, it looks great and I'll be using it once I figure that part out, so thanks again for your help!
Last edited by Therobertguy2 on April 10th, 2023, 4:02 am, edited 2 times in total.
User avatar
Yincognito
Rainmeter Sage
Posts: 7185
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Scrolling Image Wallpaper Help

Post by Yincognito »

Therobertguy2 wrote: April 8th, 2023, 10:52 pm Decided to check in at work and I'm glad I did! I didn't bring my laptop, so I won't be able to check it here, but I'll try it out as soon as I get home. Thanks a ton in advance to you and everyone else who replied to this thread!

Like I said, this is my first time using Rainmeter and I found it exclusively for this scrolling functionality while scouring the internet, but I have a feeling I'll be using it as long as I'm using windows :D

I'll edit this post to let you know how it goes!
No problem. If you're interested in such scrolling, you should also check Container meters (the example at the bottom of that page is quite revealing) - they too represent a possible solution in this case, e.g. make some image or shape meter a container to mask out what's outside of it, then scroll whatever images you want within. By the way, expanding the original image to twice the width is not the only solution, you can place two identical images side by side as well, with the help of relative positioning, then operate the positional change only on the first image, since the second will follow suit accordingly.

Can't remember exactly what I was searching for when I found out about Rainmeter almost a decade ago, but it was about the same thing as you mentioned: made it do what I was looking for at that time, and liked it so much for a bunch of other reasons that I never quit using it afterwards. Hopefully your experience with it will be as satisfying as it was mine (and probably a lot of others' too). ;-)
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth