Primitive Variables


Introduction

Primitive variables can be used to help shade and texture objects by attaching special information to them, primitive variables. In RenderMan this is technically done by including the data as a token value pair when a surface primitive is declared. Once data is attached it is available as parameters to the shaders that are bound to the surface primitive. RenderMan takes care of properly interpolating the values provide in a manner analogous to the way surfaces are interpolated from their control points.  Parameters that are attached to surface geometry in this way are called primitive variables. Certain shaders may take advantage of certain primitive variables.

Primitive variables are further discussed and defined in the RenderMan Specification: Geometric Primitives and in Class Specifiers: AppNote #22


MTOR Support

MTOR directly supports several useful and commonly used primitive variables: ST primitive variables, reference geometry. Using Maya Artisan in conjunction with MTOR you can also paint primitive variables.  Finally, you can use Maya's advanced scripting features to create arbitrary primitive variables and wire them directly into your RenderMan shaders.

ST primitive variables and reference geometry are easy to use. Select the object(s) you want to attach the primitive variables to. Then choose the desired primitive variable from the Primitive Variable menu (see table below). It's that simple. To delete the primitive variables attached to an object select the objects and pick st:delete or _Pref:delete or any:delete. To pick all objects that have primitive variable information attached to them choose st:select or _Pref:select or any:select. 

To use Maya Artisan in conjunction with MTOR refer to the documents: 
Painting RenderMan Vertex Variables with Artisan 
and Specifying RenderMan Primitive Variables.

ST Primitive Variables This primitive variable defines the ST parameterization of a surface, allowing ST space to be defined by chord length (or randomly for that matter) allowing a texture to be uniformly distributed over a surface, without distortion from isoparms.

Primitive Variables-> st:delete
st:chord length
st:random
st:select
_Pref:delete
_Pref:freeze
_Pref:select
any:delete
any:select

RenderMan-> Primitive Variables->
gives control over creating and deleting primitive variables.

Reference Geometry This primitive variable allows animating geometry to deform while projections and procedural shaders stick to the geometry, thus solving the problematic "swimming shader" effect.

Painting Variables With Maya Artisan Maya Artisan can be used in conjunction with MTOR to paint any number of RenderMan vertex variables onto your NURBS surfaces. Color, displacement, etc. (Artisan is not part of the standard Maya release but can be obtained from Alias at additional cost.)

 

 

Pixar Animation Studios
(510) 752-3000 (voice)   (510) 752-3151 (fax)
Copyright © 1996- Pixar. All rights reserved.
RenderMan® is a registered trademark of Pixar.