Houdini 20.5 Nodes Geometry nodes

Chain geometry node

Repeats one or more pieces of geometry along a curve.

On this page
Since 18.5

Overview

This node copies and deforms geometry from the first input to fit along the curve or curves in the second input.

This is similar to the Path Deform node, which deforms geometry according to the shape of the curve. However, that node deforms all geometry to a curve, while this node lets you repeat one or multiple geometry “pieces” along the length of the curve, with controls for number of pieces, the pattern, the joining between the pieces, and so on.

How to

  • With this node selected in the network editor, press Enter in the viewer or click the Handles tool to see the handles for this node.

  • Drag the red “tail” handle to control where along the curve the chain starts.

    You can drag the handle past the start of the curve, in which case the Start behavior parameter controls what happens.

  • Drag the green “head” handle to control the range of the chain along the curve.

    You can drag the handle past the end of the curve, in which case the End behavior parameter controls what happens.

Inputs

Geometry to repeat

The geometry to copy along the curve. This can be one thing or multiple pieces. The Find Pieces parameter controls whether to separate this geometry into pieces by connectivity, or by an attribute.

Curves

The curve(s) along which to copy and deform the object(s) from the first input.

Parameters

Geometry Group

The primitives to use from the first input. Leave this blank to use all geometry.

Curve Group

The curve primitives to use from the second input. Leave this blank to use all curves.

Mode

How this node copies and deforms the geometry from the first input onto the curve(s) in the second input.

Deform Along Curve

Deforms the pieces to follow the shape of the curve.

Deform Between Pivots

Keeps the pieces rigid, deforms the pivots between the pieces.

Chain Pattern

Enable Deformation

Whether to deform the repeated geometry along the supplied curve. If you turn this on, the node will position the pieces rigidly along a straight line according to the parameters below, instead of deforming them to follow the curve. This may be useful if you just want a stack of objects, or if you plan to deform the chain using a different node later.

Find Pieces

How to separate the geometry into pieces to be repeated along the curves.

By Connectivity

Consider groups of fused primitives to be a single piece.

By Piece Attribute

Consider primitives with the same value for a given attribute to be parts of the same piece.

Piece Attribute

When Find Pieces is By Piece Attribute, the name of the primitive attribute that controls which piece the primitive is a part of.

Number of Pieces

How many pieces to repeat along the curve.

Fit Pieces Along Curve

Places as many whole pieces as will fit along the curve.

Explicit Number

Place a set number of pieces along the curve, scaling them to fit.

Num Pieces

When Number of Pieces is Explicit Number, the number of pieces to place along the curve.

Fraction of Curve

When Number of Pieces is Fit Pieces Along Curve, this is the fraction of the curve length to use when calculating how many pieces will fit. For example, 0.5 gives enough pieces to fit half the curve length. The default is 1.0 (enough pieces to fit along the full curve length).

Only Repeat Full Pattern

With multiple pieces you can specify the pattern in which the different pieces appear along the curve (see the Pattern group below). When Number of Pieces is Fit Pieces Along Curve and this checkbox is on, the node will calculate how many pieces it needs to fit the maximum whole number of patterns along the curve (so the pattern will not be cut off early at the end of the curve).

Uniform Piece Scale

The amount to scale the geometry pieces before mapping them to the curves.

Enable Attibute Scale

Whether to override the Uniform Scale with a primitive attribute on the curves.

Uniform Scale Attribute

A primitive attribute on the curves specifying the Uniform Scale on each curve, this is multiplied in with the base Uniform Scale to compute the full uniform scale factor for each curve.

Map Length Using

How to specify the length the chain along the curve.

Fraction of Curve Length

For example, 0.5 (half as long as the curve), 1.0 (as long as the curve). 2.0 (twice as long as the curve), and so on.

Fraction of Geo Length

Specify length relative to the length of the undeformed chain. For example, 0.5 (half the length of the chain), 1.0 (the full length of the chain), 2.0 (twice as long as the undeformed chain), and so on.

