Page tree

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 13 Next »

Contents

Instance Attributes

RenderMan allows for attributes to be assigned to and used on geometry instances for different purposes. These attributes can be set per-instance, this is different than a Primvar which is the same for the master geometry and instances.

Some attributes allow controls for:

  • Grouping objects
  • Linking objects
  • Giving hints to the renderer like intersection priority
  • User attributes for customizing output or pipeline functions
  • Altering visibility for certain effects like trace sets, camera or reflection visibility, etc.
  • Some options for optimization like trace depth and relative pixel variance

 

NameTypeDefaultDescription
grouping:membershipstringnullGrouping membership used for linking
identifier:idinteger0Lower 32 bits of 64 bit object id
identifier:id2integer0Upper 32 bits of 64 bit object id
identifier:lpegroupstringnullGrouping membership used for light path expressions, example, keylight
identifier:namestringnullInstance path name
lightfilter:subsetstringnullActive light filter groups in lighting
lighting:excludesubsetstringnullExclude light groups from lighting
lighting:muteinteger0Mutes light emission
lighting:subsetstringnullLight groups active in lighting
Ri:Matteinteger0Indicates a matte object, this object is rendered as a "black hole"
Ri:ReverseOrientationinteger0Flip shading normals
Ri:Sidesinteger2Geometry can be one or two sided
shade:relativepixelvariancefloat1PixelVariance multiplier for camera visible objects, allows you to alter the samples relative to the global setting
shade:indexofrefractionfloat-1Set an index of refraction used in nested dielectrics, we use the bxdf result, this is used as an override
trace:holdoutinteger0Indicates holdout object, useful in holdout workflow. These objects collect reflections, shadows, and transmission.
trace:intersectpriorityinteger0Raytrace intersection priority for nested dielectrics
trace:maxdiffusedepthinteger1Maximum diffuse light bounces
trace:maxspeculardepthinteger2Maximum specular light bounces
trace:reflectexcludesubsetstringnullExclude object groups from reflections
trace:reflectsubsetstringnullObject groups visible to reflections
trace:shadowexcludesubsetstringnullExclude object groups from casting shadows
trace:shadowsubsetstringnullObject groups active in shadows
attributes trace:transmitexcludesubsetstringnullExclude object groups from transmission/refractions
trace:transmitsubsetstringnullObject groups visible to transmission/refractions
user:<name> <type> <value>anynullArbitrary instance user data
visibility:camerainteger1Indicates if object is visible to the camera
visibility:indirectinteger1Indicates if object is visible to indirect (reflection and specular refraction) rays
visibility:transmissioninteger1Indicates if object is visible to shadow rays

 

Primvars

Primvars can be set and manipulated on different types of geometry (as available for that type of geometry). This can allow pattern networks and shaders to retrieve this information at render time.

Class Specifiers: There are several types of Primvars

Constant: One value remains constant over the entire surface primitive. 
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. 

A variable's class and the surface primitive determine how many samples must be included when a primitive variable is attached to a surface primitive. The following two tables identify the correct number of values that must be included for each combination of class specifier and surface primitive.

Surface PrimitiveConstantUniformVaryingVertexFacevarying
Quadrics11444
Polygon11nvertsnvertsnverts
General Polygon11nvertsnvertsnverts
Points Polygons1npolysnvertsnvertssum(nverticesi)
Points General Polygons1npolysnvertsnvertssum(nverticesi)
Points11npointsnpointsnpoints
Subdivision Mesh1nfacesnvertsnvertssum(nverticesi)
Surface PrimitiveConstantUniformVarying and FacevaryingVertex
Patch Bilinear1144
Patch Bicubic11416
PatchMesh Bilinear1(nu-unowrap)*
(nv-vnowrap)
nu*nvnu*nv
PatchMesh Bicubic1usegs*vsegs(usegs+unowrap)*
(vsegs+vnowrap)
nu*nv
NuPatch1(nu-uorder+1)*
(nv-vorder+1)
(nu-uorder+2)*
(nv-vorder+2)
nu*nv
Curves Linear1sum(nsegsi-nowrap)sum(nverticesi)sum(nverticesi)
Curves Cubic1sum(nsegsi)sum(nsegsi+nowrap)sum(nverticesi)
Blobby11nleafnleaf

 

