Home Reference Expression functions 

vertex expression function

Returns the value of a vertex attribute.

Usage

vertex(surface_node, primitive_number, vertex_number, attribute, index)

attribute is the name of the attribute (eg. “Cd” for diffuse color). Two special attributes exist “P” and “Pw” which represent the position of the point in space (“Pw” allows you to access the W component of the position).

Note

This function will interpolate between point values if the vertex number is fractional, such as 3.35.

Examples

vertex("/obj/geo1/facet1", 2, 3, "P", 0)

Return the X component of vertex 3 of primitive2 in the facet1 surface node of geo1.

point("/obj/geo1/facet1", 2, 3, "Cd", 2)

Returns the Z component of the color attribute of vertex 3 of primitive 2 in the facet1 surface node of object geo1.

Replaced by