Distance

Specify arc length in Houdini world units. For example, 0.5 (half a unit long), 1.0 (one unit long), and so on.

Map Length

The length of the chain along the curve, in the units specified by the Map Length Using popup menu.

Override

Turn this on to specify the length per-curve (when the second input has multiple curves), using a curve attribute.

Pos End Attrib

When Override is on for the length, this is the name of a curve attribute to use to set the chain length per-curve.

Offset Position Using

How to specify the start point of the chain along the curve.

Curve U Position

From 0.0 (start of the curve) to 1.0 (end of the curve).

Fraction of Geo Length

Specify start position relative to the length of the undeformed chain. For example, 0.5 (start half the length of the chain along the curve), 1.0 (start the full length of the chain along the curve), 2.0 (start twice the length of the undeformed chain along the curve), and so on.

Distance

Specify arc distance along the curve in Houdini world units. For example, 0.0 is the start of the curve, 1.0 is one Houdini distance unit along the curve, and so on.

Position Offset

Where to start the chain along the curve, in the units specified by the Offset Position Using popup menu.

Override

Turn this on to specify the start position per-curve (when the second input has multiple curves), using a curve attribute.

Pos Offset Attrib

When Override is on for the offset, this is the name of a curve attribute to use to set the offset per-curve.

Start Behavior

What to do when the start position is before the start of the curve. For the best performance, it is recommended to use Extend or Clamp.

Extend

Position the chain along an invisible line extending out along the start tangent of the curve.

Clamp

“Freeze” the geometry at the curve start. This causes geometry to “bunch up” and overlap if you try to move it past the start of the curve.

Clip

Cuts and deletes any geometry that would appear before the start of the curve. This is the same effect you would get with a Clip node. This is a particularly expensive operation. For better performance it is recommended to use Extend or Clamp.

End Behavior

This specifies the operation to apply to the geometry that goes beyond the end of the curve. For the best performance, it is recommended to use Extend or Clamp.

Extend

Position the chain along an invisible line extending out from the end tangent of the curve.

Clamp

“Freeze” the geometry at the curve end. This causes geometry to “bunch up” and overlap if you try to move it past the end of the curve.

Clip

Cuts and deletes any geometry that would appear after the end of the curve. This is the same effect you would get with a Clip node. This is a particularly expensive operation. For better performance it is recommended to use Extend or Clamp.

Pattern

Repeat Pattern

When the first input has multiple pieces, this controls the order in which they appear in the chain.

Cycle

Cycle through the different pieces.

Explicit Pattern

Cycle through an explicit list of pieces in the Class Pattern parameter.

Random

Choose each piece along the chain randomly.

Weighted Random

Choose each piece randomly, but you can specify per-piece “weights” in a multiparm, so some pieces are more likely than others.

Weighted Random from Attribute

Choose each piece randomly, but you can specify per-piece “weights” using an attribute on the piece geometry, so some pieces are more likely than others.

Class Pattern

When Repeat Pattern is Explicit Pattern, this is a space separated list of piece values to cycle through along the chain. If the pieces are defined by connectivity instead of an attribute value, each piece is represented by an arbitrary number from 0 to number of pieces› - 1.

Offset

Offsets the start of the pattern by a certain number of pieces.

Seed

When Repeat Pattern is Random, Weighted Random or Weighted Random from Attribute, this is the seed value for the random number generator. The same seed value always generates the same “random” values. For example, if you want different random values for each frame, use $F (the frame number) as the seed.

Repeat Length

When Repeat Pattern is Random, Weighted Random or Weighted Random from Attribute, how many random pieces to choose for the pattern. If the curve first more pieces than this, the pattern will repeat.

Weight Attribute

When Repeat Pattern is Weighted Random from Attribute, this is the name of a primitive attribute on the piece geometry that sets the piece’s random weighting. The weighting for a piece is the average of this attribute’s values across the primitives of the piece.

