"GP" Shading QuickStart

"GP" Shading QuickStart

RenderMan for Maya includes a set of built-in Maya nodes that form a cohesive, integrated system for producing the highest quality "physically-plausible" results. This page is intended to provide users with an introduction to the basic usage of these nodes, with an eye toward producing particular results.

Layering

RMSGPSurface surface supports layering with other GP surfaces. This is achieved by connecting the additional shaders to the Layers parameter. When you do this the mask parameter of each shader will be used as the mask to "over" the materials together. You can layer speculars components together by setting the mask to transparent and turning off the “mask reflections” parameter.

Layering is typically used to achieve an effect such as rusty metal chair. The chair would be painted, with some areas scraped off. These areas that are scraped off would be rusty. Creating a rusty material and a shiny painted material and then using a mask for the rusty area would enable you to create a composite material.

RMS 18 adds support for glass in the base layer of GPSurface. The glass layer provides the refraction and secondary specular behavior. The base GPSurface provides the specular and diffuse behavior. The Layers disclosure now has both a Layers 0 and a Glass Coshader parameter. Right-clicking will allow you to choose an existing glass shader or create a new one. Refraction Amount blends the glass contribution with the diffuse contribution (change the value to something greater than 1 to enable the behavior).

To, for example, create a label on glass, follow the steps above, set Refraction Amount to 1, thenadd a new layer for the label. You can now work with the new layer just as you would previously.

Global Illumination

Producing indirect global illumination (i.e. occlusion and color bleeding) with the new suite of shaders is exceedingly simple. There are two lights for simulating indirect global illumination: the RMSGILight and the RMSPtcGILight. Adding either of these lights to your scene is necessary for indirect global illumination. Direct global illumination (i.e. image-based lighting, or IBL) is done via the RMSEnvLight node. Note that this is a significant change from the workflow in RMS 3 and earlier, wherein both direct and indirect illumination were done via the RenderMan Environment Light. Because indirect light can be far more expensive to compute, the two elements have been separated, for rendering efficiencies.

The RMSGILight is the easiest for producing indirect illumination, in that you simply have to turn on ray tracing for it to work (ray tracing is extremely popular with the kids these days). The maximum number of bounces is dictated by the Globals' Max Diffuse Depth and the Max Bounces parameter in the shader. The quality of the solution is dictated by the number of samples and the Max Variation parameter. There is also a tint color for convenience. Because it is a light it also respects light linking, which can enable more granular control for the GI calculated for particular objects. However, be aware that there is only one global radiosity cache, so there will be interactions between multiple GI lights.

RMSPtcGILight uses a prepass to compute a point cloud that can then be used to compute a simulated GI pass. This is configured in the RMSPtcGILight by connecting a pass to the Bake Pass parameter (right-click in the parameter's field).

Subsurface Scattering

RMSGPSurface has built-in support for ray-traced or point-based subsurface scattering. By default, ray-traced subsurface scattering is calculated; referencing a point cloud file bypasses the ray-traced calculations and uses the point cloud instead. The primary controls for subsurface scattering are the Albedo and Diffuse Mix parameters, and the Samples parameter. There are dropdown lists that allow you to choose reasonable Albedo and Diffuse Mean Free Path (DMPF) settings for the material you are trying to model.

Subsurface computations are initiated, the contribution factored into the appearance, by setting the Diffuse Mix to something other than 0.

Reflections

Ray-traced reflections are an implicit property of the materials. They are controlled by the roughness parameters of their respective specular lobes. The min and max number of samples is dictated by the setting in the Advanced section for the specular components.

Lighting

While the new system is compatible with most of the old Maya lights, it has been augmented with a new environment light - RMSEnvLight - and a new area light - RMSAreaLight. RMSAreaLight has the advantage of having an actual area and thus gives more realistic highlights, but it is more expensive for shadowing. Ray-traced shadows work best, and there are many advantages to using them. However if you are rendering something like hair or fur, you may want to use areashadow deep shadow maps. This can easily be integrated by using the exclude trace set, and including only the expensive geometry in the area shadow map.

  • Important

    Users should not confuse the RMSEnvLight introduced in RMS 4 with the RenderMan Environment Light in RMS 3 and earlier. The two are neither compatible nor interchangeable. Additionally, it is important to remember that this extends to the entire shading system. The older RenderMan Environment Light will not produce correct, useful results when used with the new RMS GP shading system. Similarly, users should only deploy the RMSEnvLight in an exclusively GP-based system.

Using Light Blockers

RenderMan for Maya also includes an RMSLightBlocker node that can be bound to RMSEnvLight or RMSAreaLight. To use a blocker, create an instance of the RMSLightBlocker (note that it can be either Planar or Volume) and connect it to a light via the light's Bound Co-shader parameter, found in the Shadows component; right-click to choose the existing blocker. Note that you can also create the blocker directly by right-clicking in that field as well.

Displacements

RMSGPSurface has a built-in displacement component. Vector displacements can be connected to the shader through the Displacement Vector parameter. (Users should set the Displacement Amount to 1, and the Mode to "displace".) Only relative tangent space displacement maps are supported. Regular displacements are connected to the Displacement Amount parameter using a standard texture map node. The scale of the displacement is then dictated by the input nodes values.

In RMS 18, bumps can now be added, post-displacement. In the new order of operations, displacement will run, then normal maps, and finally (using the resultant normal of the previous two operations), bump will be applied. Additionally, RfM now supports an arbitrary map center and a generic world space vector for displacement, bypassing the shifting and scaling of maps from ZBrush and Mudbox. This can be useful if you bake out a vector from PRMan in world space and want to re-use it.

Texture Maps

RMSGPSurface has a number of built-in parameters that can take texture maps. Other parameters will need to be wired up explicityly. If you wish to leverage the built-in maps, you can specify the maps with expressions, or explicitly, or you can use primvar or static Dynamic Rule overrides for the map parameters.

UDIM/Atlas Support

RenderMan for Maya supports Mari UDIM and Mudbox atlas textures referenced via Maya's Image File node (the rmanImageFile node does not support these indices at this time). Users must add the Texture Controls to the node (via Attributes->RenderMan->Add Texture Controls), select Mari or Mudbox from the UDIM/Atlas Support dropdown, and then reference the UDIM/Atlas number with an added _MAPID_ token in the file string, like so:

/path/to/myTextures/myTextureName._MAPID_.tex

Note that your files need to be manually converted to textures via txmake.

Glass

Glass materials are handled by their own shader - RMSGlass. This allows for specific optimizations for refractive behaviors. If you wish to have refractive materials simply use this node.

In RMS 18, RMSGPSurface can now receive the index of refraction (IOR) that a refraction ray represents. This allows the Fresnel calculations to be modified to properly represent the reflectivity of, for example, plastic in water, adding realism to water scenes with minimal user interaction.

Metal

Shading metals is achieved using RMSGPSurface, via the Metallic parameter in the Dual Specular component of the shader. By default you will have a clear-coat-like material. To disable the extra dielectric lobe, set the Specular Blend to 0. The metallic response is dictated by the specular controls, and the samples are controlled in the same way as all specular shading.