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.

Note that the geometry vector used with the RiHermiteBasis basis matrix must be (point0,<br />

vector0, point1, vector1), which is a permutation of the Hermite geometry vector often<br />

found in mathematics texts. Using this formulation permits a step value of 2 to correctly<br />

increment over data in Hermite patch meshes.<br />

RiPatch ( RtToken type, ...parameterlist...)<br />

Define a single patch. type can be either ”bilinear” or ”bicubic”. parameterlist is a list of<br />

token-array pairs where each token is one of the standard geometric primitive variables<br />

or a variable which has been defined with RiDeclare. <strong>The</strong> parameter list must<br />

include at least position (”P”, ”Pw” or ”Pz”) information. Patch arrays are specified<br />

such that u varies faster than v.<br />

Four points define a bilinear patch, and 16 define a bicubic patch. <strong>The</strong> order of vertices<br />

for a bilinear patch is (0,0),(1,0),(0,1),(1,1). Note that the order of points defining<br />

a quadrilateral is different depending on whether it is a bilinear patch or a polygon.<br />

<strong>The</strong> vertices of a polygon would normally be in clockwise (0,0),(0,1),(1,1),(1,0) order.<br />

Patch primitive variables that are constant or uniform should supply one value, which<br />

is constant over the patch. Primitive variables that are varying should supply four<br />

values, one for each parametric corner of the patch (the data will be interpolated<br />

bilinearly). Primitive variables that are vertex should supply four values for a bilinear<br />

patch, or 16 values for a bicubic patch — that is, the same number of values as control<br />

vertices ”P”. A vertex primitive variable will be interpolated across the surface in the<br />

same manner as the surface position ”P”. In all cases, the actual size of each array is<br />

this number of values times the size of the type associated with the variable.<br />

RIB BINDING<br />

Patch type ...parameterlist...<br />

EXAMPLE<br />

Patch ”bilinear” ”P” [ -0.08 0.04 0.05 0 0.04 0.05<br />

-0.08 0.03 0.05 0 0.03 0.05]<br />

SEE ALSO<br />

RiBasis, RiNuPatch, RiPatchMesh<br />

RiPatchMesh ( RtToken type, RtInt nu, RtToken uwrap,<br />

RtInt nv, RtInt vwrap, ...parameterlist...)<br />

69

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

Saved successfully!

Ooh no, something went wrong!