Seconds hand animation of 60 seconds

I modelled a watch and now want to animate the second, minute, hour hand

To start with, lets say I rotate the seconds hand by 360 and apply rotation, that would be stationary

Same goes with other two hands

And how to actually follow time based rotation? Smooth sweep movement

First thing: You don’t apply the rotation to animate… Except for the 1st frame, eventually.

Next, you add keyframe for the rotation of each of the 3 hands. It’s easier if they are all parented to the clock face for example. Only one axis to take care of.

Then, a bit of math… (Assuming a speed of 24 FPS)

60 seconds in a full circle so 360/60 = 6° of rotation per second.

Go to frame 24+1, rotate the hand of the seconds by 6°. Insert a keyframe.

The same thing for the minutes… multiplied by 60 seconds per minute.

Go to frame 1440+1, rotate the minute hand by 6°. Insert a keyframe.

12 hours in a full circle. That’s 30° per hour. 1 hour is 3600 seconds multiplied by 24 frames. 86400!

You could do that but that’s a bit silly. Let’s simplify to 5° for 10 minutes.

Go to frame 14400+1, rotate the hour hand by 5° and add a keyframe.

Open the Graph Editor. Convert all the curves to Vector with [V].

Finally, open the [N] panel of the Graph Editor and add a Cycle modifier to each curve. Set “No Cycles” for “Before” and “Repeat with Offset” for “After”.

Done!

Now, you can stare at your watch for hours… days… or more. :wink:

I’m not quite sure if I understand your question correctly. Why would you want to apply rotation?
You can simply animate all hands like you did with the seconds (of course in the right relation to the seconds).
Well, if you animate it, it is a time based rotation.

Or do you mean according to the real time? Then you can add a driver to animate the rotation. Move the mouse over the rotation value in the properties panel, right-click and select “add single driver”. You need a function to access the time, so open the text editor and paste this:

import time

def TimeOfDay():
    lt = time.localtime()
    return (lt.tm_hour + lt.tm_min/60 + lt.tm_sec/3600) / 24


import bpy

# Add variable defined in this script into the drivers namespace.
bpy.app.driver_namespace["timeofday"] = TimeOfDay


Click on “run script”. Open the Graph editor window, select “Drivers” in the header, select the curve on the left side. On the right hand panel (press N if not visible). In the “Drivers” section, in the “Expr” textbox, enter this: -radians(timeofday()720)
this is for the hours hand. Do the same for the minutes and seconds. The expression for them is
-radians((timeofday() * 8640) % 360)
resp
-radians((timeofday() * 86400
6) % 360)

But who needs the current time? :slight_smile:

(I’ve started writing this message some hours ago, but had to research before. As always with Blender issues, this can take days and month…)

Thanks Kaluura and Willi

Great learning from the information both of you provided :slight_smile: Thanks a ton

I’m glad these smart math / coding dudes were able to help you Tahseen

… could I ask a somewhat similar animation question. I’m modeling a slot machine which will be animated. So I need to figure out a way to animate one of these


Basically if you think about when a slot machine pays out money… the numbers rapidly increase as the coins are dispensed, the final number shows the total payout of coins. Do you think this is possible to animate this type of display using some kind of code of something.

It doesn’t need to be accurate with how many coins are really coming out of the machine… I just need it to rapidly raise to say maybe 150.

Any thoughts or suggestions as to if this is possible… and how maybe to approach it? … I should mention I am using cycles

It would be exactly in the same way as told by Kaluura

What you do is do 0 to 9 animation of first digit. Each digit switch to another every 24 frames or what interval. And then rest you do in Graph Editor

Now for the second digit key frames would be inserted every 24*9 frames interval for 9 digits and then you can do the graph editor thing for cyclic thing.

Likewise rest

Bleh! :no: I wouldn’t do that kind of tedious animation…

Here is what I would do:


One single value to animate. :eek::spin: :eyebrowlift::yes: :smiley: (I’m really proud of this one.)

All you need is a texture with the digits. I used another kind of LED display but the principle remains the same for any style.

The node group takes the value, chops it into little bits, cooks some magical potion and serves you UV coordinates for 4 digits side by side. :smiley: You have virtually nothing to do. The whole LED display is a single face (inside some glass to make it prettier). That’s all. You take any texture of 10x1 and a quad of 4x1. Unwrap to cover the whole texture. Done! :yes:

I can’t show you the node tree which is too big… but you’ll look by yourself…

LED Display.blend (163 KB)

WARNING: You need Blender 2.66 minimum because I use nested node groups. (My LED texture is packed.)

Enjoy!