26.01.2015 Views

The RenderMan Interface - Paul Bourke

The RenderMan Interface - Paul Bourke

The RenderMan Interface - Paul Bourke

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

parameterlist is a list of token-array pairs where each token is one of the standard<br />

geometric primitive variables, a variable that has been defined with RiDeclare, or is<br />

given as an inline declaration. <strong>The</strong> parameter list must include at least position (”P”)<br />

information. If a primitive variable is vertex or varying, the array contains n elements<br />

of the type corresponding to the token, where n is equal to the maximum value in<br />

the array vertices plus one. Primitive variables that are vertex will be interpolated<br />

according to the subdivision rules (just as ”P” is), whereas varying data will be interpolated<br />

linearly across faces (as is done for a PointsPolygons). If the variable is<br />

uniform, the array contains nfaces elements of the associated type. If the variable is<br />

constant, a single element of the associated type should be provided.<br />

A component is either a face, a vertex, or a chain of edges. Components of the subdivision<br />

mesh may be tagged by the user to have various implementation-specific<br />

properties. <strong>The</strong> token array tags, of length ntags, identifies these tags. Each tag has<br />

zero or more integer arguments, and zero or more floating-point arguments. <strong>The</strong><br />

number of arguments provided with each tag is specified by the array nargs, which<br />

has a length of ntags × 2. For each tag, nargs contains an integer specifying the number<br />

of integer operands found in the array intargs, followed by an integer specifying<br />

the number of floating-point operands found in the array floatargs. Thus, the length<br />

of intargs is equal to the sum of all the even-numbered elements of the array nargs.<br />

<strong>The</strong> length of floatargs is equal to the sum of all the odd-numbered elements of the<br />

array nargs.<br />

<strong>The</strong> standard tags are ”hole”, ”crease”, ”corner”, and ”interpolateboundary”.<br />

<strong>The</strong> ”hole” tag specifies that certain faces are holes. This tag has n integer arguments,<br />

one for each face that is a hole, and zero floating-point arguments. Each face is specified<br />

by its index in the nvertices array.<br />

<strong>The</strong> ”crease” tag specifies that a certain chain of edges should be a sharp crease. This<br />

tag has n integer arguments specifying a chain of vertices that make up the crease,<br />

and one floating-point argument that is expected to be RI INFINITY. Each sequential<br />

pair of vertices in a crease must be the endpoints of an edge of the subdivision mesh.<br />

A mesh may have any number of independent ”crease” tags. Individual renderer implementations<br />

may choose to expand the functionality of the ”crease” tag by making<br />

use of tag values other than RI INFINITY.<br />

<strong>The</strong> ”corner” tag may be used to mark certain vertices as sharp corners. This tag<br />

has n integer arguments containing the vertex numbers of the corners and either<br />

one or n floating-point arguments that are expected to be RI INFINITY. Individual<br />

renderer implementations may choose to expand the functionality of the ”crease” tag<br />

by making use of tag values other than RI INFINITY.<br />

<strong>The</strong> ”interpolateboundary” tag specifies that the subdivision mesh should interpolate<br />

all boundary faces to their edges. This tag has zero integer arguments and zero<br />

floating-point arguments. It has the same effect as specifying that all the boundary<br />

edge-chains are sharp creases and that boundary vertices with exactly two incident<br />

edges are sharp corners.<br />

RIB BINDING<br />

SubdivisionMesh scheme nvertices vertices tags nargs intargs floatargs ...parameterlist...<br />

<strong>The</strong> number of faces is determined implicitly by the length of the nvertices array.<br />

76

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!