Initialize Weights

When Repeat Pattern is Weighted Random, click this button to automatically set up the multiparm with instances corresponding to each piece. You can then edit the Weight for each piece.

Number of Pieces

This is a multiparm that allows you to set a Weight for each piece, controlling how likely it is to appear randomly in the chain relative to other pieces. Click Initialize Weights to automatically set up the multiparm with instances corresponding to each piece.

Piece

The piece value for this piece. If the pieces are defined by connectivity instead of an attribute value, each piece is represented by an arbitrary number from 0 to number of pieces› - 1.

Weight

A value representing how likely this piece is to appear in the chain, relative to other pieces. The weights of all pieces are normalized to add up to 1.0 and then used as probabilities. For example, if three pieces have weights of 1, 1, and 2, the last piece is likely to appear 50% of the time, while the other two are each likely to appear 25% of the time.

Ends

Use Start Cap

Turn this checkbox on to explicitly use a certain piece as the first item in the chain.

Start Cap Piece

The piece value for the piece to use as the first item in the chain. If the pieces are defined by connectivity instead of an attribute value, each piece is represented by an arbitrary number from 0 to number of pieces› - 1.

Use End Cap

Turn this checkbox on to explicitly use a certain piece as the last item in the chain.

End Cap Piece

The piece value for the piece to use as the last item in the chain. If the pieces are defined by connectivity instead of an attribute value, each piece is represented by an arbitrary number from 0 to number of pieces› - 1.

Exclude End Pieces from Pattern

When this is on, the start/end pieces do not repeat as part of the pattern.

Do Not Deform End Pieces

When this is on, the start/end pieces do not deform to follow the shape of the curve.

Deformation

Enable Scale

Turn this on to allow scaling the piece geometry “outward” (away from the curve).

Base Scale Factor

A “global” outward scaling factor along the entire length of the curve. For example, 1.0 doesn’t change the scale of the chain, 0.0 collapses the chain down to nothing, 0.5 scales the chain inward by half, 2.0 scales the chain outward by two times.

Enable Attribute Scale

Set this popup menu to Scale by attribute to scale the chain by the value of a point attribute on the curve. (This is multiplied by both the base factor and the ramp, if you use the ramp parameters below.)

Curve Attribute

When the popup menu next to Base Scale Factor is Scale by attribute, this is the name of a point attribute on the curve that scales the chain geometry inward or outward.

Enable Scale Ramp

Turn this on to use a ramp to scale the chain geometry inward or outward along the length of the curve.

Scale Ramp

When Enable scale ramp is on, this ramp controls the inward/outward scaling along the length of the curve. The horizontal axis represents the length of the curve (not the length of the chain). The vertical axis represents the scale. (The ramp scale is multiplied by both the base factor and the attribute, if you use the attribute parameters above.)

You can set scales outside the current ramp bounds by selecting a ramp point and typing a value in the Value field.

Enable Rotation

Turn this on to allow rotating the chain geometry around the curve.

Base Rotation

A “global” rotation angle (in degrees) along the entire length of the curve.

Enable Attribute Scale

Set this popup menu to Scale by attribute to scale the rotation by the value of a point attribute on the curve. (This is multiplied by both the base factor and the ramp, if you use the ramp parameters below.)

Curve Attribute

When the popup menu next to Base Rotation is Scale by attribute, this is the name of a point attribute on the curve that scales the rotation of the chain geometry.

Enable Rotation Scale Ramp

Turn this on to use a ramp to control the rotation angle along the length of the curve.

Rotation Scale Ramp

When Enable Rotation Scale Ramp is on, this ramp scales the Base Rotation along the length of the curve. The horizontal axis represents the length of the curve (not the length of the chain). The vertical axis represents a scaling factor to multiply by the Base Rotation. (The ramp scale is multiplied by both the base rotation and the attribute scaling factor, if you use the attribute parameters above.)

You can set scales outside the current ramp bounds by selecting a ramp point and typing a value in the Value field.

