Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Constant: One value remains constant over the entire surface primitive. This is the only level that can be achieved with user attributes.
Uniform: One value remains constant for each uv patch segment of the surface primitive. 
Varying: Four values are interpolated over each uv patch segment of the surface. Bilinear interpolation is used for interpolation between the four values. 
Vertex: Values are interpolated between each vertex in the surface primitive. The basis function of the surface is used for interpolation between vertices. 
Facevarying: For polygons and subdivision surfaces, four values are interpolated over each face of the mesh. Bilinear interpolation is used for interpolation between the four values. 


Setting arbitrary primvars

RenderMan for Katana supports primitive variables using Katana's standard Arbitrary Attribute convention. 

...

  • float
  • double (converted to float)
  • string
  • int
  • color3
  • normal3
  • vector3
  • point2
  • point3
  • point4matrix16    
  • matrix16

Here is an example OpScript showing how to set an arbitrary constant color primvar:

Interface.SetAttr("geometry.arbitrary.myColor.scope", StringAttribute("primitive"))
Interface.SetAttr("geometry.arbitrary.myColor.value", FloatAttribute({0.01.00.0}))
Interface.SetAttr("geometry.arbitrary.myColor.inputType", StringAttribute("color3"))

Using Primvars

Typically, production workflows will export these arbitrary attributes as a part of the alembic or USD asset, so no set up inside of Katana is required.  Otherwise, you can use an OpScript to set the geometry.arbitrary attribute directly on a geometry location , it - the attribute is not inheritable.

Primvars are read by various shading plugins, most notably PxrPrimvar. PxrPrimvar, PxrSeExpr, PxrVariable, and PxrVary are some plugins distributed with RenderMan that use arbitrary primvars.