Some Houdini Gotchas

To qualify a vector

If a transform is applied to a vector carrying P or N information it makes sense that the vector is affected by the transformation. But if we have a Cd vector associated to a point we probably do not want the vector to be affected by the transformation. If we have a look in the spreadsheet we can see that the components of P and N vectors are denoted by [x],[y],[z] while Cd have [r],[g],[b] and a custom vector have [0],[1],[2].

So if we want to make a custom vector that we have created inside a point vop be affected by a transformation we need to add an add attribute vop and in the name field give it the same name as we given it in the bind export. Then we set the type of the vector in the type info drop down on the add attribute node.

To qualify a vector type in vex we use setattribtypeinfo. The example below will make our custom vector be treated as a normal (N) vector.

v@custom = @N;
setattribtypeinfo(0, 'point', 'custom', 'normal');