You are viewing RenderMan 22 documentation which is not the current release. You may view the current documentation by visiting the home page.

Page tree

Contents

PxrLayer is a pattern that layers the shader parameters for PxrSurface.


This pattern is written in OSL by the Pixar Animation Studios. It only layers matching shader parameters and skips the unmatching ones. It's recommended to use PxrLayer with PxrLayerMixer and the PxrLayerSurface material. PxrLayer is responsible for your results (the final look) while PxrLayerSurface is responsible for global control of the entire layered material lobe settings and must be assigned to your object(s).

Parameters begin below.





In the parameters below, they can be overridden by another PxrLayer when connected to the Input Material of a PxrSurface or through a PxrLayerMixer. PxrLayerSurface is designed to better illustrate which parameters are not able to be overridden in a layer by including only parameters that are global. We recommend the PxrLayerSurface material when you know you will be layering.



 Diffuse Parameters

Diffuse Parameters

The diffuse parameters control the look of basic diffuse reflection. These are often used to define primary color attributes for opaque objects; wood textures, label text, polka dots, or more, you can find them all connected here. This lobe is on by default.


Enable

On by default, but if off, the next lowest layer (or base) lobe is used.


Gain

Gain is the weight applied to the diffuse parameters. You may also drive this with another pattern to show things like fading or wetness (where liquid darkens a surface). Below are examples at 0.0, 0.5, and 1.0 gain for a 50% grey material.




Color

Color is typically where textures or patterns are connected to create color for opaque objects. This is where a wood color texture would go, for example.




Roughness

Diffuse roughness is how you would simulate a powdery surface like dried clay or dust.



Bump

Bump mapping is a great way to fake the appearance of physical detail using shading instead. If this is not set, it will use the global bump normal specified in the Properties section near the bottom of this page.




Back Color

This only applies when Double Sided is on. When Use Diffuse Color if off, this sets the back color (the color for the back side). By default, it uses the Diffuse Color but choosing a different color provides you with a way to make the backside of 2D objects appear differently.


Transmit Gain

This only applies when Double Sided is on.  Instead of using the Diffuse Gain for controlling the intensity of the diffuse transmission, we use the Transmit Gain.  If it's 0.0, then the effect is off. Below the Transmit Color is bright blue.



Transmit Color

This only applies when Double Sided is on. This sets the transmit color which could be different than the diffuse or back color. This is ignored if Transmit Gain is zero. This effect is useful for thin objects like leaves or paper. Below there's a light placed in the interior of the object and some interior text can be seen as light transmits through the surface.


 Specular Parameters

Specular, Rough Specular, and Clear Coat Parameters

The specular parameters control specular reflection. This is where you might define how shiny or reflective an object is. Is it plastic, a polished marble table, or  is it a mirror? The Rough Specular lobe below this has identical settings and effects.

There's also the option for Artistic and Physical controls. The Artistic controls allows you to manually alter the properties of the reflection to match your tastes. Using Physical (with provided presets) can provide you with a matching real-world response for those looking to duplicate reality without endless tweaking.


Enable

Off by default, but if on, these settings override the other layers unless masked out.


Face Color (Artistic Mode)

Specular color at facing angle (0 degree incidence). Note that there is no separate gain control. To control the specular "gain", simply adjust the color value or connect it to a PxrExposure node. Below are different choices including textured at roughness 0.25.



Edge Color

Specular color at the glancing angle (90 degree incidence). To control the edge specular "gain", simply adjust the color value or connect it to a PxrExposure node. Below are different choices including textured at roughness 0.25. The Fresnel Exponent is also reduced here to make it more obvious.


Understand that this control changes meaning in the Physical Mode and operates as a multiplier for the reflection result in Physical mode. You can control reflection intensity and even tint the result using this parameter in Physical Mode. Below we used black, 50% grey, and white.




Refractive Index (Physical Mode)

This is a parameter meant to describe a physical refractive Index; the dielectric index of refraction for the material. Channel values for this parameter typically lie in the range 1 - 3. Since we support 3 color values to capture the spectral effect presets may be preferred over color pickers to avoid lots of tweaking.


