It is currently March 28th, 2024, 9:21 pm

Animations

General topics related to Rainmeter.
NegativeIQ
Posts: 22
Joined: May 7th, 2016, 12:56 am

Animations

Post by NegativeIQ »

1. I notice allot of people who use animations in rainmeter set update rate to 100. Why is that so? Its widely known that there has to be at least 24 pictures per second to make smooth animation (motion picture). And 100 milliseconds update rate allows only for 10 frames (images/pictures) per second. So why 100? Why not set update rate to 33 milliseconds that will allow up to 29 frames per second. Or at lest 40 milliseconds = 25 frames.

2. I bumped into a wallpaper i wanted to animate so i searched few skins to see how they do it. I found one android rotating hologram that i liked since it was smooth and i actually needed to make rotating 3d earth. I noticed it uses single image (bitmap meter) and has all frames inside that image. I guess thats why it had good CPU performances. But it used 100mb of ram just for that small animation (~400x300 px), while mine would be a bit bigger (even with stretching) and much longer (more frames) so i guess it would use drastically more memory. Is there any way to lower these ram usage? I would not mind sacrificing a bit of CPU as tradeoff.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Animations

Post by jsmorley »

The speed of an animation isn't really about the skin Update rate alone. Just setting Update doesn't get you to a frames per second that means anything.

The ways Rainmeter does animations are:

1) Have completely separate image files as the "frames" of the animation. You just number them, and then use a loop of some kind to display each numbered image in order in an Image meter.

2) Have the separate images in a single image file that is a "bitmap" of the frames. Then you use a loop of some kind to display each frame of the image in a Bitmap meter.

How fast you want this loop to run, the Update of the skin, is going to depend on the number of frames that you have. If you have 25 frame images, and you want it to display in one second, then yeah, setting Update=33 will more or less get you there. But while an Update of 33 will get you 25fps, that just doesn't mean anything in this context. It assumes that you have created the images in such a way that 25 images are equal to one second of animation.

Since the majority of animations folks do using images are frames extracted from an animated .gif file, you really are going to want to use some "trial and error" to get the speed you want with Update. You can't really know, (or at least Rainmeter can' t know) what the "delay between frames" value was in the original .gif file. You are just going to have to eyeball it.

As to memory, Rainmeter loads and "caches" all images used in the skin. The only ways you can reduce the memory use are:

1) Make the .jpg or .png "quality" of the images or bitmap less, so they are "smaller" in file size.

2) Reduce the number of images used, or "frames" in the bitmap, so you are sacrificing some "smoothness" to get fewer images or frames, and thus less memory.

I don't agree with the premise to be honest. I would always give up memory to save CPU. 100 Megabytes of memory is pretty much a drop in the 4-8-16 Gigabyte ocean of memory you have.