Add SOP
Summary[edit]
The Add SOP can both create new Points and Polygons on its own, or it can be used to add Points and Polygons to an existing input.
If an input is specified, this SOP adds points and polygons to it as specified below. If no input is specified, then it generates the points and polygons below as a new entity. It can read points and vertices from DATs. See also DAT to SOP.
Parameters  Points Page
Points DAT pointdat
 Path to a Table DAT containing point data. By default, x, y, z, and w can be defined in the first 4 columns of the table using unnamed columns.
If the Named Attributes
parameter below is turned on, the following attributes can be defined in the Points Table DAT using named columns:
P(0) P(1) P(2) P(3)
N(0) N(1) N(2)
Cd(0) Cd(1) Cd(2) Cd(3)
uv(0) uv(1) uv(2)
Any other columns are added as singlefloat attributes.
NOTE: Turn off Compute Normals
on the Polygon parameter page when supplying N(0) N(1) N(2)
in the Points Table DAT.
Named Attributes namedattribs
 Allows extra attributes to be defined in the Point Table DAT above.
Delete Geometry, Keep Points keep
 Use this option to remove any unused points. When checked, existing geometry in the input are discarded, but the polygons created by this SOP are kept, as well as any points in the input.
Add Points addpts
 When On you can add individual points with position and weight of your choosing by using the parameters below.
Position 0 pos0
 ⊞  The three input fields represent the X, Y and Z coordinates of the point. These values can be constants (numbers) or variables. Below are three examples:
0.2 0.42 1.3
0.2 op('xform1').par.tx 1.36
# read the sixth point (first point is 0) from the SOP, grid1
op('grid1').points[5].x op('grid1').points[5].y op('grid1').points[5].z
 Position 0
pos0x

 Position 0
pos0y

 Position 0
pos0z

Weight 0 weight0
 The spline weight of the point. If the point is later used to create a spline (nurbs or Bezier) primitive, the weight will influence the shape of the primitive and may cause that primitive to become rational. Polygons and metaballs are not affected by this weight.
Parameters  Polygons Page
Method method
 ⊞  Specify to create polygons from the points by using a Group method or Pattern Method.
 By Group
group
 Create as many polygons as determined by the group field and by the grouping / skipping rules.
 By Pattern
pattern
 Specify the points to use to create polygons using the parameters Polygon Table or Polygon 0 below.
Group group
 Subset of points to be connected.
Add add
 ⊞  Optionally join subgroups of points.
 All Points
all
 Adds all points just as if you added them manually in the Points page.
 Groups of N Points
group
 Adds only the number of points specified.
 Skip Every Nth Point
skip
 Adds points, buts skips every Nth one.
 Each Group Separately
sep
 Creates separate polygons for each group specified in theGroup
parameter. For example, if you have a Group SOP creating a group called group1 and using theCreate Boundary Groups
option, you can connect this to an Add SOP and enter group1__* in theGroup
parameter. IfEach Group Separately
is chosen, polygons will be created for each boundary on the surface.
Tip: The Each Group Separately option is useful when pasting surfaces. Boundary groups can be created for the boundaries of two adjacent surfaces, and then the PolyLoft SOP (using the Points option) can be used to stitch these surfaces together.
N inc
 Increment / skip amount to use for adding points.
Closed closedall
 Closes the generated polygons.
Polygons Table polydat
 Path to a Table DAT containing polygon data. Accepts rows of polygons specified by point number in the first column. The second column indicates if the polygons are closed (1) or open (0).
Polygon 0 prim0
 Create a fixed number of polygons by specifying a point pattern for each polygon. Enter connection lists here to add polygons. These consist of a list of point numbers to define the order in which the points are to be connected. The form is: {from}{to}[:{every}][,{of}].
Examples of Valid Connection Lists:
1 2 3 4
 Makes a polygon by connecting point numbers 1,2,3,4.1 315 16 8
 All points from 315 are included.1234 820410 235409
 Points from 1820 are included, in the specified order.015:2
 Every other point from 0 to 15 is included.015:2,3
 Every 2 of 3 points are included (i.e. 0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15).!4
 Every point except 4 is included.!100200
 Every point <100 and >200 is included.*
 Include all points.90
 The first ten points are included in reverse order.!90
 All but the first ten points are included in reverse order.
Closed 0 closed0
 To create a closed polygon, check the Closed button.
Parameters  Post Page
Remove Unused Points remove
 Keep only the connected points, and discard unused points.
Compute Normals normals
 Creates normals on the geometry.
Uses
Used in conjunction with a point expression, the Add SOP can be useful for extracting a specific point from another SOP. For example, to extract the X, Y and Z value of the fifth point, from a Grid SOP in geo1:
op('geo1/grid1').points[5].x
op('geo1/grid1').points[5].y
op('geo1/grid1').points[5].z
Points added in this way are appended to the end of the point list if a Source is specified. Middlemouse click on the SOP node to find out how many points there are. For example, if you have added two points and there are 347 points (from 0 to 346), you have added the last two point numbers: 345 and 346.
Operator Inputs
 Input 0 
TouchDesigner Build:
SOPs 

• • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • 