Line Metrics POP
Summary
You can add metrics attributes to Line Strips. They can be created as point attribute or the vertex attributes.
This gives good information about the points and the context they are in. For each point you can get the direction to the next and previous points, or the distance back to the start of the line strip, or the line strip number it is in… things useful for Math POPs or Lookup POPs.
A convenience of the Line Metrics POP is to give nice values to awkward situations like co-incident points (two or more consecutive points in the same location), especially direction vectors. That’s what the Continuous Direction parameter does. It would work with Direction to Next, Direction to Previous, and do nice things to the Tangent vectors by keeping them in line.
Parameters - Neighbor Page
attrclass - ⊞ - Makes the POP operate on point attributes, vertex attributes or primitive attributes where applicable.
- Point
point-
- Vertex
vertex-
dispnext - ⊞ - Whether to output an attribute with the displacement to the next vertex in the line strip.
- Displacement to Next
dispnext-
- Displacement to Next Attrib Name
dispnextname- Specifies the attribute scope used to output the Displacement to Next attribute
dispprev - ⊞ - Whether to output an attribute with the displacement to the previous vertex in the line strip.
- Displacement to Previous
dispprev-
- Displacement to Previous Attrib Name
dispprevname- Specifies the attribute scope used to output the Displacement to Previous attribute
distnext - ⊞ - Whether to output an attribute with the distance to the next vertex in the line strip.
- Distance to Next
distnext-
- Distance to Next Attrib Name
distnextname- Specifies the attribute scope used to output the Distance to Next attribute
distprev - ⊞ - Whether to output an attribute with the distance to the previous vertex in the line strip.
- Distance to Previous
distprev-
- Distance to Previous Attrib Name
distprevname- Specifies the attribute scope used to output the Distance to Previous attribute
dirnext - ⊞ - Whether to output an attribute with the direction to the next vertex in the line strip.
- Direction to Next
dirnext-
- Direction to Next Attrib Name
dirnextname- Specifies the attribute scope used to output the Direction to Next attribute
dirprev - ⊞ - Whether to output an attribute with the direction to the previous vertex in the line strip.
- Direction to Previous
dirprev-
- Direction to Previous Attrib Name
dirprevname- Specifies the attribute scope used to output the Direction to Previous attribute
tangent - ⊞ - Output a tangent attribute for each point.
- Tangent
tangent-
- Tangent Attrib Name
tangentname- Attribute scope for the tangent.
curvature - ⊞ - Whether to output an attribute containing the curvature.
- Curvature
curvature-
- Curvature Attrib Name
curvaturename- Sets the attribute scope when computing curvature
angleperdist - ⊞ - Whether to output Angle per Distance.
- Angle per Distance
angleperdist-
- Angle per Distance Attrib Name
angleperdistname- Attribute Name for Angle per Distance.
continuousdir - Enable returning continuous directions for co-incident points
maxneighbors - When computing Direction vector, how far to look when points are in same position as next or previous points.
Parameters - Line Strip Page
diststart - ⊞ - Whether to output an attribute with the distance from the start of the line strip.
- Distance from Start
diststart-
- Distance from Start Attrib Name
diststartname- Specifies the attribute scope used to output the Distance from Start attribute
distend - ⊞ - Whether to output an attribute with the distance from the end of the line strip.
- Distance from End
distend-
- Distance from End Attrib Name
distendname- Specifies the attribute scope used to output the Distance from End attribute
diststartnorm - ⊞ - Whether to output an attribute with the normalized distance from the start of the line strip.
- Distance from Start Normalized
diststartnorm-
- Distance from Start Normalized Attrib Name
diststartnormname- Specifies the attribute scope used to output the Distance from Start Normalized attribute
distendnorm - ⊞ - Whether to output an attribute with the normalized distance from the end of the line strip.
- Distance from End Normalized
distendnorm-
- Distance from End Normalized Attrib Name
distendnormname- Specifies the attribute scope used to output the Distance from End Normalized attribute
primlen - ⊞ - Enable addition of line strip length attribute.
- Line Strip Length
primlen-
- Line Strip Length Attrib Name
primlenname- Name of the attribute for the line strip length.
primlenprim - When on, the attribute created for the length of the line strip is a primitive attribute.
Parameters - Index Page
pointindex - ⊞ - Output the vertex index for each point, assuming unique.
- Vert Index in Line Strip
pointindex-
- Vert Index Attrib Name
pointindexname- The name of the vertex index attribute.
numverts - ⊞ - Outputs attribute for number of vertices in current point's like strip.
- Number of Verts in Line Strip
numverts-
- Number of Verts Attrib Name
numvertsname- Name for the Number of Verts in Line Strip attribute.
vertindexnorm - ⊞ - Output the vertex index normalized to 0-1 for each point, assuming unique.
- Vert Index in Line Strip Normalized
vertindexnorm-
- Vert Index Normalized Attrib Name
vertindexnormname- The name of the vertex index normalized attribute.
linestripindex - ⊞ - Enable addition of line strip index attribute.
- Line Strip Index
linestripindex-
- Line Strip Index Attrib Name
linestripindexname- Attribute name for the index of the line strip.
lsindexnorm - ⊞ - Enable addition of normalized line strip index attribute.
- Line Strip Index Normalized
lsindexnorm-
- Line Strip Index Normalized Attrib Name
lsindexnormname- Attribute name for the normalized index of the line strip.
Parameters - Common Page
bypass - Pass through the first input to the output unchanged.
freeextragpumem - Free memory that has accumulated when output memory has grown and shrunk.
delinputattrs - Only output which attributes you specify in this POP - helps isolate attributes into a separate branch.
Operator Inputs
- Input 0: -
Info CHOP Channels
Extra Information for the Line Metrics POP can be accessed via an Info CHOP.
Common POP Info Channels
Common Operator Info Channels
- total_cooks - Number of times the operator has cooked since the process started.
- cook_time - Duration of the last cook in milliseconds.
- cook_frame - Frame number when this operator was last cooked relative to the component timeline.
- cook_abs_frame - Frame number when this operator was last cooked relative to the absolute time.
- cook_start_time - Time in milliseconds at which the operator started cooking in the frame it was cooked.
- cook_end_time - Time in milliseconds at which the operator finished cooking in the frame it was cooked.
- cooked_this_frame - 1 if operator was cooked this frame.
- warnings - Number of warnings in this operator if any.
- errors - Number of errors in this operator if any.
TouchDesigner Build: