Another sprocket, another way to make things rotate. Besides keyframing and using the cycle attribute, another good way to make things rotate continuously is using a Lua Script. Among the scripts available with Strata Design 3D is a continuous rotation script, that enables us to make things rotate continually at the same speed in any of the three axes.
Let’s make a new scene, and another sprocket.
Again, set an animation length, in this case 10 seconds.
To make the sprocket rotate, expand the sprocket’s properties and select the Rotation attribute.
To animate via a script, click con the Equal Sign button. The Script Editor appears.
From the Elements drop-down menu, let us select Y-Axis Continuous Rotation.
We ant this sprocket to turn slowly, so we’ll change
local rotationsPerSecond = 1
to
local rotationsPerSecond = 1
That is, one turn in 5 seconds.
That’s it. Quicker than keyframing but less flexible.
To make the second sprocket turn the opposite way, we duplicate the sprocket we have, edit its script and set the rotation speed to:
local rotationsPerSecond = -0.2
That gives us the following animation (in toon render).
There we have it. Now it is time to create sprockets with different tooth numbers and orchestrate their animation 😉


