It is currently April 27th, 2024, 12:46 am

help with animation - i'm new here

Get help with creating, editing & fixing problems with skins
isurgent
Posts: 3
Joined: April 13th, 2022, 8:33 pm

help with animation - i'm new here

Post by isurgent »

i wanna set a animation with 66 frames at 10fps how do i get a setting? i'm trying do this for days but haven't found any complete setting :(
User avatar
CodeCode
Posts: 1366
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: help with animation - i'm new here

Post by CodeCode »

Well, the minimum refresh of any rainmeter skin is 16ms, so that frame rate wont be possible exactly.

The 60 frames though can be made into an animation by spliting the gif into separate frame images. There are several online tools to do it.

The next step is to look into the Loop measure and determine if it will get your result.

The idea is to set the loop to run indefinitely or stop, or bounce from max to min frame numbers. To do this the loop measure will iterate through 0 to 59 (or 1 to60) by setting the min and max values. The value of the loop measure will be the handler for your animation.

Name each image frame with a number of your choice of min and max values. Then in your image meter name the measurename option to be the name of your loop meter. The image name will then be managed by the loop measure. The idea is to let the loop measure count through frames. So another way to do it is to name the imagename=#@#[LoopMeasure].png (or jpg or bmp) this #@# means that your frames are being kept in the @Resources folder. WIthout the #@# the images can be in the same folder as the ini file.

Hash through that and bring new questions, as I hoipe this much will help you so far, but the final touches will require some assistance as well (since you're new to rainmeter i say that).
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
balala
Rainmeter Sage
Posts: 16174
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: help with animation - i'm new here

Post by balala »

CodeCode wrote: April 16th, 2022, 5:22 am Well, the minimum refresh of any rainmeter skin is 16ms, so that frame rate wont be possible exactly.
16 is in fact the lowest possible value of the Update option of skins. It has nothing to do with the refresh. Just to be precise...
10 fps can be achieved with Update=100. This update value means one update per 100 milliseconds, so 10 updates per second, so 10 fps.
isurgent wrote: April 16th, 2022, 1:45 am i wanna set a animation with 66 frames at 10fps how do i get a setting? i'm trying do this for days but haven't found any complete setting :(
In the Method One: Using individual frame images (preferred) section of the Animated .GIF Files tip you can find a description and a sample code of how to achieve this.
Based on this description here is a code which you can try out:

Code: Select all

[Rainmeter]
Update=100

[ImageNumberCalc]
Measure=Calc
Formula=( Counter % 66 )

[ImageMeter]
Meter=Image
ImageName=#@#Images\[ImageNumberCalc].png
AntiAlias=1
DynamicVariables=1
To get this working you have to have the frames numbered from 0 to 65 (so the images should be 0.png, 1.png and so on) and placed in the Images folder, created in the @Resources folder.
User avatar
CodeCode
Posts: 1366
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: help with animation - i'm new here

Post by CodeCode »

Yes. The modulus Counter. I thought that it was being replaced by the loop measure and not meant to be used if possible by the loop measure.

I actually prefer the Counter formula - it makes more sense for frames animations. :oops:
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
isurgent
Posts: 3
Joined: April 13th, 2022, 8:33 pm

Re: help with animation - i'm new here

Post by isurgent »

thanks a lot, finally it worked fine
User avatar
balala
Rainmeter Sage
Posts: 16174
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: help with animation - i'm new here

Post by balala »

CodeCode wrote: April 16th, 2022, 1:48 pm Yes. The modulus Counter. I thought that it was being replaced by the loop measure and not meant to be used if possible by the loop measure.
No, it has not been. In fact it can't be, due to the backward compatibility.
CodeCode wrote: April 16th, 2022, 1:48 pm I actually prefer the Counter formula - it makes more sense for frames animations. :oops:
Who one what prefer, obviously depends. In fact as I see this the Loop measure was a great mistake, it is completely useless (don't want to offend the devs, hope they don't mind and apologize if I did, but this is my opinion). But once introduced, it has to be kept, exactly due to the above mentioned backward compatibility.
isurgent wrote: April 16th, 2022, 1:58 pm thanks a lot, finally it worked fine
:thumbup:
User avatar
LuciferVisuals
Posts: 226
Joined: April 11th, 2023, 7:04 pm

Re: help with animation - i'm new here

Post by LuciferVisuals »

balala wrote: April 16th, 2022, 10:41 am
Hello again, first I have to say this is an awesome answer, exactly the correct amount of detail for someone new to coding like me to understand and immediately use. So I'm going to add some animation to my project.
to be precise... 10 fps can be achieved with Update=100. This update value means one update per 100 milliseconds, so 10 updates per second, so 10 fps.
Crystal clear, I think.. So if Update=1000 the frame rate would be 100 frames per second? Now assuming I have that right I would like to ask if the Update can be any number I like? So I can play with it once the rest is done to find the best "playback speed"?


Keith
User avatar
balala
Rainmeter Sage
Posts: 16174
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: help with animation - i'm new here

Post by balala »

LuciferVisuals wrote: April 19th, 2023, 3:36 pm first I have to say this is an awesome answer, exactly the correct amount of detail for someone new to coding like me to understand and immediately use. So I'm going to add some animation to my project.
I'm glad. Go ahead and add it. If any question arise, please come back with it.
LuciferVisuals wrote: April 19th, 2023, 3:36 pm Crystal clear, I think.. So if Update=1000 the frame rate would be 100 frames per second? Now assuming I have that right I would like to ask if the Update can be any number I like? So I can play with it once the rest is done to find the best "playback speed"?
The terminology is little bit inadequate. Update=1000 (or Update=100) in the [Rainmeter] section means one update of the whole skin per 1000 (respectivelly 100) milliseconds. The lower you set it, the more frequently the skin is updated. The lowest possible value of this option is Update=16. A lower value lets Rainmeter to update same way as with Update=16. This means one update per 16 milliseconds, which perfectly enough (or in most cases is even too low) for any kind of animation.
In fact as I hope you did understand, Update=40 means one update on every 40 milliseconds, so 25 updates per second (40 ms x 25 = 1000 ms = 1 sec). This in most cases at least theoretically should be enough for a smooth animation. If it's not, you can reduce the value even more, but take into account that the lower the Update is, the heavier the CPU is loaded. So doesn't really worth to reduce it too much. Make a few tries, to figure out what is the best value for your needs, because this might depend on the images you are using, as well.
User avatar
LuciferVisuals
Posts: 226
Joined: April 11th, 2023, 7:04 pm

Re: help with animation - i'm new here

Post by LuciferVisuals »

balala wrote: April 19th, 2023, 6:13 pm I'm glad. Go ahead and add it. If any question arise, please come back with it.

Yes thanks I did get it more of less I didn't was any particular speed yet, I have not mad the animation, I was just checking that I can experiment with the value it wasn't specific values like 100 or 1000, I could try for example 500 if I wanted.


Keith

No need answer this I got it.... Thanks again
User avatar
balala
Rainmeter Sage
Posts: 16174
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: help with animation - i'm new here

Post by balala »

LuciferVisuals wrote: April 19th, 2023, 6:38 pm I could try for example 500 if I wanted.
Update=500 is extremely much for any animation. Means two updates per second (or even less).