Attribute

From Derivative
Jump to: navigation, search

Attributes include information about an entity such as its color, velocity, normal, and so on. There are many different attributes. Some of the most common ones are discussed below. Attributes can be attached to vertices, points, primitives, or the whole geometry. Since there are usually more vertices than points, having a vertex attribute will consume more memory than a point attribute. Similarly, since there are usually more points than primitives, having a point attribute will consume more memory than a primitive attribute. However, point attributes are interpolated across primitives, allowing more local flexibility than primitive attributes (e.g. color). Also, vertex attributes deal with the situation where shared points need different values for the attributes, like the seam of a polar texture map for example.

Types of Attributes[edit]

There are three different attribute data types. Each is handled slightly differently internally.

Vector Data This data type represents a 3D vector in space. When any transforms occur on the detail, this attribute will also be transformed. Examples of a vector attribute are normals (N) or velocity (v).
Floating Point Data This data type represents an array of floating point values. The values are not transformed when the geometry gets transformed. Some examples of this type of attribute are diffuse colors (Cd), and texture co-ordinates (uv).
Indexed String Data This attribute consists of an ordered list of character strings. The attribute stored with the element is an integer representing the offset into the array of strings. A value outside the bounds of the array is considered to be "not assigned". An example of this is the material attribute.


Commonly Used Attributes[edit]

See also: List of Attributes

Normals[edit]

Main article: Normals

A normal is a directional vector associated with a particular geometric entity, commonly perpendicular to it. The normal to a surface at a given point is a vector perpendicular to the surface at that point, and is computed as the cross product of the tangent vectors at that point.


Point UV’s (Texture Coordinates)[edit]

Main article: Point Attributes

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.

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.

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.