Note, in the above table for parametric surface primitives, unowrap, vnowrap, and nowrap are assumed to be a boolean value of either 0 = periodic or 1 = nonperiodic. This is NOT how uwrap, vwrap, and wrap are used in the RenderMan interface.

For a bicubic patch mesh the number of values for the uniform and varying classes is determined by the number of patch segments in the u and v direction (usegs, vsegs, and nsegsi in the above table). This is determined by the u and v basis functions of the patch mesh. The following table gives the formula for calculating the number of patch segments, in the u or v direction, of a patch mesh. N is the number of control vertices in the u or v direction (nu or nv in the above table).

 

 

User Primvars

NameTypeDefaultDescription
<name> <type> <value>AnynullArbitrary primitive user data
identifier:objectstringnullObject name


Dicing and Approximating geometry

NameTypeDefaultDescription
dice:micropolygonlengthfloat0Object micropolygon length expressed in pixel size
dice:minlengthfloat-1 
dice:minlengthspacestringnull 
dice:offscreenstrategystring"viewfrustumdistance"Defines the dicing strategy used for offscreen objects that may be traced indirectly, the options are: "clamped", "sphericalprojection, "viewfrustumdistance", "worlddistance"
dice:rasterorientinteger1 
dice:referencecamerastringnull 
dice:referenceinstancestringnullThis is the object name of the referenced instance used for dicing
dice:strategystring"instanceprojection"Defines the dicing strategy used for objects on screen, the options are: "instanceprojection", "sphericalprojection", "worlddistance"
dice:worlddistancelengthfloat-1Object micropolygon length expressed in world space units
Ri:GeometricApproximationFocusFactorfloat-1Allows the renderer to dice more coarsely for out of focus objects
Ri:GeometricApproximationMotionFactorfloat0Allows the renderer to dice more coarsely for blurry or fast moving objects

 

Displacement

NameTypeDefaultDescription
displacementbound:CoordinateSystemstringnull 
displacementbound:spherestringnull 

 

Tracing Controls

NameTypeDefaultDescription
trace:autobiasinteger1Allow the renderer to automatially adjust ray bias, 0 is off
trace:biasfloat0.01The user-set bias amount, typically small values to offset a ray to avoid artifacts such as shadow acne
trace:displacementsinteger1Trace displacements (seen in reflections and refractions, etc) 0 is off
trace:samplemotioninteger0Whether motion blurred objects appear in ray-traced results. When 0, the motion blur of other objects hit by rays launched from the object with this attribute will be ignored. When non-zero, motion blur will be taken into account by rays launched from an object with this attribute

 

Primvars based on geometry type

Blobbies

NameTypeDefaultDescription
primvars:Blobby Ri:codeintegernull (required) 
primvars:Blobby Ri:floatsfloatnull 
primvars:Blobby Ri:nleafintegernull (required) 
primvars:Blobby Ri:strings   

 

primvars:Blobby Ri:code integer[n] [required] Description
primvars:Blobby Ri:floats float[n] [] Description
primvars:Blobby Ri:nleaf integer [required] Description
primvars:Blobby Ri:strings integer[n] [] Description

 

Cone

primvars:Cone N <detail> normal [] Description
primvars:Cone Ri:height float [1] Description
primvars:Cone Ri:radius float [1] Description
primvars:Cone Ri:thetamax float [360] Description
primvars:Cone s <detail> float [] Description
primvars:Cone st <detail> float[2] [] Description
primvars:Cone t <detail> float [] Description

 

Curves

primvars:Curves curve:stochasticshadows integer [1] Description
primvars:Curves N <detail> normal [] Defines oriented ribbons
primvars:Curves Os <detail> color [] Opacity.
primvars:Curves P vertex point [required] Description
primvars:Curves Ri:Basis string [required] Required for non-linear curves. Values are "bezier", "b-spline", or "catmull-rom".
primvars:Curves Ri:nvertices uniform integer [required] Description
primvars:Curves Ri:type string [required] Description
primvars:Curves Ri:wrap string [required] Description
primvars:Curves s <detail> float [] Description
primvars:Curves st <detail> float[2] [] Description
primvars:Curves t <detail> float [] Description
primvars:Curves width <detail> float [] Description

 

