Attachto is a Houdini SideFX digital asset for adding points to polygons by clicking the LMB in the viewport.
attachto_720.mov
Attachto creates points when the LMB is clicked in the viewport on polygonal geometry objects and attaches these points to the polygons on which they were created, inheriting all subsequent transformations of the parent polygons. By using with "CopyToPoints" SOP node this asset allows for quick and convenient attachment of instanced geometry to other polygonal geometry objects, creating groups, and controlling orientation and position relative to the parent objects.
Download the HDA file and install it to your houdini19.5/otls/
folder. For detailed instructions, please refer to the Houdini documentation
- Tested in Houdini versions: 19.5
- SOP
- Group and individual parameter settings
- Extracting transformation matrix from input polygons
- Control of the addition of newly created points to groups
- Control and randomization of the @pscale attribute for each created point
- Control of rotation axis and rotation angles and randomization of rotation angles when using the @orient attribute
- Control of position changing relative to the parent object
- Alignment of instanced geometric objects copied onto points along the surface of polygons
- Does not work with packed geometry
- The polygonal object to which points need to be attached must contain a primitive attribute @xform with a transformation matrix4 for each primitive:
- If you are using packed geometry, create the @xform attribute using the "getpackedtransform" function and unpack the packed polygons.
- If you are using the "Transform" SOP node, enable the "Output Attribute" toggle, add the "attribpromote" SOP node, and transfer the detail attribute @xform to the primitives.
- If you cannot create the @xform attribute on incoming primitives, add a "connectivity" SOP node before the asset, go to the "Incoming Geometry" tab, enable the corresponding toggle, and set the attribute name the same as specified in the "connectivity" SOP node.
-
Connect the polygonal object to "input1".
-
Select the HDA "attachto" in the Network View, select "Show Handle" in the selector and handle control menu.
-
Set the necessary parameters if required. Click the mouse to add points to the polygonal geometry object connected to "input1" and displayed in the viewport.
- If you already know the polygons to which you need to attach points, try to input only those into the asset, removing all others. This will increase efficiency and reduce the use of computational resources.
- Points are added quite quickly, and if you need to place a single point in a specific position, try not to move the mouse cursor during the click. If someone finds this control inconvenient to use, please let me know, and I will add control over the delays between adding points to the asset parameters.
The example file contains simple settings for a quick asset test.
"Default Setting" tab contains basic parameters for creating points and controlling attribute values.
The majority of parameters in default settings are presets for individual parameters of newly created points that are used during calculations.
This tab contains settings necessary to obtain the transformation matrix from incoming polygons. Use this if your geometry does not contain a primitive attribute @xform with a transformation matrix4.
If you have any feedback or run into issues, please feel free to open an issue on this GitHub project. I appreciate your support!