Vertex
surface node
Manually adds or edits attributes on vertices (rather than on points).
This node is similar to the Point SOP. It supports two inputs, and will inherit the first input source by default.
There are currently three vertex attributes supported: Diffuse Color, Alpha and Texture Coordinates.
When the attribute is defined, it can only occur on either points or vertices, but not both. Thus, if the input geometry has a point attribute for diffuse color, the attribute will automatically be “elevated” to be a vertex attribute (if diffuse colors are added in the Vertex op).
The op processes every vertex of every primitive. For each vertex processed, there are variables which allow you to know the:
a) Vertex number of the primitive being processed b) The number of vertices in the primitive being processed c) The point which is referenced by the vertex d) The primitive which contains the vertex e) The total number of points f) The total number of primitives
There are also local variables to find out the values of some point attributes (i.e. position, normal, if they exist), in addition to vertex attributes. See Locals section below.
Example
Example of manipulation:
vertex/cr = $BBX vertex/cg = $CG2 vertex/cb = $CB - $CB2
Parameters
|
Group |
Subset of primitives whose vertices are to be affected. |
|
Color |
Diffuse color (RGB) |
|
Alpha |
Transparency value |
|
Texture |
Texture coordinates |
|
Crease |
Crease weight for polygonal subdivision Use the Primitive operation to create a crease of constant weight for the entire primitive. |
Local variables
|
PT, NPT |
Point number and total number of points. |
|
PR, NPR |
Primitive number & total number of primitives. |
|
VTX, NVTX |
Vertex number & total number of vertices. |
|
CEX, CEY, CEZ |
Centroid of the geometry. |
|
BBX, BBY, BBZ |
Relative position of point within bounding box. Values are mapped between 0 and 1. |
|
TX, TY, TZ |
Point position. |
|
NX, NY, NZ |
Point normal directions. |
|
MAPU, MAPV, MAPW |
Point or vertex texture coordinates. |
|
CR, CG, CB |
Diffuse point or vertex color. |
|
CA |
Point or vertex alpha value. |
|
CREASE |
Point or vertex crease weight value. |
|
PT2, NPT2, etc |
Append 2 for the second source. |
Usages in other examples
| Example name | Example for | |
|---|---|---|
| CreaseBasic |
Crease surface node |