Difference between revisions of "Vertex SOP"

From TouchDesigner Documentation
Jump to: navigation, search
(Vertex SOP Auto Create)
 
 
(26 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
+
{{Summary
{{Summary|OPfamily=SOP|OPtype=vertex|OPlabel=Vertex|OPlicense=Non-Commercial|OPclass=vertexSOP_Class|OPfilter=True
+
|short=The Vertex SOP allows you to edit/create attributes on a per-vertex (rather than per-point) basis.
 
+
|opClass=vertexSOP_Class
|short=
+
|opFilter=True
 
+
|long=The Vertex SOP allows you to edit/create attributes on a per-vertex (rather than per-point) basis. It is similar to the [[Point SOP]] in this respect. It supports two inputs, and will inherit the first input source by default.  If the second input have less primitives than the first input, it will cycle through the primitives and match the vertices.  If the primitive in the first input has more vertices than the matching primitive in the second input, the extra vertices are ignored.
|long=
+
 
+
There are currently three vertex attributes supported:
}}
+
 +
* Diffuse Color
 +
* Alpha
 +
* 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 SOP).
 +
 +
The SOP processes every vertex of every primitive. For each vertex processed, there are variables which allow you to know the:
 +
 +
* Vertex number of the primitive being processed
 +
* The number of vertices in the primitive being processed
 +
* The point which is referenced by the vertex
 +
* The primitive which contains the vertex
 +
* The total number of points
 +
* 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.  To access the attributes of the second input source, append a 2 to the variable.
 +
|opLicense=Non-Commercial
 +
|opFamily=SOP
 +
|opType=vertex
 +
|opLabel=Vertex
 +
}}
 +
{{ParameterPage
 +
|opFamily=SOP
 +
|pageName=Vertex
 +
|pageSummary=
 +
|items={{Parameter
 +
|opFamily=SOP
 +
|opType=vertexSOP
 +
|parLabel=Group
 +
|parName=group
 +
|parType=StrMenu
 +
|parReadOnly=
 +
|parOrder=0
 +
|parSummary=If there are input groups, specifying a group name in this field will cause this <code>SOP</code> to act only upon the group specified. Accepts patterns, as described in [[Pattern Matching]].
 +
|parItems=
 +
}}
 +
{{Parameter
 +
|opFamily=SOP
 +
|opType=vertexSOP
 +
|parLabel=Color
 +
|parName=doclr
 +
|parType=Menu
 +
|parReadOnly=
 +
|parOrder=1
 +
|parSummary=Select between keeping the color, adding new color, or using no color for vertex color attributes from incoming geometry.
 +
|parItems={{ParameterItem
 +
|opFamily=SOP
 +
|parName=doclr
 +
|itemLabel=Keep Color
 +
|itemName=off
 +
|itemSummary=
 +
}}<!--
 +
-->{{ParameterItem
 +
|opFamily=SOP
 +
|parName=doclr
 +
|itemLabel=Add Color
 +
|itemName=on
 +
|itemSummary=
 +
}}<!--
 +
-->{{ParameterItem
 +
|opFamily=SOP
 +
|parName=doclr
 +
|itemLabel=No Color
 +
|itemName=remove
 +
|itemSummary=
 +
}}
 +
}}
 +
{{Parameter
 +
|opFamily=SOP
 +
|opType=vertexSOP
 +
|parLabel=Color
 +
|parName=diff
 +
|parType=RGB
 +
|parReadOnly=
 +
|parOrder=2
 +
|parSummary=If you select 'Add Color' from the menu above, Cd color vertex attributes will be added/modified in the SOP. Enter expressions below to control the values of the point colors. The attributes to modify are: <code>me.inputColor[0]</code> for red, <code>me.inputColor[1]</code> for green, <code>me.inputColor[2]</code> for blue, and <code>me.inputColor[3]</code> for alpha. If you select 'No Color' from the menu above, the Cd color vertex attribute will be removed from the SOP.
 +
|parItems={{ParameterItem
 +
|opFamily=SOP
 +
|parName=diff
 +
|itemLabel=Color
 +
|itemName=diffr
 +
|itemSummary=
 +
}}<!--
 +
-->{{ParameterItem
 +
|opFamily=SOP
 +
|parName=diff
 +
|itemLabel=Color
 +
|itemName=diffg
 +
|itemSummary=
 +
}}<!--
 +
-->{{ParameterItem
 +
|opFamily=SOP
 +
|parName=diff
 +
|itemLabel=Color
 +
|itemName=diffb
 +
|itemSummary=
 +
}}
 +
}}
 +
{{Parameter
 +
|opFamily=SOP
 +
|opType=vertexSOP
 +
|parLabel=Alpha
 +
|parName=alpha
 +
|parType=Float
 +
|parReadOnly=
 +
|parOrder=3
 +
|parSummary=Control the alpha attribute in the same manner as the rgb colors above. Alpha is Cd[3] and comes from input via <code>me.inputColor[3]</code> 
 +
|parItems=
 +
}}
 +
{{Parameter
 +
|opFamily=SOP
 +
|opType=vertexSOP
 +
|parLabel=Texture
 +
|parName=douvw
 +
|parType=Menu
 +
|parReadOnly=
 +
|parOrder=4
 +
|parSummary=Select between keeping the texture coordinates, adding new texture coordinates, or using no texture coordinates for the vertex texture attributes from incoming geometry. 
 +
|parItems={{ParameterItem
 +
|opFamily=SOP
 +
|parName=douvw
 +
|itemLabel=Keep Texture
 +
|itemName=off
 +
|itemSummary=
 +
}}<!--
 +
-->{{ParameterItem
 +
|opFamily=SOP
 +
|parName=douvw
 +
|itemLabel=Add Texture
 +
|itemName=on
 +
|itemSummary=
 +
}}<!--
 +
-->{{ParameterItem
 +
|opFamily=SOP
 +
|parName=douvw
 +
|itemLabel=No Texture
 +
|itemName=remove
 +
|itemSummary=
 +
}}
 +
}}
 +
{{Parameter
 +
|opFamily=SOP
 +
|opType=vertexSOP
 +
|parLabel=Texture
 +
|parName=map
 +
|parType=UVW
 +
|parReadOnly=
 +
|parOrder=5
 +
|parSummary=If you select 'Add Texture' from the menu above, uv texture coordinate vertex attributes will be added/modified in the SOP. Enter expressions here to control the values of the vertex texture coordinates here. The attributes to modify are: <code>me.inputTexture[0]</code>, <code>me.inputTexture[1]</code> and <code>me.inputTexture[2]</code>. If you select 'No Texture' from the menu above, the uv texture coordinates vertex attribute will be removed from the SOP.
 +
|parItems={{ParameterItem
 +
|opFamily=SOP
 +
|parName=map
 +
|itemLabel=Texture
 +
|itemName=mapu
 +
|itemSummary=
 +
}}<!--
 +
-->{{ParameterItem
 +
|opFamily=SOP
 +
|parName=map
 +
|itemLabel=Texture
 +
|itemName=mapv
 +
|itemSummary=
 +
}}<!--
 +
-->{{ParameterItem
 +
|opFamily=SOP
 +
|parName=map
 +
|itemLabel=Texture
 +
|itemName=mapw
 +
|itemSummary=
 +
}}
 +
}}
 +
{{Parameter
 +
|opFamily=SOP
 +
|opType=vertexSOP
 +
|parLabel=Crease
 +
|parName=docrease
 +
|parType=Menu
 +
|parReadOnly=
 +
|parOrder=6
 +
|parSummary=Select between keeping the crease, adding new crease, or using no crease for creaseweight attribute from incoming geometry.
 +
 +
The <code>Crease Weight</code> attribute can be used to set individual edge crease weights for sub-division surfaces (see [[Subdivide SOP]] ). This vertex attribute defines the weight for the edge which goes from that vertex to the next vertex in the polygon. For example, with a triangle (which has vertices 0, 1, 2), the attribute for vertex 1 defines the crease weight for the edge (1, 2). The attribute for vertex 2 defines the crease weight for edge (2, 0). The crease weight should be greater than 0. The larger the value for crease weights, the sharper the edge will be when sub-divided.
 
 
{{ParMiniMenu|OPfamily=SOP|OPtype=vertex|Parname=group|Parlabel=Group|Parorder=0
+
Crease attributes can be visualized by passing them into a [[Subdivide SOP]].
 
+
|parItems={{ParameterItem
|Parsummary=
+
|opFamily=SOP
 
+
|parName=docrease
|Paritems=
+
|itemLabel=Keep Crease
 
+
|itemName=off
+
|itemSummary=
 
+
}}<!--
 +
-->{{ParameterItem
 +
|opFamily=SOP
 +
|parName=docrease
 +
|itemLabel=Add Crease
 +
|itemName=on
 +
|itemSummary=
 +
}}<!--
 +
-->{{ParameterItem
 +
|opFamily=SOP
 +
|parName=docrease
 +
|itemLabel=No Crease
 +
|itemName=remove
 +
|itemSummary=
 +
}}
 
}}
 
}}
{{ParMenu|OPfamily=SOP|OPtype=vertex|Parname=doclr|Parlabel=Color|Parorder=1
+
{{Parameter
 
+
|opFamily=SOP
|Parsummary=
+
|opType=vertexSOP
 
+
|parLabel=Crease
|Paritems=
+
|parName=crease
 
+
|parType=Float
+
|parReadOnly=
 
+
|parOrder=7
 +
|parSummary=If you select 'Add Crease' from the menu above, enter expressions here to control the values of the creaseweights here. The attribute to modify is: me.inputVertex.creaseWeight[0]. Values for the weight of the vertex can range from 0.0001 to infinity. 
 +
|parItems=
 
}}
 
}}
{{ParRGB|OPfamily=SOP|OPtype=vertex|Parname=diff|Parlabel=Color|Parorder=2
 
 
|Parsummary=
 
 
|Paritems=
 
 
 
{{rgbitem|Itemlabel=Red|Itemname=diffr|OPfamily=SOP
 
 
|Itemsummary=
 
 
}}
 
{{rgbitem|Itemlabel=Green|Itemname=diffg|OPfamily=SOP
 
 
|Itemsummary=
 
 
}}
 
{{rgbitem|Itemlabel=Blue|Itemname=diffb|OPfamily=SOP
 
 
|Itemsummary=
 
 
}}
 
 
 
}}
 
}}
{{ParFloat|OPfamily=SOP|OPtype=vertex|Parname=alpha|Parlabel=Alpha|Parorder=3
+
{{ParameterPage
 
+
|opFamily=SOP
|Parsummary=
+
|pageName=Attributes
 
+
|pageSummary=
}}
+
|items={{Parameter
{{ParMenu|OPfamily=SOP|OPtype=vertex|Parname=douvw|Parlabel=Texture|Parorder=4
+
|opFamily=SOP
 
+
|opType=vertexSOP
|Parsummary=
+
|parLabel=Custom Attrib 1
 
+
|parName=custom1
|Paritems=
+
|parType=Str
 
+
|parReadOnly=
+
|parOrder=0
 
+
|parSummary=Creates a custom attribute with this name.
 +
|parItems=
 
}}
 
}}
{{ParFloat|OPfamily=SOP|OPtype=vertex|Parname=map|Parlabel=Texture|Parorder=5
+
{{Parameter
 
+
|opFamily=SOP
|Parsummary=
+
|opType=vertexSOP
 
+
|parLabel=Type
|Paritems=
+
|parName=custom1type
 
+
|parType=Menu
+
|parReadOnly=
{{floatitem|Itemlabel=""|Itemname=mapu|OPfamily=SOP
+
|parOrder=1
 
+
|parSummary=The type of attribute created can be selected from this menu.
|Itemsummary=
+
|parItems={{ParameterItem
 
+
|opFamily=SOP
}}
+
|parName=custom1type
{{floatitem|Itemlabel=""|Itemname=mapv|OPfamily=SOP
+
|itemLabel=float
 
+
|itemName=float
|Itemsummary=
+
|itemSummary=
 
+
}}<!--
}}
+
-->{{ParameterItem
{{floatitem|Itemlabel=""|Itemname=mapw|OPfamily=SOP
+
|opFamily=SOP
 
+
|parName=custom1type
|Itemsummary=
+
|itemLabel=vec2
 
+
|itemName=vec2
}}
+
|itemSummary=
 
+
}}<!--
}}
+
-->{{ParameterItem
{{ParMenu|OPfamily=SOP|OPtype=vertex|Parname=docrease|Parlabel=Crease|Parorder=6
+
|opFamily=SOP
 
+
|parName=custom1type
|Parsummary=
+
|itemLabel=vec3
 
+
|itemName=vec3
|Paritems=
+
|itemSummary=
 
+
}}<!--
+
-->{{ParameterItem
 
+
|opFamily=SOP
 +
|parName=custom1type
 +
|itemLabel=vec4
 +
|itemName=vec4
 +
|itemSummary=
 +
}}<!--
 +
-->{{ParameterItem
 +
|opFamily=SOP
 +
|parName=custom1type
 +
|itemLabel=int
 +
|itemName=int
 +
|itemSummary=
 +
}}<!--
 +
-->{{ParameterItem
 +
|opFamily=SOP
 +
|parName=custom1type
 +
|itemLabel=ivec2
 +
|itemName=ivec2
 +
|itemSummary=
 +
}}<!--
 +
-->{{ParameterItem
 +
|opFamily=SOP
 +
|parName=custom1type
 +
|itemLabel=ivec3
 +
|itemName=ivec3
 +
|itemSummary=
 +
}}<!--
 +
-->{{ParameterItem
 +
|opFamily=SOP
 +
|parName=custom1type
 +
|itemLabel=ivec4
 +
|itemName=ivec4
 +
|itemSummary=
 
}}
 
}}
{{ParFloat|OPfamily=SOP|OPtype=vertex|Parname=crease|Parlabel=Crease|Parorder=7
 
 
|Parsummary=
 
 
}}
 
{{ParString|OPfamily=SOP|OPtype=vertex|Parname=custom1|Parlabel=Custom Attrib|Parorder=8
 
 
|Parsummary=
 
 
 
}}
 
}}
{{ParMenu|OPfamily=SOP|OPtype=vertex|Parname=custom1type|Parlabel=Custom Attrib Type|Parorder=9
+
{{Parameter
 
+
|opFamily=SOP
|Parsummary=
+
|opType=vertexSOP
 
+
|parLabel=Value
|Paritems=
+
|parName=custom1val
 
+
|parType=Float
+
|parReadOnly=
 
+
|parOrder=2
 +
|parSummary=Set the values of the Custom Attrib using these parameters.
 +
|parItems={{ParameterItem
 +
|opFamily=SOP
 +
|parName=custom1val
 +
|itemLabel=Value
 +
|itemName=custom1val1
 +
|itemSummary=
 +
}}<!--
 +
-->{{ParameterItem
 +
|opFamily=SOP
 +
|parName=custom1val
 +
|itemLabel=Value
 +
|itemName=custom1val2
 +
|itemSummary=
 +
}}<!--
 +
-->{{ParameterItem
 +
|opFamily=SOP
 +
|parName=custom1val
 +
|itemLabel=Value
 +
|itemName=custom1val3
 +
|itemSummary=
 +
}}<!--
 +
-->{{ParameterItem
 +
|opFamily=SOP
 +
|parName=custom1val
 +
|itemLabel=Value
 +
|itemName=custom1val4
 +
|itemSummary=
 
}}
 
}}
{{ParFloat|OPfamily=SOP|OPtype=vertex|Parname=custom1val|Parlabel=Value|Parorder=10
 
 
|Parsummary=
 
 
|Paritems=
 
 
 
{{floatitem|Itemlabel=""|Itemname=custom1val1|OPfamily=SOP
 
 
|Itemsummary=
 
 
}}
 
{{floatitem|Itemlabel=""|Itemname=custom1val2|OPfamily=SOP
 
 
|Itemsummary=
 
 
}}
 
{{floatitem|Itemlabel=""|Itemname=custom1val3|OPfamily=SOP
 
 
|Itemsummary=
 
 
}}
 
{{floatitem|Itemlabel=""|Itemname=custom1val4|OPfamily=SOP
 
 
|Itemsummary=
 
 
}}
 
 
}}
 
{{ParString|OPfamily=SOP|OPtype=vertex|Parname=custom2|Parlabel=Custom Attrib|Parorder=11
 
 
|Parsummary=
 
 
 
}}
 
}}
{{ParMenu|OPfamily=SOP|OPtype=vertex|Parname=custom2type|Parlabel=Custom Attrib Type|Parorder=12
 
 
|Parsummary=
 
 
|Paritems=
 
 
 
 
 
}}
 
}}
{{ParFloat|OPfamily=SOP|OPtype=vertex|Parname=custom2val|Parlabel=Value|Parorder=13
+
{{OPSection
 
+
|sectionName=Examples
|Parsummary=
+
|sectionSummary=
 
+
|items=
|Paritems=
+
    <!--
 
+
    {{OPSubSection
+
|opFamily=SOP
{{floatitem|Itemlabel=""|Itemname=custom2val1|OPfamily=SOP
+
|sectionName=Manipulation
 
+
|sectionSummary=<syntaxhighlight lang=python>vertex/cr = $BBX
|Itemsummary=
+
vertex/cg = $CG2
 
+
vertex/cb = $CB - $CB2</syntaxhighlight>}}
}}
+
-->
{{floatitem|Itemlabel=""|Itemname=custom2val2|OPfamily=SOP
+
{{OPSubSection
 
+
|opFamily=SOP
|Itemsummary=
+
|sectionName=Texture Offsets
 
+
|sectionSummary=You can have set of images in a TOP, and apply all of them in one material to different parts of an object. This allows you to have a pre-rendered animation clip with the clip playing at different speeds and time offsets on different surfaces.
}}
 
{{floatitem|Itemlabel=""|Itemname=custom2val3|OPfamily=SOP
 
 
 
|Itemsummary=
 
 
 
}}
 
{{floatitem|Itemlabel=""|Itemname=custom2val4|OPfamily=SOP
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
}}
 
{{ParString|OPfamily=SOP|OPtype=vertex|Parname=custom3|Parlabel=Custom Attrib|Parorder=14
 
 
 
|Parsummary=
 
  
 +
You can adjust the material frame time by the first vertex/point texture W component (texture coordinated are U (horizontal), V (vertical) and W (one of a set of texture images). A texture (W) value of -1 moves back in time 1 frame. This lets you apply different frames to many polygons simultaneously using the Vertex SOP, or [[Point SOP]].
 
}}
 
}}
{{ParMenu|OPfamily=SOP|OPtype=vertex|Parname=custom3type|Parlabel=Custom Attrib Type|Parorder=15
+
|opFamily=SOP
 
 
|Parsummary=
 
 
 
|Paritems=
 
 
 
 
 
 
 
}}
 
}}
{{ParFloat|OPfamily=SOP|OPtype=vertex|Parname=custom3val|Parlabel=Value|Parorder=16
+
{{InputsPage
 
+
|opFamily=SOP
|Parsummary=
+
|opInputs={{OPInput
 
+
|opFamily=SOP
|Paritems=
+
|inputIndex=0
 
+
|inputName=
+
|inputSummary=
{{floatitem|Itemlabel=""|Itemname=custom3val1|OPfamily=SOP
+
}}<!--
 
+
-->{{OPInput
|Itemsummary=
+
|opFamily=SOP
 
+
|inputIndex=1
}}
+
|inputName=
{{floatitem|Itemlabel=""|Itemname=custom3val2|OPfamily=SOP
+
|inputSummary=
 
 
|Itemsummary=
 
 
 
}}
 
{{floatitem|Itemlabel=""|Itemname=custom3val3|OPfamily=SOP
 
 
 
|Itemsummary=
 
 
 
}}
 
{{floatitem|Itemlabel=""|Itemname=custom3val4|OPfamily=SOP
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
}}
 
{{ParString|OPfamily=SOP|OPtype=vertex|Parname=custom4|Parlabel=Custom Attrib|Parorder=17
 
 
 
|Parsummary=
 
 
 
 
}}
 
}}
{{ParMenu|OPfamily=SOP|OPtype=vertex|Parname=custom4type|Parlabel=Custom Attrib Type|Parorder=18
 
 
|Parsummary=
 
 
|Paritems=
 
 
 
 
 
}}
 
}}
{{ParFloat|OPfamily=SOP|OPtype=vertex|Parname=custom4val|Parlabel=Value|Parorder=19
+
{{History}}
 
+
{{SOPNavBox|opFamily=SOP}}
|Parsummary=
+
{{#invoke:Category|list|SOPs}}
 
 
|Paritems=
 
 
 
 
{{floatitem|Itemlabel=""|Itemname=custom4val1|OPfamily=SOP
 
 
 
|Itemsummary=
 
 
 
}}
 
{{floatitem|Itemlabel=""|Itemname=custom4val2|OPfamily=SOP
 
 
 
|Itemsummary=
 
 
 
}}
 
{{floatitem|Itemlabel=""|Itemname=custom4val3|OPfamily=SOP
 
 
 
|Itemsummary=
 
 
 
}}
 
{{floatitem|Itemlabel=""|Itemname=custom4val4|OPfamily=SOP
 
 
 
|Itemsummary=
 
 
 
}}
 
 
 
}}
 
{{:SOP Filter Common Page}}
 
<taggedhistory/>
 
{{SOPNavBox|OPfamily=SOP}}
 
[[Category:SOPs]]
 

Latest revision as of 06:18, 4 May 2020

Summary
[edit]

The Vertex SOP allows you to edit/create attributes on a per-vertex (rather than per-point) basis. It is similar to the Point SOP in this respect. It supports two inputs, and will inherit the first input source by default. If the second input have less primitives than the first input, it will cycle through the primitives and match the vertices. If the primitive in the first input has more vertices than the matching primitive in the second input, the extra vertices are ignored.

There are currently three vertex attributes supported:

  • Diffuse Color
  • Alpha
  • 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 SOP).

The SOP processes every vertex of every primitive. For each vertex processed, there are variables which allow you to know the:

  • Vertex number of the primitive being processed
  • The number of vertices in the primitive being processed
  • The point which is referenced by the vertex
  • The primitive which contains the vertex
  • The total number of points
  • 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. To access the attributes of the second input source, append a 2 to the variable.

PythonIcon.pngvertexSOP_Class


Parameters - Vertex Page

Group group - If there are input groups, specifying a group name in this field will cause this SOP to act only upon the group specified. Accepts patterns, as described in Pattern Matching.  

Color doclr - - Select between keeping the color, adding new color, or using no color for vertex color attributes from incoming geometry.

  • Keep Color off -
  • Add Color on -
  • No Color remove -

Color diff - - If you select 'Add Color' from the menu above, Cd color vertex attributes will be added/modified in the SOP. Enter expressions below to control the values of the point colors. The attributes to modify are: me.inputColor[0] for red, me.inputColor[1] for green, me.inputColor[2] for blue, and me.inputColor[3] for alpha. If you select 'No Color' from the menu above, the Cd color vertex attribute will be removed from the SOP.

  • Color diffr -
  • Color diffg -
  • Color diffb -

Alpha alpha - Control the alpha attribute in the same manner as the rgb colors above. Alpha is Cd[3] and comes from input via me.inputColor[3]  

Texture douvw - - Select between keeping the texture coordinates, adding new texture coordinates, or using no texture coordinates for the vertex texture attributes from incoming geometry.

  • Keep Texture off -
  • Add Texture on -
  • No Texture remove -

Texture map - - If you select 'Add Texture' from the menu above, uv texture coordinate vertex attributes will be added/modified in the SOP. Enter expressions here to control the values of the vertex texture coordinates here. The attributes to modify are: me.inputTexture[0], me.inputTexture[1] and me.inputTexture[2]. If you select 'No Texture' from the menu above, the uv texture coordinates vertex attribute will be removed from the SOP.

  • Texture mapu -
  • Texture mapv -
  • Texture mapw -

Crease docrease - - Select between keeping the crease, adding new crease, or using no crease for creaseweight attribute from incoming geometry.

The Crease Weight attribute can be used to set individual edge crease weights for sub-division surfaces (see Subdivide SOP ). This vertex attribute defines the weight for the edge which goes from that vertex to the next vertex in the polygon. For example, with a triangle (which has vertices 0, 1, 2), the attribute for vertex 1 defines the crease weight for the edge (1, 2). The attribute for vertex 2 defines the crease weight for edge (2, 0). The crease weight should be greater than 0. The larger the value for crease weights, the sharper the edge will be when sub-divided.

Crease attributes can be visualized by passing them into a Subdivide SOP.

  • Keep Crease off -
  • Add Crease on -
  • No Crease remove -

Crease crease - If you select 'Add Crease' from the menu above, enter expressions here to control the values of the creaseweights here. The attribute to modify is: me.inputVertex.creaseWeight[0]. Values for the weight of the vertex can range from 0.0001 to infinity.  


Parameters - Attributes Page

Custom Attrib 1 custom1 - Creates a custom attribute with this name.  

Type custom1type - - The type of attribute created can be selected from this menu.

  • float float -
  • vec2 vec2 -
  • vec3 vec3 -
  • vec4 vec4 -
  • int int -
  • ivec2 ivec2 -
  • ivec3 ivec3 -
  • ivec4 ivec4 -

Value custom1val - - Set the values of the Custom Attrib using these parameters.

  • Value custom1val1 -
  • Value custom1val2 -
  • Value custom1val3 -
  • Value custom1val4 -


Examples

Texture Offsets

You can have set of images in a TOP, and apply all of them in one material to different parts of an object. This allows you to have a pre-rendered animation clip with the clip playing at different speeds and time offsets on different surfaces.

You can adjust the material frame time by the first vertex/point texture W component (texture coordinated are U (horizontal), V (vertical) and W (one of a set of texture images). A texture (W) value of -1 moves back in time 1 frame. This lets you apply different frames to many polygons simultaneously using the Vertex SOP, or Point SOP.


Operator Inputs

  • Input 0 -
  • Input 1 -

TouchDesigner Build:

SOPs
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 • Facet • File In • Fillet • Fit • Font • Force • Fractal • Grid • Group • Hole • Import Select • In • Introduction To SOPs id • 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 • Experimental:Sprinkle • Sprite • Stitch • Subdivide • Superquad • Surfsect • Sweep • Switch • Text • Texture • Torus • Trace • Trail • Transform • Trim • Tristrip • Tube • Twist • Vertex • Wireframe • ZED

A sequence of vertices form a Polygon in a SOP. Each vertex is an integer index into the Point List, and each Point holds an XYZ position and attributes like Normals and Texture Coordinates.

An Operator Family that reads, creates and modifies 3D polygons, curves, NURBS surfaces, spheres, meatballs and other 3D surface data.

Information associated with SOP geometry. Points and primitives (polygons, NURBS, etc.) can have any number of attributes - position (P) is standard, and built-in optional attributes are normals (N), texture coordinates (uv), color (Cd), etc.

An Operator Family that creates, composites and modifies images, and reads/writes images and movies to/from files and the network. TOPs run on the graphics card's GPU.