Skip to content

Procedural animation

Angular rotation

In procedural animation, especially when creating effects like a tornado, we use angular speed to simulate the natural motion where different parts of the tornado rotate at different speeds. In a tornado, the narrower, lower part spins faster than the wider, upper part due to the conservation of angular momentum. This variation in spin speed creates a realistic swirling effect.

Here’s a small example of how to create such an animation using VEX in Houdini. This method can be used for standalone procedural animations or as a foundation for more complex simulations.

Angular rotation

VEX example

float radius = chramp("ramp", @curveu) * 4;
float angular_vel = @Time*10 ;
vector up1 = set(1,0,0);
vector n1 = v@N;
float angularVelocity2 = angular_vel / 2.0;
float speed = angularVelocity2 / radius;
float angle = radians(ch("angle"));
vector axis = chv("axis");
vector4 rot = quaternion( speed , axis);
vector4 quat1 = quaternion(maketransform(n1, up1));
@orient = qmultiply(quat1, rot);
@pscale = radius;

Download HIP file

In this example:

  • radius - is determined by a ramp parameter, controlling the scaling based on the position along the tornado.
  • angular_vel - defines the base angular velocity, increasing over time.
  • speed - is calculated by dividing the angular velocity by the radius, making the speed higher at the bottom where the radius is smaller.
  • rot and quat1 are quaternions used to handle rotation, ensuring smooth and continuous angular motion.