It is currently May 19th, 2024, 11:38 am

## Animation Question

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

### Re: Animation Question

PsxDoomForever wrote: November 5th, 2023, 5:36 pm If I have 4 frames for the upcoming animation. Is it correct to name files starting with 0. Or starting with the number 1?
As ZXCVBOT mentioned, it's up to you - there are advantages and disadvantages to either.

Starting at 0 makes it easier to work with simple % aka the modulo operation (i.e. the integer remainder of a division), but then a self incrementing measure (Calc in this case) will first increment to 0 (its default) + 1, so 1, if you want to avoid complications such as disabling it initially to make it 0.

However, even a modulo involving operation can be made to start at 1, by doing (ThisMeasure % UpperLimit + 1) instead of ((ThisMeasure + 1) % UpperLimit) so for simplicity, starting at 1 would be easier in this case, albeit from a strict mathematical point of view starting at 0 would make more sense and fit better with other operations.
Last edited by Yincognito on November 5th, 2023, 7:21 pm, edited 1 time in total.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
balala
Rainmeter Sage
Posts: 16238
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

### Re: Animation Question

EDIT: Yep, Yincognitto beat me. Again. Sorry...
PsxDoomForever wrote: November 5th, 2023, 5:36 pm If I have 4 frames for the upcoming animation. Is it correct to name files starting with 0. Or starting with the number 1?
There is no such thing, as correct way. As ZXCVBOT said, both ways are correct, but numbering the images from 0 is simpler approach, because the result of a modulo operation (%) on a mathematical formula is starting from 0. If you want to create a measure to increase the values from 0 or 1 to the largest possible value, is much more easier to write a Formula=(( Measure + 1 ) % 20 ) (for instance) option on a Calc measure (the result of this formula increases from 0 to 19 - just an example, which not necessary has something to do with your need), than something like Formula=((( Measure + 1 ) >= 20) ? 1 : ( Measure + 1 )) to get the result in the 1 - 20 range.
Yincognito
Rainmeter Sage
Posts: 7286
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

### Re: Animation Question

balala wrote: November 5th, 2023, 6:36 pm EDIT: Yep, Yincognitto beat me. Again. Sorry...
Yeah, no worries, I got beaten by ZXCVBOT too, haha! Anyway, to put this another way, starting at 0 can be more practical, while starting at 1 can be more user friendly. The choice depends on the user and the circumstances.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
ZXCVBOT

### Re: Animation Question

You both didn't beat ( ) anyone - I'm not talking about the time, rather you both point to something insightful - me on the other hand - heh - just blurt out whatever's on my mind, without getting into any technicalities, sometimes, full of mistakes.
Yincognito
Rainmeter Sage
Posts: 7286
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

### Re: Animation Question

ZXCVBOT wrote: November 5th, 2023, 7:56 pm You both didn't beat ( ) anyone - I'm not talking about the time, rather you both point to something insightful - me on the other hand - heh - just blurt out whatever's on my mind, without getting into any technicalities, sometimes, full of mistakes.
It's the intent that matters. Plus, you're doing quite well helping out, for someone who just recently expanded his horizon in Rainmeter, so to speak. Give it time and you'll get better and better at that.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
ZXCVBOT

### Re: Animation Question

I'll say I was quite motivated by: "One day you will be explaining here" ~jsmorley
Yincognito
Rainmeter Sage
Posts: 7286
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

### Re: Animation Question

ZXCVBOT wrote: November 6th, 2023, 10:51 am I'll say I was quite motivated by: "One day you will be explaining here" ~jsmorley
Yep, jsmorley motivated lots of us.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth