Resample SOP

From Derivative
Jump to navigation Jump to search


The Resample SOP will resample one or more primitives into even length segments. It only applies to polygons so when presented with a NURBS or Bzier curve input, it first converts it to polygons using the Level of Detail parameter.


Parameters - Page

Group group - Allows you to specify which primitives or group of primitives to resample. Accepts patterns, as described in Pattern Matching.

Level of Detail lod - If the geometry you are performing this operation on is made up of something other than polygons (e.g. a NURBS circle), this parameter determines how detailed the conversion to polygons will be. The higher the level of detail, the more precise the resampling process.

Resample by Polygon Edge edge - This toggle allows the resampling to be done on a per-edge basis of the polygon rather than on the polygon as a whole. This means that corners will be preserved in the resampling. When this parameter is enabled, the Measure Method will be disabled. If the Segment Length is specified, only edges which are longer than the specified length will be subdivided. Each edge will be evenly subdivided so that the maximum length of each subdivision is less than or equal to the length specified.

If the Maximum Segments is chosen, the edges will not be split into more segments than are specified. If the length parameter is turned off, then each edge will be split into the specified number of segments.

Method method - -

  • Even Length Segments dist - Even-length measures are made along the original input
  • Even X Segments x - * Even X / Y / Z Segments
  • Even Y Segments y -
  • Even Z Segments z -

Measure measure - -

  • Along Arc arc - This method of measurement divides the curve itself into even length segments.
  • Along Chord chord - This method creates straight even-length segments between the evaluated points on the primitive. This is faster but not as accurate.


Maximum Segment Length dolength - When this option is enabled, it overrides the value of the Arc/Chord length and allows you to specify your own values for the length of the segments in the resampled geometry. Smaller values produce smoother interpolation.

Length length - This parameter lets you specify the Arc/Chord length for the resampled geometry.

Maximum Segments dosegs - When enabled, allows you to override the maximum number of segments used in the resampled geometry.

Segments segs - Lets you specify the number of segments used when measuring along arc.

When both Maximum Segment Length and Maximum Segments are selected, the resultant polygon is constrained to a fixed length which may be shorter than the original input curve.

When only Maximum Segments is selected, the segments span the full distance of the original input curve.

When neither option is selected, the input curve is merely converted to a polygon.

Maintain Last Vertex last - If selected, the primitive's final CV is included in the resampled polygon, even if the final resulting edge is shorter then the given segment length.


To create a constant length flag with the Resample SOP:

  1. Create a number of horizontal lines using a Grid SOP: Primitive Type: Polygon; Connectivity: Rows; Size: 3, 1
  2. Append a Group SOP: Group: group1; Entity: Points; Number: Enable; Pattern: 0-99:1,10
  3. Append a Spring SOP: Source Group: group1; Forces/Wind: 1, 0, 0; Turbulence: 1, 0, -1
  4. Clip each line to a constant length by appending a Resample SOP: Maximum Segments On; Segments: 15
  5. Appending a Skin SOP whose parameters can stay at the default, and enable the Points display in the Viewport options.
  6. Click Play to view the result. Adjust the view as necessary.
  7. Toggle the display SOP 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.

Operator Inputs

  • Input 0 -

TouchDesigner Build:

Add • Alembic • Align • Arm • Attribute Create • Attribute • Basis • Blend • Bone Group • Boolean • Box • Bridge • Cache • Cap • Capture Region • Capture • Carve • CHOP to • Circle • Clay • Clip • Convert • Copy • CPlusPlus • Creep • Curveclay • Curvesect • DAT to • Deform • Delete • Divide • Extrude • Face Track • Facet • File In • Fillet • Fit • Font • Force • Fractal • Grid • Group • Hole • Import Select • In • Introduction To s Vid • Inverse Curve • Iso Surface • Join • Joint • Kinect • Lattice • Limit • Line • Line Thick • LOD • LSystem • Magnet • Material • Merge • Metaball • Model • Noise • Null • Object Merge • Oculus Rift • OpenVR • Out • Particle • Point • Polyloft • Polypatch • Polyreduce • Polyspline • Polystitch • Primitive • Profile • Project • Rails • Raster • Ray • Rectangle • Refine • Resample • Revolve • Script • Select • Sequence Blend • Skin • Sort • Sphere • Spring • Sprinkle • Sprite • Stitch • Subdivide • Superquad • Surfsect • Sweep • Switch • Text • Texture • Torus • Trace • Trail • Transform • Trim • Tristrip • Tube • Twist • Vertex • Wireframe • ZED