ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Analog counter expression...

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Francois Germain
Analog counter expression...
on Jun 18, 2012 at 5:00:00 pm

Hi guys. I'm trying to make an analog counter like an odometer. Aharon Rabinowitz made a great poscast on that subject. But the way it's made, the decade number has an expression that it goes 1/10 the speed of the units number. The hundred number is 1/10 the speed of the decade number and so on.

What I'm looking for is an expression that make the decade number change between number 9 and 0 of the unit number. Each time the unit number switch from 9 to 0, the decade number increments of one.

I hope it's clear for you. English is not my first language.

Thanks


Return to posts index

Francois Germain
Re: Analog counter expression...
on Jun 19, 2012 at 2:41:12 pm

Hey I've found it.

If you follow the odometer tutorial from Aharon Rabinowitz
http://library.creativecow.net/articles/rabinowitz_aharon/Odometer_2/video-...

there's the expression you put in the Offset effect (shift to center property)
Depending of the digit, you have to modify the start_value and the End_value. Hope someone will use it.

variableSlider =thisComp.layer("master compteur").effect("Slider Control")("Slider");// this line depends of your layer's name of course;

digit1 = Math.floor(variableSlider%10);
digit2 = Math.floor(variableSlider/10);
digit3 = Math.floor(variableSlider/100);
digit4 = Math.floor(variableSlider/1000);
digit5 = Math.floor(variableSlider/10000);
digit6 = Math.floor(variableSlider/100000);
digit7 = Math.floor(variableSlider/1000000);

start_value=digit2;
end_value=digit2+1;
space_between_numbers=192
column_height=1920
offset=thisComp.layer("master compteur").effect("Slider Control")("Slider")%10;
y=value[1];
x=linear(offset,9,10,start_value,end_value);
[x*space_between_numbers%column_height,y]


Return to posts index

Liran Tabib
Re: Analog counter expression...
on Sep 11, 2018 at 12:43:16 pm
Last Edited By Liran Tabib on Sep 11, 2018 at 12:48:31 pm

You can create odometer animation with Analog Counter preset in the link below:
https://www.vdodna.com/products/analog-counter/

Cheers

Liran Tabib
http://www.vdodna.com


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]