Extinction Coefficient (Physical Mode, not available for Clearcoat)

Extinction Coefficient is a second refractive index for the material useful for characterizing metallic behaviors. Channel values for this parameter typically lie in the range 1 - 3. Since we support 3 color values to capture the spectral effect presets may be preferred over color pickers. When 0, the material reacts as a dielectric (glass). When non-zero, the material responds as a conductor would. Since this is based on physical values you should the presets more helpful than manual tweaking of settings. Below are presets for Copper, Gold, and Nickel.



Roughness

Specular roughness. A greater value produces rougher or "blurry" specular reflection. At 1.0 it resembles a diffuse surface and at 0.0 it's a perfectly clear reflection. Most objects will be realistic somewhere in between these values. Texturing this value may give you interesting effects like smudges, greasy fingerprints, and worn surfaces. Below are examples from 0.0 to 0.5 and finally 1.0 (diffuse).



Anisotropy

Controls the shape of the specular highlights and reflections. 0 means isotropic which produces the regular circular specular highlight. Values from -1.0 to 1.0 produce the range of ellipses (stretching) from wide to tall.

By default, the direction of anisotropy is controlled by the model texture parameters. If the Shading Tangent is specified, it is used instead. Below are examples of -1.0, 0.0, and 1.0.


Bump

Normal to use for the specular illumination. If this is not set, it will use the global bump normal specified in the Properties near the bottom of this page.



Rough Specular

Identical Specular parameters except it has a larger default roughness which is 0.6. This layer is intended for use with higher roughness settings than the Specular lobe above. Below from left to right: Rough Specular, Specular, both lobes combined.


Layer Thickness (Physical Mode)

This control simulates a thick coating or glaze on the material. It can be textured to vary color as well. Below the shading ball has been given a bump on the Diffuse lobe only, making the effect of thickness more obvious for usage. The first two images are thickness 1 and 3 using the same Absorption Tint to show that thicker settings absorb more light physically. The last image is textured thickness using a checker pattern.



Absorption Tint (Physical Mode)

This parameter controls the color of the resulting attenuation or coating, note that the thickness parameter above may change the look, where thicker settings are more saturated or absorb more light. Below are two solid colors and then a ramp, thickness remains constant at 1.0 The underlying diffuse lobe has a bump applied to it to help simulate the "thickness".



 Iridescence Parameters

Iridescence

Iridescence is a view-dependent scattering of light that causes a color shift. This is the same effect responsible for the color swirl on a soap bubble, peacock feathers, or a shiny beetle. "Holographic" or color shifting paint uses this effect as well.


Enable

On by default, but if off, the next lowest layer (or base) lobe is used.


Face Gain

Iridescence gain at facing angle (0 degree incidence).



Edge Gain

Iridescence gain at the glancing angle (90 degree incidence).



Primary Color

This is for Artistic mode only.

Iridescence primary color on the hue wheel to start from. From here the color shifts through the other available hues between the Primary and Secondary Color. The closer on the color wheel your choices, the fewer colors will be rendered. Below are three examples beginning at Red, then Yellow, and finally Green. The color bar shows what colors are available between these choices.



Secondary Color

This is for Artistic mode only.

Iridescence secondary color on the hue wheel to end. As demonstrated above you can use this to limit the colors rendered. Below are three examples where the Secondary Color goes from Violet to Blue and finally to Green. The hue bar shows this change on a ramp.


Roughness

Iridescence roughness, this is like other roughness parameters where you can go from a mirror-like reflection at 0.0 to diffuse reflection at 1.0. Below are examples, left to right, of 0.0, 0.5, and 1.0. Softer looks are reminiscent of color changing makeup and similar powders.



 Fuzz Parameters

Fuzz Parameters

This parameter introduces a bit of retroreflection and helps simulate fabrics, fuzz, and fine powder.


Enable

On by default, but if off, the next lowest layer (or base) lobe is used.


