Search - User list
Full Version: WIP - Attribute Combine Vector SOP - [Houdini Utility]
Root » H20 Tech Art Challenge » WIP - Attribute Combine Vector SOP - [Houdini Utility]
ObeidaZakzak
Hello,

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
ObeidaZakzak
v0.2

  • All attribute classes are supported (point/primitive/vertex/detail)
  • Multiple combines can be done
  • Choice between a vector attribute or a constant vector parm to be combined
  • Added new operations : Copy, Add, Subtract
  • Added post-processing : normalize, and overal scale

Still TBD :
  • Adjust/process combined attrib before applying operation
  • Apply this node on a given group only

Creation of xform and/or orient attributes may come in another HDA, rather than being part of post-processing of this HDA.
ObeidaZakzak
v0.5 : available to dwonload and test
  • Fixed a couple of bugs and performance issues, and reworked the structure of the VEX script so it's easier to maintain
  • Added a menu to select an adjustment operation on the combine vector (normalize or scale)
  • Added group parm so the combine operations apply only on selected group

Attached a hip file demonstrating how to bend and twist curves using this tool.
ObeidaZakzak
v0.6

And here's a hip to demonstrate vector operations by visualizing three vectors (operands and result).
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB