# Attribute

(Redirected from Attributes)

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

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). 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). 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

### Normals

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)

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.