Point Attributes

From TouchDesigner Documentation
Jump to: navigation, search

Normally items are located spatially by XYZ values. To differentiate texture coordinate space from XYZ space, the labels U and V are used instead of X and Y.

In order to place texture maps (images) onto geometry, we must assign texture coordinates to the geometry. A texture map resides in its own (U, V) texture coordinate space. When assigned to the geometry, the (U, V) coordinates designate how to map the image onto the geometry. Texture space should not be mistaken for the parametric space of splines.

You can use the Texture SOP, Point SOP or the SOP to DAT + DAT to SOP pairs to add or modify these attributes.

Texture coordinates can be visualized in the following manner: Texture maps have their own coordinate space. If the texture were a table cloth with a grid pattern, the color at location 3, 4 on the table cloth remains at location 3, 4 even when the cloth is wrapped around an irregularly shaped object. The color at location 3, 4 can be said to be in the table-cloth's coordinate space.

TIP: By using a Point SOP, you can swap the position and the texture coordinates. This allows you to model the "texture space". Another Point SOP allows you to swap the position and texture back to their original locations.

Some Point Attributes[edit]

Name Type Size Description
P float 3 Point position
Pw float 1 Point weight
N vector 3 Surface normal
uv float 3 Texture coordinates
Cd float 4 Surface color and alpha specified by RGBA. Values range from 0 to 1. The alpha component Cd(3) controls the transparency of a given element, where 1 is fully opaque, and 0 is fully transparent.
v vector 3 Velocity
mass float 1 Mass
drag float 1 Drag
tension float 1 Tension
springk float 1 Spring constant
up vector 3 Up
pscale float 1 Particle scale
radiusf float 1 Radius
scalef float 1 Force scale
radialf float 1 Radial force
normalf float 1 Normal force
edgef float 1 Edge force
edge_dir vector 3 Edge direction
dirf vector 3 Directional force
pCapt float 2 Capture data containing index and weight for a transform. See Deforming Geometry (Skinning)

Each SOP has a list of Points. Each point has an XYZ 3D position value plus other optional attributes. Each polygon Primitive is defined by a vertex list, which is list of point numbers.

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 optional are normals (N), texture coordinates (uv), color (Cd), etc.