When working on his last project, FrameHaus’ Tobias Steiner needed to create motion with a flock of objects that not only moved along an axis, but also moved or wobbled from side to side. Adding expressions to the copy SOP can work, although it’s not such a great way if you want to direct the shot a bit. VOPS and using some math calculations can work as well, but seems a little complicated. Some more work was needed to be able to art direct point cloud motion effectively.
Tobias found a simple solution using VEX. Using a bit of VEX code, Tobias was able to art direct point cloud motion, and it didn’t require a complex node set up. Next time you are creating motion of a flock of birds, or flying planes, keep this tutorial in mind.
Tobias posts the final VEX code, that has been tweaked with a few things so that there are UI controls created for the user to control:
vector normal = chv(‘normal_axis’);
[email protected] = chv(‘wobble_axis’);
@WA = ch(‘wobble_amount’);
@WF = ch(‘wobble_freq’);
@N = normal;
@N.x += @WA * (@WV.x * (sin((@Time * @WF)+ @ptnum)));
@N.y += @WA * (@WV.y * (sin((@Time * @WF)+ @ptnum)));
@N.z += @WA * (@WV.z * (sin((@Time * @WF)+ @ptnum)));
@a= fit01(rand(@ptnum), ch(‘slowest’), ch(‘fastest’));
[email protected] = ch(‘speed_rate’);
@c = (@a * @b);
@P.x = (@c * @Frame);