Fusing

Where the end of one piece meets the start of the next piece, the node can fuse points within a certain snapping distance, and delete coincident faces, giving you better geometry.

Fuse Repeat Geometry

Whether to fuse overlapping points (within the Snap distance) where the end of one piece meets the start of the next piece.

Snap Distance

At the meeting point between pieces, the node will fuse points on the different pieces if they are within this distance (in world units).

Fuse Method

You can restrict which points on each piece are allowed to fuse.

By Group

Only specific points are allowed to fuse (using a named group or point number syntax).

By Start and End Groups

On the preceding piece, only points specified in an “end” group are allowed to fuse. On the following piece, only points in a “start” group are allowed to fuse.

Along Unshared Edges

Any point on a boundary (unshared) edge is allowed to fuse if it’s within snapping distance of a point on the other piece.

Fuse Group

When Fuse Method is By Group, this specifies which points can fuse together. This can be a named group or point number syntax.

Fuse Start Group

When Fuse Method is By Start and End Groups, this specifies which points on the following piece can fuse. This can be a named group or point number syntax.

Fuse End Group

When Fuse Method is By Start and End Groups, this specifies which points on the preceding piece can fuse. This can be a named group or point number syntax.

Rigidity

Normally the pieces deform to the shape of the curve. You can instead make the pieces completely or partially rigid (non-deforming).

Enable Rigidity

Turn this on to make the pieces fully or partially rigid.

Constraint Method

How to specify the rigidity.

By Rigidity Group

Specify a list/group of primitives (polygon faces) from the first input that stay rigid.

By Piece Attribute

Control which primitives (polygon faces) stay rigid using an attribute on the primitives.

Piece Attribute

When Constraint Method is By Piece Attribute, this is the name of a primitive attribute on the geometry in the first input that controls rigidity.

Rigid Prims

When Constraint Method is By Rigidity Group, this specifies which primitives from the first input stay rigid. This can be a named group or primitive number syntax

Enable Stretch Softening

Smooths non-rigid points within a certain distance (Soften radius parameter below) of rigid primitives for smoother transitions between deforming and rigid parts. Turn this on if you see abrupt stretches and/or angles between rigid and non-rigid parts.

Soften Distance Metric

When Enable stretch softening is on, how to measure the distance between non-rigid and rigid points:

Edge

Find the shortest path along edges between two points. This is faster but less accurate than the “Surface” method.

Surface

Compute (approximately) the shortest distance across the model surface. This is slower but more accurate than the “Edge” method.

Soften Radius

When Enable stretch softening is on, the node smooths non-rigid points within this distance (in world space, using the Soften distance metric) of a rigid point to make the transition less abrupt. The effect falls off with the distance to the nearest rigid point, down to zero at the exact soften radius. You can shape the falloff using the falloff ramp below.

Enable Falloff Ramp

Turn this on to control the shape of the falloff within the Soften radius with a ramp.

Soften Falloff

When Enable falloff ramp is on, this is the shape of the falloff, where the horizontal axis is the distance from the rigid part (from zero distance on the left to the full falloff radius on the right), and the vertical axis is the amount of smoothing.

Allow Rigid Geometry to Stretch

When this is on, rigid geometry can stretch along the Forward direction by the same amount as non-rigid geometry.

Enable Rigidity Mask

Turn this on to specify how rigid each rigid component is.

Base Rigidity Mask

This is the base rigidity of rigid points. You can use an attribute on the piece geometry to scale this value. For example, 1.0 is fully rigid, 0.0 is not rigid, 0.5 is halfway. If you just want all rigid points to have the same amount of rigidity, you can set this without specifying an attribute.

Scale by Attribute

Set the popup menu next to Base Rigidity Mask to Scale by Attribute to scale the rigidity of each point in the first input using the value of a point attribute.

Geometry Attribute

When the popup menu next to Base scale factor is set to Scale by attribute, this is the name of a point attribute on the model to scale by.