Cylinder

primvars:Cylinder N <detail> normal [] Description
primvars:Cylinder Ri:radius float [1] Description
primvars:Cylinder Ri:thetamax float [360] Description
primvars:Cylinder Ri:zmax float [1] Description
primvars:Cylinder Ri:zmin float [-1] Description
primvars:Cylinder s <detail> float [] Description
primvars:Cylinder st <detail> float[2] [] Description
primvars:Cylinder t <detail> float [] Description

 

Disk

primvars:Disk N <detail> normal [] Description
primvars:Disk Ri:height float [0] Description
primvars:Disk Ri:radius float [1] Description
primvars:Disk Ri:thetamax float [360] Description
primvars:Disk s <detail> float [] Description
primvars:Disk st <detail> float[2] [] Description
primvars:Disk t <detail> float [] Description

 

Hyperboloid

primvars:Hyperboloid N <detail> normal [] Description
primvars:Hyperboloid Ri:point1 point [1 0 -1] Description
primvars:Hyperboloid Ri:point2 point [0 1 1] Description
primvars:Hyperboloid Ri:thetamax float [360] Description
primvars:Hyperboloid s <detail> float [] Description
primvars:Hyperboloid st <detail> float[2] [] Description
primvars:Hyperboloid t <detail> float [] Description

 

NuPatch (NURBS)

primvars:NuPatch N <detail> normal [] Description
primvars:NuPatch P vertex point [required] Description
primvars:NuPatch Pref vertex <point|hpoint> [] Reference P.
primvars:NuPatch Pw vertex hpoint [required] Description
primvars:NuPatch Ri:nu integer [required] Description
primvars:NuPatch Ri:nv integer [required] Description
primvars:NuPatch Ri:Orientation string ["outside"] Geometric winding order
primvars:NuPatch Ri:trimknot float[n] [] Description
primvars:NuPatch Ri:trimmax float[n] [] Description
primvars:NuPatch Ri:trimmin float[n] [] Description
primvars:NuPatch Ri:trimn integer[n] [] Description
primvars:NuPatch Ri:trimncurves integer[n] [] Description
primvars:NuPatch Ri:trimnloops integer [] Description
primvars:NuPatch Ri:trimorder integer[n] [] Description
primvars:NuPatch Ri:trimu float[n] [] Description
primvars:NuPatch Ri:trimv float[n] [] Description
primvars:NuPatch Ri:trimw float[n] [] Description
primvars:NuPatch Ri:uknot float[n] [required] Description length (Ri:uorder + Ri:nu)
primvars:NuPatch Ri:umax float [optional] Description
primvars:NuPatch Ri:umin float [optional] Description
primvars:NuPatch Ri:uorder integer [required] Description
primvars:NuPatch Ri:vknot float[n] [] Description length (Ri:vorder + Ri:nv)
primvars:NuPatch Ri:vmax float [optional] Description
primvars:NuPatch Ri:vmin float [optional] Description
primvars:NuPatch Ri:vorder integer [required] Description
primvars:NuPatch s <detail> float [] Description
primvars:NuPatch st <detail> float[2] [] Description
primvars:NuPatch t <detail> float [] Description
primvars:NuPatch trimcurve:sense string ["inside"] Description

 

Paraboloid

primvars:Paraboloid N <detail> normal [] Description
primvars:Paraboloid Ri:radius float [1] Description
primvars:Paraboloid Ri:thetamax float [360] Description
primvars:Paraboloid Ri:zmax float [1] Description
primvars:Paraboloid Ri:zmin float [0] Description
primvars:Paraboloid s <detail> float [] Description
primvars:Paraboloid st <detail> float[2] [] Description
primvars:Paraboloid t <detail> float [] Description

 

Points

primvars:Points N <detail> normal [] Description
primvars:Points Nref <detail> normal [] Reference N.
primvars:Points P vertex point [required] Description
primvars:Points Pref vertex point [] Reference P.
primvars:Points width <detail> float [] Description

 

Polygons