Gain

Fuzz weight. Higher numbers increase this effect. Below the Cone Angle is set to 16.



Color

Fuzz color. This simulates a soft velvety-like effect. This is applied "on top" of the previous Specular lobes and may resemble dirt or fine dust. Below the Cone Angle is set to 16.



Cone Angle

Fuzz roughness (corresponding to Marschner R cone angle). Note that we use something from Marschner's hair model here. This helps to simulate a similar response to hair/fur. Higher numbers increase the effect at facing angles. Below are values 8, 16, and 32.



Bump

Normal to use for the fuzz illumination. If this is not set, it will use the global bump normal specified in the Properties near the bottom of this page.



 Subsurface Scattering Parameters

Subsurface Scattering Parameters


Enable

On by default, but if off, the next lowest layer (or base) lobe is used.


Gain

Subsurface scattering weight. Higher numbers increase the visibility of the subsurface scattering.



Color

Subsurface scattering color.



Mean Free Path Distance

Subsurface scattering mean free path distance (mfpd). This specifies how far the light travels inside an object and as a consequence how smooth the subsurface scattering is. This gets multiplied by the unit length set in the Properties section. Higher amounts make the object appear less opaque and more translucent as well as increase noise. Small amounts make the surface look diffuse and it may be more efficient to turn off the effect (0.0 Gain) if it's not visually important. Below we change the values from 8 to 16 and then 32. Notice how the sphere and pedestal become "softer" and more translucent. Your render times might also increase at high values due to noise generated by translucent objects.



Mean Free Path Color

How far the light travels in the Red, Green, and Blue spectra. This is scaled by Mean Free Path Distance. Different colors may spread more or less and provide interesting effects like the red color bleeding into shadow edges on skin. The RGB values correspond to how far the light travels in that color band. For example, and RGB value of 0.8 0.65 0.5 means Red spreads furthest at 0.8, then Green and finally Blue traveling the least distance in the object scatter result. Below we've taken out the center sphere and replaced it with a bright disk light at the back of the outer sphere. Note that the sphere and pedestal share the same material and lighting plays an important role in your result.

This option is not available when using Multiple Mean Free Paths as it uses the short to long color options instead.



Post Tint

Tint that is applied at the end of the subsurface computation. Below on the left is a normal render and on the right a very light blue tint is added. If we want to apply the tint before the subsurface computation, set Irradiance Tint in the Properties section.


Multiple Mean Free Paths Description


Multiple Mean Free Paths operates differently than the others in a few significant ways. For most cases you will be happy with the results of the other models. However, there are instances where the user may want a non-physical way to control the colors of the scattering. The Mean Free Path Color in many models uses the supplied RGB value to determine the color scatter as noted in the parameter description. This means your result may have color shifts that are not desirable. Let's say you supply a textured color of RGB 0.51 0.28 0.31 which is a pink color. The scattering result will also include the green (0.28) and blue (0.31) responses. The Multiple Mean Free Paths model maintains the pink color. Below is an example using this scenario illustrating the differences. The texture is connected to the Color and Mean Free Path Color of the Jensen Dipole and to the Short and Long Colors of the Multiple Mean Free Paths model in addition. Note the color shift on the Jensen model (Left) while the Multiple Mean Free Paths version maintains the colors of the texture at all depths where connected.



Short Gain

Short subsurface gain or weight. This is only valid for Multiple Mean Free Paths subsurface model.



Short Color

Short subsurface color. This is only valid for Multiple Mean Free Paths subsurface model. Above uses Red as the chosen color.


Long Gain

Long subsurface gain or weight. This is only valid for Multiple Mean Free Paths subsurface model. Operates the same as Short Gain.


Long Color

Long subsurface color. This is only valid for Multiple Mean Free Paths subsurface model. Operates the same as Short Color.


Short MFP Distance

Short subsurface mean free path scalar distance. Below we go from 16 to 24 and finally 32.



Long MFP Distance