Alignment

Geometry Alignment

By default, Houdini expects instance geometry to be modeled so that the “up” direction (for example, from the root of a tree to the top) is along the +Y axis, and the “forward” direction (for example, from the back of a car to the front) is along the +Z axis. You can modify this using the parameters below.

Forward Direction

The vector in world space which gets mapped onto the deformation curve.

X/Y/Z

The respective positive world axes.

Custom

The vector given by the Forward Axis Vector.

Forward Axis Vector

If Forward Direction is set to Custom, this is the direction of the axis vector.

Up Direction

The vector in world space which gets aligned with the curve up vector.

X/Y/Z

The respective positive world axes.

Custom

The vector given by the Up Axis Vector.

Up Axis Vector

If Up Direction is set to Custom, this is the direction of the up vector.

Center Geometry on Curve

Whether to align the center of the bounding box of the repeated geometry with the curve.

Bounds Group

The group of primitives to use to find the bounding box of each piece of geometry. The bounding box of each piece is used to determine how much space the piece takes up on the curve.

Piece Spacing

The spacing between pieces. A positive Piece Spacing will add space between each piece on the curve. A negative Piece Spacing will make pieces overlap.

Piece Rotation

Each successive piece will be rotated by an additional Piece Rotation degrees from the previous pieces rotation.

Curve Alignment

The curve alignment allows specifying how the curve’s up attribute should be computed.

Output Repeated Geometry To Be Deformed After

When enabled, the geometry will not be deformed along the provided curve, and will instead be placed in a straight line along the Z axis. This geometry can then be provided to a Path Deform SOP along with the input curve to be deformed accordingly.

Curve Up Control

This controls the method that the curve uses to set the up vector along the curve. By default the up vectors will be modified slightly to be perpendicular to the curve tangent.

Curve Normal

Sets the start up vector to be the normal of the plane that the curve would define if planar.

X/Y/Z

Sets the start up vector to be in the X/Y/Z direction.

Custom

Sets the start up vector to be the vector defined in Curve Up Vector.

Curve Up Vector

The vector that the start up vector for the curve will be set to when Curve Up Control is set to Custom.

Orient Using Point Attributes

When enabled, any curve point attributes P, N, up, orient, rot, trans, pivot, pscale, scale, and transform can be used to specify how the geometry is deformed around specific points on the curve.

Attributes

Attributes to Transform

A space-separated list of point attribute names/patterns for attributes that should be transformed when the point is transformed by this node. The node uses each attribute’s type info to transform it properly (as point, vector, or normal data).

Recompute Affected Normals

Recomputes normals of polygons that have both transformed and untransformed points. If you're transforming the full geometry or all connected components, this doesn’t matter. It only matters if you deform part but not all of a connected piece.

This does nothing if P is not transformed (see Attributes to Transform above).

Preserve Normal Length

When this is on, the deformation does not change the scale of the geometry normals.

Output Position Along Curve

When this is on, the node adds a point attribute to the output geometry, containing the corresponding position along the curve from 0.0 (curve start) to 1.0 (curve end).

Position Along Curve Attribute

When the checkbox is on, add a point attribute with this name to the output geometry, containing the corresponding position along the curve from 0.0 (curve start) to 1.0 (curve end).

Output Index Along Curve

When this is on, the node adds a point attribute to the output geometry, containing the corresponding “item number” of the corresponding piece along the curve.

Index Along Curve Attribute

When the checkbox is on, add a point attribute with this name to the output geometry, containing the corresponding “item number” of the corresponding piece along the curve.

Output Curve Number

When this is on, the node adds a point attribute to the output geometry, containing the corresponding “curve number” that the point was mapped along.

Curve Number Attribute

When the checkbox is on, add a point attribute with this name to the output geometry, containing the corresponding “curve number” that the point was mapped along.

Examples

ChainBasic Example for Chain geometry node

This example creates a simple chain and train track using the Chain SOP.

See also

Geometry nodes