Since H19.0 we have the Attribute Combine SOP [www.sidefx.com]. It combines float attributes by layering different float operations (add, subtract, multiply...). It works with float vectors, but it doesn't support vector operations such as cross product, vector projection/rejection, or rotation around a vector/axis.
This gave me the idea to make an HDA called Attribute Combine Vector focused on combining vector operations.
In this very first prototype, the HDA applys a single operation from this list :
- Cross : cross product between destination and source vectors
- Project : projection of destination attribute to the direction of source attribute (it makes vectors aligned in same direction)
- Reject : rejection of destination attribute from source attribute (it makes them orthogonal)
- Rotate : rotates destination attribute around source attribute with a given angle
Examples of where this HDA can be usefull :
- (Rotate) Twisting curves, by rotating @out vector around @tangent vector, and updating positions with rotated @out vector
- (Reject) Displacing curves in orthogonal direction (electric strand), by rejecting displacement direction from tangent vector.
- (Project) Inherite a vector direction and keep magnitude
For next versions, I will be working on these features :
- Layering multiple operations
- Adjust/process source attrib before applying operation
- Support all attribute classes (it only works on point attribs for now)
- Apply this node on a given group only
- Creation of xform and/or orient attributes as part of post-processing