Animation Basics

file Banner.png
Click here to get to find a link to the Guided Houdini Files.

 

Here we will learn how to be able to use the play button at the bottom left of the Houdini window. This will allow us to make animations.

play.PNG
Pause, play and other frame count manipulators.

You can press play or get used to use the arrow keys to play and manipulate the frame number.

Now we want to use the current frame number directly. Upon hitting play, Houdini will render each frame consecutively until the total frame number $NFRAMES is hit. The special character that encodes the frame number is:

$F

and it is an integer. Optionally one can use $FF  as a float to make sub frame computations but we don’t need that right now. Another important character is

$T

which gives you the times passed in seconds as a float. For Consistency use $F if you want the program to run equally on every computer. $T on the other hand is useful for real time applications.

Lets see what $F does with a simple example. Create a geometry node and throw in a test geometry and add a transform node to it. Transform nodes handle rotation, translation, scaling etc.

38.gif
Adding a geometry node with a test geometry and a transformation.

Now go to the transform node and insert $F into the final entry of the rotation line. Then click on the scene and hit play. With every frame update, the transform node will rerun with the new frame number it its rotational component.

39.gif
Adding $F in the transformation and playing the animation.

Use the bottom right global animation button to adjust the number of frames per cycle. Set it to 360 and test out more complex functions such as 720*sin(\$F) in the transform node.

40.gif
Editing global animation options.
41.gif
Rotation and translation together.

Important for VEX code:

In order to use global variables such as $F inside Vex code of a wrangler an additional intermediate step is required. Refer to the parameter handling tutorial to understand this. Optionally you can also use @Time, @Frames inside the VEX code.

Print Friendly, PDF & Email