This is RenderMan 21 Documentation you are viewing. The Rmanwiki home page will redirect you to the current documentation.
If you just add some lights and some objects to a scene in RenderMan, it makes a picture, but the shapes are a solid color, and it only has the details that it was modeled with. Shading is a way to refine and enhance both the color and geometric detail, turning clay-like models into imagery to match or exceed reality. Shading in RenderMan is divided into two domains: Space and Color. When RenderMan shades a 3D object, you are given the opportunity to refine the location of the final modeled surface in space in displacement shading. You are then given the opportunity tools to refine how an object interacts with light to define its color in material shading.
Displacement and material shading is described to the renderer via networks of interconnected nodes like textures connected to material properties. A value that varies over the surface of your object is called a shading signal, and these signals flow through the network connections to be created, altered, or mixed inside of the network nodes. In RenderMan, we further divide these networks into nodes that define the How and the What of your surface. Most of the network is full of Pattern nodes that describe the What – they help the shading artist control exactly what the signal values are at every point on the surface. At the very end of the network, the shading signals are fed into a Displace or Bxdf (material) node that define the How – they rely heavily on math and physics to define the spaces in which the surface positions are altered and the exact models with which the surface interacts with light.
The primary shading workflow is to work with a library of these nodes, connecting them together in different ways and tweaking their various knobs to achieve the looks you desire. RenderMan provides a core set of Displace and Bxdf nodes that represent the latest work in realistic surface models, along with a library of Pattern nodes that can be combined to replicate even the most complex surface appearance.
For advanced users, there are several options for creating your own nodes from scratch. For Displace and Bxdf nodes, there is a C++ API you can find here. They are currently limited to C++ only because the tightly coupled interactions with the renderer/integrator and the need to follow emerging research in complex math and physics of light interactions need the extra fine control and flexibility offered by this more powerful interface, these topics are not covered here and instead can be found in our Developer documentation.
Pattern nodes can be created using a C++ API as well for complete flexibility, but for reduced complexity and better artist productivity, Patterns can also be written using Open Shading Language (OSL). OSL combines a lot of the knowledge gained from a variety of previous shading languages to deliver a simplified language crafted for the task of describing the What of shading, with advanced render-time optimization tailor the execution for the best performance on each and every frame. It lets you tell the renderer how to do the things you care about controlling, and leaves the gritty details to the renderer to chew through.
Of course OSL may not be to your tastes, and C++ just too tedious. If you're willing to bear through some amount of C++, our API is flexible enough to let you embed just about any language you can get an execution environment for. As an example, and the PxrSEExpr node allows you to write shading code using SeExpr language. Even OSL was initially integrated this way.
Displacement shaders allow you to modify the geometry at render-time, effectively changing its shape. This way you can add more detail than was originally modeled in. Often, this is where the fine detail that comes from sculpting tools is actually applied to the model. This is done by taking the surface information from the original model and moving it point-by-point. A Displace shader is the only thing that can perform this modification, but it can be told how much and in which directions to do the modification by networks of Pattern nodes or textures exported from sculpting software.
Materials in RenderMan are often referred to as Bxdf(s). A Bxdf describes the material to the integrator that determines the final rendered look. Since these are independent, users can change integrators and still use the same Bxdf to achieve a consistent or expected result. Imagine you've created a golden metal, if you were to render this in PxrPathTracer or PxrVCM, you would expect the material properties to still be seen as "gold" in the final image. This could even be extended to non-photorealistic and custom integrators that would render your gold Bxdf in new and interesting ways but would still be understood as gold (or golden) in the result. This is the power of material Bxdfs in RenderMan.
PxrVolume - A powerful and fast volumetric shader used for smoke, fire, explosions, and more.