Resample
surface node
Resamples one or more curves or surfaces into even length segments.
See also: Convert
The Resample op only applies to polygons so when presented with a NURBS or Bezier curve input, it first converts it to a polygon using the Level of Detail parameter before continuing.
Inputs / Geometry Types
The Resample op works in conjunction with any primitive type that can be converted to polygons. This includes Bezier curves, NURBS curves, circles, and polygons.
Uses / Works In Relation With
Example
To create a constant length flag with the Resample SOP:
-
Create a number of horizontal lines using a Grid SOP: Primitive Type: Polygon; Connectivity: Rows; Size: 3, 1
-
Append a Group SOP: Group: group1; Entity: Points; Number: Enable; Pattern: 0-99:1,10
-
Append a Spring SOP: Source Group: group1; Forces/Wind: 1, 0, 0; Turbulence: 1, 0, -1
-
Clip each line to a constant length by appending a Resample op: Maximum Segments: On; Segments: 15
-
Appending a Skin SOP whose parameters can stay at the default, and enable the Points display in the Viewport options.
-
Click Play to view the result. Adjust the view as necessary.
-
Toggle the display op back and forth between the Spring SOP and the Skin SOP. Notice how the lines are stretched and deformed from their original length by the forces acting on them in the Spring SOP. After resampling, they are a constant length.
Parameters
|
Group |
Group of curves of surfaces to resample. |
||||||||
|
Level of Detail |
Level of detail at which to convert non-polygonal inputs. |
||||||||
|
Resample by polygon edge |
Each edge of the polygon will be resampled independently. This option will preserve corners in the input. |
||||||||
|
Method |
|
||||||||
|
Measure |
|
||||||||
|
Maximum Segment Length |
Specify maximum length of resulting edges. |
||||||||
|
Length |
The maximum segment length of resulting edges. |
||||||||
|
Maximum Segments |
Specify the maximum number of edges. |
||||||||
|
Segments |
The maximum number of edges. |
||||||||
|
Maintain Last Vertex |
Include final CV of original in resampled polygon. |
Example files
ResampleLines
$HFS/houdini/help/examples/nodes/sop/resample/ResampleLines.cmd
This example demonstrates the use of the Resample SOP on three types of curves. (Polygon, NURBS and Bezier)
The Resample SOP rebuilds the curve by converting it into a series of Polygon Line Segments.
The curve may be rebuilt “Along Arc” or “Along Chord”. “Along Arc” utilizes the Hull information as a basis of reconstruction, and can be defined by a Maximum Segment Length and/or Maximum Segment number. “Along Chord” can only be defined by Maximum Segment Length.
Resampling the curve based on Maximum Segment number divides the line into segments of equal, but unspecified length, spanning from start to endpoint. Line detail is directly proportional to the Segment number.
Resampling the curve based on Maximum Segment Length will rebuild the entire line into equal length segments except the last segment. If the Maintain Last Vertex option is on, the last segment will be less than or equal to the Maximum Segment Length value, depending on its distance to the endpoint. With the option off, the endpoint is disregarded and the line is created out of equal lengths.
Turn on Points in the display to see how the Resample SOP resamples line segments.
Usages in other examples
| Example name | Example for | |
|---|---|---|
| FurBallWorkflow |
Fur surface node |
|
| PrimCenter |
Primitive surface node |
|
| SweepCurve |
Sweep surface node |
|
| CreepParticleTubeA |
Creep surface node |
|
| CreepBlob |
Creep surface node |
|
| FlockOnPath |
Follow particle node |
|
| AttractToCurvePoints |
Attractor particle node |
|
| PopFlow |
Particle Fluid Solver dynamics node |
|
| PopFlow |
Particle Fluid Object dynamics node |