How To Art Direct Point Cloud Motion Using Only VEX

This tutorial will cover how to create random motion on a point cloud for shots like flocking birds or planes using only VEX code on a single node in SideFX Houdini.

Updated Code (03/09/2017):

Here is the final VEX code. I tweaked a couple of things so that there are now UI controls created for the user to control. Also added ability to scale copies.

@WF = ch(‘wobble_freq’);
[email protected] = chv(‘wobble_axis’);
@angle = radians(ch(‘wobble_degrees’)) * (sin((@Time * @WF)+ @ptnum));
matrix3 m = ident();
rotate(m, @angle, @axis);
@orient = quaternion(m);

@pscale = rand(@ptnum);
@pscale = fit(@pscale,0,1,ch(‘pscale_min’), ch(‘pscale_max’));
[email protected] = chv(‘motion_vector’);
@speed = ch(‘speed’);
@P += ((rand(@ptnum) * @MV) * @Frame) * @speed;

Come see more at www.framehaus.net.

Follow us!

Twitter: @framehaus3D
Twitch: https://www.twitch.tv/vfxtobias
Instgram: @framehaus3D

(Visited 58 times, 1 visits today)

You might be interested in