Normal POP
Summary
The Normal POP lets you create “normal vectors” and “tangent vectors” based on the incoming set of triangles or quads.
You can create normals or tangents as point attributes, vertex attributes or primitive attributes.
You can choose from several strategies for computing normals and tangents, based on each point being a member of several primitives.
You usually use the P position attribute to compute the normals and tangents, but you can use any vec3 attribute.
The results are placed in the N and (optionally) T attributes, but you can name the new attribute anything.
If the incoming geometry already has normal or tangent vectors, you can choose to do nothing, re-compute values, error, or delete the attributes.
Because this runs on the GPU that needs pre-determined sizes, you need to set the Max Number of Primitives per Point, the default 6 being typically sufficient.
Parameters - Normals Page
nml - ⊞ - Choose what to do regarding normals.
- No Action
noaction-
- Always Compute
alwayscompute-
- Compute if it doesn't exist
computeifnone-
- Remove
remove-
inputposattrn - Input Position attribute used to calculate normals.
attrclass - ⊞ - Makes the POP operate on point attributes, vertex attributes or primitive attributes where applicable.
- Point
point-
- Vertex
vertex-
- Primitive
primitive-
nmlweighting - ⊞ - For point normals, choose how to weight the normals of the primitives the point is a part of.
- Average
average-
- Angle Weighted
angleWeighted-
- Area Weighted
areaweighted-
compnmltech - ⊞ - Specify which technique to use to calculate point normals.
- Atomic Float (if supported)
atomicfloat-
- Atomic Comp Swap
atomiccompswap-
- Loop over Primitives Per Point
loopprims-
maxprimsperpoint - Used to allocate temporary storage with the "Loop over Primitives Per Point" method, it should be set to the maximum number of primitives a point can be a part of in the input geometry.
angle - For vertex normals, the threshold angle between faces above which the shared edge vertices don't share normals.
outputattrscopen - ⊞ - Output attribute scope for the normal.
- P
P-
- N
N-
- Color
Color-
- Color.i012
Color.i012-
- Tex
Tex-
- PointScale
PointScale-
- LineWidth
LineWidth-
overrideautoattrn - When on, overrides the kind of attribute automatically created based on the POP input and parameters. Allows to specify manually the type and number of components of the new attribute.
attrtypen - ⊞ - The normal output attribute's data type, default float.
- float
float-
- double
double-
- int
int-
- uint
uint-
- dir
dir-
- dbl dir
ddir-
attrnumcompsn - ⊞ - The number of components in the new custom attribute.
- 1
1-
- 2
2-
- 3
3-
- 4
4-
attrdefaultvaln - ⊞ - Default values of the output attribute components if they cannot be computed.
- Default Value
attrdefaultvaln0-
- Default Value
attrdefaultvaln1-
- Default Value
attrdefaultvaln2-
- Default Value
attrdefaultvaln3-
Parameters - Tangents Page
tang - ⊞ - Sets the tangent operation.
- No Action
noaction-
- Always Compute
alwayscompute-
- Compute if it doesn't exist
computeifnone-
- Remove
remove-
inputposattrt - Input Position attribute used to calculate tangents.
inputnormalattr - Input normal attribute used to calculate tangents.
inputtexattrib - Input texture coordinate attribute used to calculate tangents.
comptangtech - ⊞ - Specify which technique to use to calculate tangents.
- Atomic Float (if supported)
atomicfloat-
- Atomic Comp Swap
atomiccompswap-
outputattrscopet - ⊞ - Output attribute scope for the tangent.
- P
P-
- N
N-
- Color
Color-
- Color.rgb
Color.rgb-
- Tex
Tex-
- PointScale
PointScale-
- LineWidth
LineWidth-
overrideautoattrt - When on, overrides the kind of attribute automatically created based on the POP input and parameters. Allows to specify manually the type and number of components of the new attribute.
attrtypet - ⊞ - The tangent attribute's data type, default float.
- float
float-
- double
double-
- int
int-
- uint
uint-
- Color
color-
- Color (double)
dcolor-
- Direction
dir-
- Direction (double)
ddir-
attrnumcompst - ⊞ - The number of components in the new custom attribute.
- 1
1-
- 2
2-
- 3
3-
- 4
4-
attrdefaultvalt - ⊞ - Default values of the output attribute components if they cannot be computed.
- Default Value
attrdefaultvalt0-
- Default Value
attrdefaultvalt1-
- Default Value
attrdefaultvalt2-
- Default Value
attrdefaultvalt3-
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 Normal 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: