Wednesday, June 8, 2011

Houdini Notebook #1: Vectors Along a Curve

Ever need a vector attribute that runs along a curve? Maybe you want to use it as a force for particle movement or FLIP fluids. Here are a few easy ways to do it.

One of the most underused and badly named SOPs in Houdini, the Polyframe SOP. If used on a curve, this will create a tangent attribute along the u coordinate. By default, this attribute is named tangentu, but you can just enter something more commonly used for effects, like N or v.


You can also use a Point SOP, go to the Force tab, and check on Add Edge Force. The vector point attribute created is called edge_dir. You can later remap this to N or v.

If you need to reverse the direction of the vectors, just use a Reverse SOP before doing these procedures.