primvars:PolygonMesh N <detail> normal [] Description
primvars:PolygonMesh Nref <detail> normal [] Reference N.
primvars:PolygonMesh P vertex point [required] Description
primvars:PolygonMesh polygon:concave integer [1] Allow concave polygons.
primvars:PolygonMesh polygon:smoothnormals integer [0] Smooth normals if not provided
primvars:PolygonMesh Pref vertex point [] Reference P.
primvars:PolygonMesh Ri:nvertices uniform integer [required] Description
primvars:PolygonMesh Ri:Orientation string ["outside"] Geometric winding order
primvars:PolygonMesh Ri:vertices facevarying integer [required] Description
primvars:PolygonMesh s <detail> float [] Description
primvars:PolygonMesh st <detail> float[2] [] Description
primvars:PolygonMesh t <detail> float [] Description

 

Procedurals

primvars:Procedural __bound float[6] [required] Description. Required for procedural 1.
primvars:Procedural procedural:immediatesubdivide integer [0] Description
primvars:Procedural procedural:reentrant integer [0] Description
primvars:Procedural proceduralVersion integer [2] Description
primvars:Procedural Ri:boundfunction string [required] Description "SimpleBound" or "DSOBound". Required for procedural 2.
primvars:Procedural Ri:subdivisionfunction string [required] Description "DelayedReadArchive" or "DynamicLoad"

 

Spheres

primvars:Sphere N <detail> normal [] Description
primvars:Sphere Ri:radius float [1] Description
primvars:Sphere Ri:thetamax float [360] Description
primvars:Sphere Ri:zmax float [Ri:radius] Description
primvars:Sphere Ri:zmin float [-Ri:radius] Description
primvars:Sphere s <detail> float [] Description
primvars:Sphere st <detail> float[2] [] Description
primvars:Sphere t <detail> float [] Description

 

Subdivision Surfaces

primvars:SubdivisionMesh dice:pretessellate integer [1] Description
primvars:SubdivisionMesh dice:watertight integer [0] Description
primvars:SubdivisionMesh N <detail> normal [] Description
primvars:SubdivisionMesh Nref <detail> normal [] Reference N.
primvars:SubdivisionMesh P vertex point [required] Description
primvars:SubdivisionMesh Pref vertex point [] Reference P.
primvars:SubdivisionMesh Ri:nvertices uniform integer [required] Description
primvars:SubdivisionMesh Ri:Orientation string ["outside"] Geometric winding order
primvars:SubdivisionMesh Ri:scheme string [required] Description
primvars:SubdivisionMesh Ri:subdivtagfloatargs float[n] [] Description
primvars:SubdivisionMesh Ri:subdivtagintargs integer[n] [] Description
primvars:SubdivisionMesh Ri:subdivtagnargs integer[n] [] Description
primvars:SubdivisionMesh Ri:subdivtags string[n] [] Description
primvars:SubdivisionMesh Ri:subdivtagstringtags string[n] [] Description
primvars:SubdivisionMesh Ri:vertices facevarying integer [required] Description
primvars:SubdivisionMesh s <detail> float [] Description
primvars:SubdivisionMesh shade:faceset integer[n] [] Description
primvars:SubdivisionMesh st <detail> float[2] [] Description
primvars:SubdivisionMesh stitchbound:CoordinateSystem string [] Description
primvars:SubdivisionMesh stitchbound:sphere float [0] Description
primvars:SubdivisionMesh t <detail> float [] Description

 

Torus

primvars:Torus N <detail> normal [] Description
primvars:Torus Ri:majorradius float [1] Description
primvars:Torus Ri:minorradius float [0.5] Description
primvars:Torus Ri:phimax float [360] Description
primvars:Torus Ri:phimin float [0] Description
primvars:Torus Ri:thetamax float [360] Description
primvars:Torus s <detail> float [] Description
primvars:Torus st <detail> float[2] [] Description
primvars:Torus t <detail> float [] Description

 

Volumes

primvars:Volume Ri:Bound float[6] [0 0 0 0 0 0] Description
primvars:Volume Ri:dimensions integer[3] [required] Description [Volume]
primvars:Volume Ri:type string [required] Description [Volume]
primvars:Volume volume:dsominmax integer [0] Description [Volume]