Short subsurface mean free path scalar distance. Below we go from 16 to 24 and finally 32.



Transmit Gain

This only applies when Double Sided is on.  Instead of using the Subsurface Gain for controlling the intensity of the subsurface transmission, we use the Transmit Gain.  If it's 0.0, then the effect is off.


 Single Scatter Parameters

Single Scattering Parameters

Single scatter is a simple and inexpensive effect for scattering effects. Below a disk light is placed inside the model (for all of these examples) and we render using no diffuse color and again with a default middle grey diffuse color.



Enable

On by default, but if off, the next lowest layer (or base) lobe is used.


Gain

Single scatter gain or weight.



Color

Single scatter color.




Mean Free Path

Single scattering mean free path scalar distance. This specifies how far the light travels inside an object and as a consequence how smooth the single scattering is. This gets multiplied by the unit length set in the Properties section. Larger values are more translucent. This is similar to the Subsurface controls.



Mean Free Path Color

How far the light travels in the R, G,  and B spectra. This is scaled by Mean Free Path Distance.



Directionality

Single scatter directionality:

0 : isotropic (no effect).

1 : forward scatter which is more light on the backside.

-1: backward scatter which is more light on the front side.

Refractive Index

Single scatter index of refraction. Below are 1.3, 5.0, and then 10.0



Blur

Blur strength for single scatter. This polygonal plane as some text behind it. Increasing the blur causes the text to appear blurrier (and darkens the result some). You may think of this as roughness for scatter transmission.



Backside Direct Illum Gain

Gain for direct illumination from the other side. This increases the influence of backside illumination.



Direction Tint

Tinting color for the Backside Direct Illum Gain. Below uses different colors to tint the result from the first image, which is white.



 Glow Parameters

Glow Parameters

Glow can make an object appear to emit light. This is useful when you need a textured effect like lit panels, circuitry, lava, or other complex effects with local influence in lighting.

This is not an efficient way to light a scene and would require indirect bounces to be at least 2 to be effective. We recommend this as a textured effect and not for actual lighting.

Enable

On by default, but if off, the next lowest layer (or base) lobe is used.


Gain

Glow gain or weight. Below we go from the default grey material and increase the gain (using white color) to 0.5 and then 1.0.



Color

Controls the incandescence color, or glow, of the material. Below are various examples of textured inputs to the Color parameter.


 Glass Parameters

Glass Parameters

Glass parameters are meant to provide a single location for creating and manipulating a physically based glass result. Anything from clear to colored glass with all levels of roughness and fog in-between are available.

Enable

On by default, but if off, the next lowest layer (or base) lobe is used.


The Refraction and Reflection Gain controls are meant to work together. Using one or the other alone may result in interesting effects but isn't intended by design. Also note that when creating glass for the first time, you will find the default gain of 1.0 for Diffuse may interfere with your look. Turn the gain for Diffuse to 0.0 for pure glass.



Refraction Gain

Refraction gain is a multiplier. Lower numbers result in less light making it through the object and might appear as dark tinted glass or simply black at 0.0.



Reflection Gain

Reflection gain is a multiplier. Low numbers decrease the visible reflection result. A setting of 0.0 results in an unrealistic look as seen in the first image below.



Refraction Color

Refraction color. This allows you to create objects that are realistically colored and have colored shadows just like real transmissive objects (note that Thin Shadows should be enabled on your lights).



Roughness

Refraction and reflection roughness. Here is where you would simulate frosted or etched glass.



Refractive Index

Index of refraction. The default is 1.5 which is typical of glass. Online resources of Ior values can provide more useful settings. Higher Ior values bend rays more than low values. Use Thin if you want to avoid bending rays.



 Global Properties Parameters

Properties Parameters

This section provide global controls for the entire material. For example, if a Bump is only supplied here, it applies to all the above lobes. Presence is also a global parameter that will mask out or "cutout" all the lobes as-if the object isn't present where the mask has a value of 0.0

Bump

Normal/Bump to use for all lobes unless it is overridden by the individual lobe's bump normal.