SLIM's CORE FUNCTIONS


The Core Set of Functions

The core set of functions provided by Slim can be used to generate a wide range of shaders which utilize many different special features of Slim. These core functions generally serve one particular purpose, like creating a simple noise or a pattern. The functions by themselves are not always useful and must be connected to other functions to obtain a meaningful result, but the atomic nature of functions affords a great deal of flexibility when it comes to assembling shading networks.

COLORS

A color function calculates a color at every point.  Texture maps can be connected into your networks as functions that calculate colors.

Build Color

   Define a color space and build a color from scratch.

Collect Reflections

   Environment lights will be used for reflection.

Collect Refractions

   Environment lights will be used for refraction.
Color Adjust    Quickly alter the coloration of other colors.
Color Cells    A cell pattern.
Color Correct    Adjust the colors of other colors.
Color Invert    Take a color … and invert it.
Color Ramp    A ramp generator.
Color Spline    Map a color ramp onto floats.
CombineColors    Three ways to combine two colors.
CombineColor List    Build multiple layers for a color, which can be added to, subtracted from, or multiplied by the base color.
Diffuse    Returns Kd.
Environment Map    Generate reflections for objects.
Environment Map Plus    Generate reflections and refractions.
FloatToColor    Connect a float to a color connection menu.
Fractal    A color fractal.
Image File    Add an image.
Indirect Illumination    Create ray traced global illumination effects.
Marble    A marble pattern.
MixColors    Blend to colors together.
Noise    A color noise.
Occlusion Map    For reading in an ambient occlusion map.
Prim Var    Access primitive variables.
Reflection Map    Create a reflection for a flat surface.
Ray Trace    Create arbitrary traces.
Ray Traced Messaging    Create fancier arbitrary traces.
Ray Traced Shadows    Generate ray traced shadows.
Remap    Basic color remap. (See also Color Correct.)
RSLVarsC    A visualizer for shading language “globals”.
Shadow Map    Generate a shadow map
Specular    Returns Ks.
Surface Color    Returns color specified in RIB file.
Surface Opacity    Returns opacity specified in RIB file.

BuildColor

Description: Build colors from the ground up, by defining a color space and setting corresponding values.

Color Space
This is the color space to interpret incoming colors in. The result is always in RGB space. Other choices offer controls for Hue and Saturation then differ only in intepretation of Brightness/Value/Luminance.

R|H
Set the Red or Hue component, according to the space defined above.

G|S
Set the Green or Saturation component, according to the space defined above.

B|Y|V|L
Set the Blue, Brightness (Y), Value, or Luminance component, according to the space defined above.


CollectReflections

Description: Collects reflections for the purpose of adding to a base shading model. This function assumes that there's an environment light shining on the same surface.

Refractive Index
Sets the Refractive Index of the surface material. The higher this value, the more reflective the surface will be.

Kr
The overall intensity of the reflection. You can use this to modulate the reflection intensity over the surface.

Edge Kr
The intensity of the reflection when you're looking edge-on to the surface. Due to fresnel effects, this is always 1 in “reality,” but you can adjust this to your liking.

Center Kr
The intensity of the reflection when you're looking perpendicular to the surface. When set to 0, the physically correct reflection response will be produced. Due to fresnel effects, when the Refractive Index is less than 1, this will be lower than it is at the edges. Setting this to other than 0 allows you to set this amount of the reflection directly.

Roughness
The relative roughness of the surface. This will change the blurriness of the reflection.


CollectRefractions

Description: Adds refraction to a shading model. This function assumes that there's one or more environment lights shining on the same surface.

Refractive Index
Sets the Refractive Index of the material.

Kr
The overall intensity of the refraction. You can use this to modulate the intensity of the refracted image.

Roughness
The relative roughness of the surface or diffusion of the material. This will change the blurriness of the refracted image.


ColorAdjust

Description: A simple method to adjust your colors.

 Input
Use this to connect a color function that you wish to adjust.

 Saturation
0 -> black & white image, 1 -> input image, greater than 1 -> more color.

MidPoint
Used in the contrast adjustment. When contrast is set to 0, the result is this grayscale value.

 Contrast
0 -> Pure Midpoint, 1-> input image, greater than 1 -> more contrast.

 Clamp
The result is clamped if clamp is 1, unclamped if the result is 0, and a mix between clamped and unclamped for intermediate values.

 Tint
Filters the result through the specified color.


ColorCells

 Frequency
The number of cells.

Average Color
Defines the base color from which the cells will vary.

Color Variation
Controls the range of colors around the average color. Setting this to zero results in constant coloring.

manifold
Use manifold to define the color in shader space.


ColorCorrect

Description: Color correct an image or adjust colors.

Input
Attach a color here that you want to remap.

Hue Offset
The amount to shift the Hue by. You'll likely want to use very small numbers here. Seriously, we're talking tiny. Diminutive digits.

Saturation Offset
The amount to shift the Saturation by.

Luminance Offset
The amount to shift the Luminance by.

Center
This defines the center - the average color - about which the following range adjustments take place.

Hue Range
Scales the Hue range.

Saturation Range
Scales the Saturation range.

Luminance Range
Scales the Luminance range.


Color Invert

Description: Invert one or more components of a color in your favorite color space. 

 Input
Connect a color here.

Invert Channel N
Invert one, some, or none of the incoming channels.

Color Space
Define the shader space here: RGB, HSY, HSV, or HSL.


ColorRamp

Description: A color ramp generator that can used for all sorts of neat and mundane effects.

RampType
Choose a ramp style. All styles use every color knot, except 4 Corner which uses only 4 knots (knots 1-4, counting from 0). Since our interpolation is performed with a cubic spline, 4 knots are the minimum. Using the custom ramp UI, the first and last values are automatically repeated. You can place up to 30 knots in your ramp (32 if you count the typically repeated end-knots).

Tile
Causes the pattern to repeat.

Ramp Colors
The number of knots in your ramp. Since we're using cubic splines to interpolate colors, a minimum of 4 are required. Normally you'll want to repeat the first and last knots.


ColorSpline

 Pattern
Choose a pattern to remap through this spline.

Spline Color
The number of knots in your spline. Since we're using cubic splines to interpolate colors, a minimum of 4 are required. Normally you'll want to repeat the first and last knots.

 


Combine Colors

Description: Combines two color functions in interesting ways.

Combine Method
Choose Intersection, Union, or Difference.

f1
Pick a color or make a connection for the first member of the combination.

f2
Pick a color or make a connection for the second member of the combination.


Combine Color List

Description: Combines multiple color functions in still more interesting ways.


Diffuse

Kd
Multiplier for the diffuse light contribution.

Coloration
Adjusts the tint of the diffuse light contribution.


EnvironmentMap

Description: Calculates reflection effects based on a single environment map. Note that this effect is local and doesn't interoperate with Environment lights. If you want global control across all shiny surfaces we recommend you use CollectReflection and CollectRefraction shading models.

Environment Map

Coordinate System
A coordinate system for your environment map. When used with maps generated from the attached object, use \"world\". If you wish to independently manipulate the orientation of your reflection, enter the name of a coordinate system object here.

Right Handed
Used to correct the reflection direction to account for a right-handed coordinate system. Maya, for example, uses right-handed coordinate systems.

Up Correction
Used to correct for the discrepancy between the up direction of the map and your coordinate system. If the default option (None) fails, try the other settings starting with Y->Z and Z->Y.

Refractive Index
Sets the Refractive Index of the surface material. The higher this value, the more reflective the surface will be. Generally the value should be greater than 1, but you can set the Refractive Index to zero to ignore fresnel effects that cause the intensity of a reflection to vary with the reflection angle.

Kr
The overall intensity of the reflection. You can use this to modulate the reflection intensity over the surface.

Reflection Blur
Blurs the reflections.

Coloration
Determines the tinting of the effect.

Environment Filter
The color of the surface. The greater the amount of Coloration, the more this color will effect the reflection.



EnvironmentMapPlus

Description: A more powerful version of EnvironmentMap that supports variable environment sizes and fake refraction effects. Generally this power makes a shader more difficult to control. You should only need to use this function if you need fake refraction effects or need greater control over the size of your environment. Calculates reflection and refraction effects based on a single environment map. Note that this effect is local and doesn't interoperate with Environment lights. If you want global control across all shiny surfaces we recommend you use CollectReflection and CollectRefraction shading models.

Environment Map

Coordinate System
A coordinate system for your environment map. When used with maps generated from the attached object, use \"world\". If you wish to independently manipulate the orientation of your reflection, enter the name of a coordinate system object here.

Right Handed
Used to correct the reflection direction to account for a right-handed coordinate system. Maya, for example, uses right-handed coordinate systems.

Up Correction
Used to correct for the discrepancy between the up direction of the map and your coordinate system. If the default option (None) fails, try the other settings starting with Y->Z and Z->Y.

Radius
The size within the coordinate system of a sphere representing your environment map. To get more reflective variation across flat surface, decrease this value.

Refractive Index
Sets the Refractive Index of the surface material. The higher this value, the more reflective the surface will be. Generally the value should be greater than 1 but you can set the Refractive index to zero to ignore fresnel effects that cause the intensity of a reflection to vary with the reflection angle.

Kr
The overall intensity of the reflection. You can use this to modulate the reflection intensity over the surface.

Reflection Blur
Blurs the reflections.

Kt
The overall intensity of the refraction. You can use this to modulate the refraction intensity over the surface. This value has no effect if the Refractive Index is set to 0.

Refraction Blur
Blurs the refractions.

Refraction Surface
Faking refractions can be tricky. This parameter controls where the refraction calculations are performed. When set to "Both," the refraction calculations are performed independently on front and back facing sides. This may not be acceptable for closed surfaces because you'll see the accumulation of two independent refraction lookups. The physically correct solution requires a single refraction lookup that results from a ray being bent twice: as it enters and then leaves the object. When set to "Front," the refraction is only calculated on front surfaces. The problem with this approach is that you'll either need to make your surface opaque, whereby the refraction reveals the insides of the object, or you'll get an odd effect of a combination of the refraction with whatever is behind your object. When set to "Back," refraction calculations are performed as the ray leaves your object. In this mode we recommend that you vary the opacity of your object such that the front faces are transparent and the back faces are opaque.

Coloration
Determines the tinting of the effect.

Environment Filter
The color of the surface. The greater the amount of Coloration, the more this color will effect the reflection.


FloatToColor

Float Connection
Attach a float that you want to hook into a color connection menu here.
ca
Specify any type of coloration here.


Fractal

Description: Color Fractal function.

Layers
The number of noise layers used.

Frequency
Sets the lowest (starting) frequency of the noise layers.

Lacunarity
The scaler used to determine the frequency of each sucessive layer of noise. Smaller numbers will cause the layers to be more closely spaced in frequency. Larger values will space them further apart.

Dimension
The frequency exponent. This value is used to scale the magnitude of each sucessive layer of noise using the formula

1/f^(3-2*Dimension)
, where f is the frequency of the noise being used for a given layer. It is called Dimension because this value relates to the fractal dimension. Bigger values are rougher, smaller values are smoother.

Erosion
The frequency exponent range. The frequency exponent specified by the Dimension is itself offset as a function of the noise magnitude. This value adjusts that offset. This determines the so-called \"crossover scale\" of the fractal. 0 gives a uniform appearance. Negative values will smooth out the low valued areas, and positive values will smooth the high valued ones.

Erosion Measure
The measurement value used to determine what the Erosion will effect. For Gray, it's how far away from gray the color is.

Variation
This value controls which particular variation of the appearance you get - without altering the qualities of the appearance determined by the other controls. So, for example, you can use this to animate the appearance by connecting this to Time, or create several unique instances of the appearance by setting this to different values.

Manifold
Set the shader space here.

ImageFile

 File
Choose an image file.

S Filtering
The amount to overfilter in the S direction. 1 is standard filtering.

T Filtering
The amount to overfilter in the T direction. 1 is standard filtering.

Color Bias
A normalized gamma correction factor. Values greater than .5 lighten the result, values less than .5 make it darker.

Color Gain
Gain is used to favor dark area when less than .5 or light areas when greater than .5

Manifold
Set the shader space here.


Indirect Illumination

Description: The Indirect Diffuse parameters provide controls for achieving indirect illumination effects like color bleeding and global illumination. Indirect Diffuse captures the indirect illumination on any point of any given surface by sampling the hemisphere with a multitude of rays. The shaders associated with the first intersecting primitives are evaluated and this process continues recursively for a number of indirect bounces. In practice, a single bounce is usually sufficiently to capture these effects.

Make Photon Map
You can calculate certain indirect illumination effects with photon maps. This control hides a number of additional controls over the photon map generation process.

Ambient
Provides an additive “floor” for the indirect illumination.

Indirect Strength
Provides a multiplicative effect for the indirect illumination.

Tint
Provides a coloration to the indirect illumination.

Color Bleeding 
Enable this to calculate color bleeding effects. For faster rendering, disable this to get indirect occlusion (shadowing) only. When enabled, each hemispherical sample that hits a surface will run the shader. Since running shaders every time a sample hits a surface can be expensive, color bleeding can be disabled so that only indirect occlusion is evaluated (whether or not a sample hits a surface) which is much cheaper. However, if this parameter is disabled, then the Max Distance should be set to a reasonable number.  

Samples
Specifies the number of samples for the gathering of indirect illumination. Because the region of interest is so large, we must gather a comparatively large number of samples - and this is why these effects are so expensive. Typically, you'll need at least 256 samples to achieve high quality images.

Trace Subset
Trace Sets can be used to define what objects a shader will consider for ray tracing calculations. Careful use of Trace Sets can not only be extremely efficient, it can also be used for special effects, by specifying which objects are visible to any given collection of objects. Manage Trace Sets using the familiar Maya sets, with an added Trace Set attribute. 

Max Distance
A control for the overall depth of an object. Increasing this value increases how for light penetrates an object. This value is measured in world units. 

Environment Map
Specifies the name of an environment map to consult when samples fail to intersect geometry. When a ray doesn't hit any surfaces it can sample an environment map. This setting can be used quite effectively with Max Distance. 

Manifold
Determines where the ray is shot from. CurrentPoint is usually the ticket.

Normal
Determines in what direction the ray bounces when hitting a surface. Hint: try the surface normal.
 


Marble

 MarbleColor
Set the color.

MarbleVeining
Increase or decrease amount of marbling.

Manifold
Define the shader space here.


MixColors

Description: Mixes two colors according to the given percentage.
A percentage of 0 results in Color 2

Color 1

Color 2

Percentage of Color 2


Noise

frequency
Increasing this value increases the amount of noise.

manifold
Set the shader space here.


Occlusion Map

Description: Evaluates precomputed occlusion data in the form of 2d textures maps or 3d occlusion cache files. Occlusion can be precalculated via the OcclusionMapGen work generator then accessed within your shader networks using this template.

Occlusion Map
The name of a texture map containing 2D baked occlusion data (presumably created in a previous baking pass via "make occlusion map"). The name of the file is based on the camera pass that created it, so you'll need to enter that name as the argument of the occmap function. Leave this field empty if you'd like to rely entirely on the Occlusion Cache (.ocf) file.

Occlusion Cache
The name of your ocf file created in a previous rendering pass. The name of the file is based on the camera pass that created it so you'll need to enter that name as the argument of the occmap function. Leave this field empty if you'd like to rely entirely on the Occlusion Texture file.

Environment Map
When an object is unoccluded you can color it with an evironment map.

Environment Space
A coordinate system for your environment map. When used with maps generated from the attached object, use "_world_lefthanded" or "world". If you have an arbitrary lat-long environment use "_environment". If you wish to independently manipulate the orientation of your reflection, enter the name of a coordinate system object here.

Environment Strength
The overall intensity of the environment. You can use this to modulate the reflection intensity over the surface.

Environment Tint
Use this to filter environment map colors.

SurfaceNormal
The direction determining ray probes.

Manifold
The space in which the rays are executed.

 


Prim Var

Description: Allows you to incorporate primitive variables into shader networks.

Primitive Variable
Enter the name of your color primitive here. Note that this cannot be an expression.

Multiplier
A multiplier for the underlying vertex variable.


Ray Trace

Description: Allows you to incorporate a trace call into your surface shader.

Ray Origin
Determines where the ray is shot from. CurrentPoint is usually prudent.

Direction 
Determines in what direction the ray bounces when hitting a surface. 

Filter
Map the result of the trace to this color.

Samples 
For obtaining higher quality when blurring reflections. Controls the amount of rays sampled at any given point. Higher samples increase the quality of the blur, but render slower. Lower samples render faster and are useful for preliminary images. 

Sample Base
This setting affects how much the rays are jittered from a point, and can be useful for antialiasing type effects.

Blur
You can create interesting effects by blurring trace operations. Increase this setting to get more blur, or connect a function here for special effects. Remember when creating blurry reflections you'll also want to increase the "Samples" parameter to at least 4. Larger blurs require more samples.

Trace Set
Trace Sets can be used to define which objects a shader will consider for ray tracing calculations. Careful use of Trace Sets can not only be extremely efficient, it can also be used for special effects, by specifying which objects are visible to any given collection of objects. Manage Trace Sets using the familiar Maya sets, with an added Trace Set attribute. 

Ray Label
Allows you to associate a label with the rays. Shaders on intersected objects are able to query this label and perform label-specific calculations. You can think of this as message passing in the downstream direction. 

Max Distance
The maximum distance to consider when calculating ray intersections. Setting this parameter to a negative number is effectively equivalent to setting the distance to infinity. (And a lot easier, heh.) An appropriate Max Distance setting can significantly speed up a scene by only doing as much work as needs to be done. Those rays that don't hit anything can reference an environment map. 

Two Sided 
If your primitives have outward facing normals, you can speed up ray tracing by leaving this switch disabled. If you are missing reflections, turn this switch on.


Ray Traced Messaging

Description: Allows you to incorporate a trace call that shoots rays which can look up arbitrary variables in other shaders. With this function a ray can return arbitrary information about a surface, not just the color: anything from surface opacity, to ray length, to any arbitrary variables that you've added to the RSL of your shader templates.

Message Spec 
The name of the variable to look up. The shader variable name must be preceded by the RenderMan shader type and a color. For example, to look up the surface opacity of a ray intersection, use surface:Oi. To query the length of the intersecting ray, use ray:length.

Ray Origin
Determines where the ray is shot from. CurrentPoint is usually prudent.

Direction 
Determines in which direction the ray bounces when hitting a surface. 

Samples 
For obtaining higher quality when blurring reflections. Controls the amount of rays sampled at any given point. Higher samples increase the quality of the blur, but render slower. Lower samples render faster and are useful for preliminary images. 

Blur
You can create interesting effects by blurring trace operations. Increase this setting to get more blur, or connect a function here for special effects. Remember when creating blurry reflections you'll also want to increase the "Samples" parameter to at least 4. Larger blurs require more samples.

Trace Set
Trace Sets can be used to define what objects a shader will consider for ray tracing calculations. Careful use of Trace Sets can not only be extremely efficient, it can also be used for special effects, by specifying which objects are visible to any given collection of objects. Manage Trace Sets using the familiar Maya sets, with an added Trace Set attribute. 

Ray Label
Allows you to associate a label with the rays. Shaders on intersected objects are able to query this label and perform label-specific calculations. You can think of this as message passing in the downstream direction. 

Max Distance
The maximum distance to consider when calculating ray intersections. Setting this parameter to a negative number is effectively equivalent to setting the distance to infinity. An appropriate Max Distance setting can significantly speed up a scene by only doing as much work as needs to be done. Those rays that don't hit anything can reference an environment map. 

Two Sided 
If your primitives have outward facing normals, you can speed up ray tracing by leaving this switch disabled. If you are missing reflections, turn this switch on.


Ray Trace Shadows


Description:
Connect this to a light shader to create ray traced shadows. This function can be use to generate hybrid shadows, which use the efficiency of the shadow map in combination with the overwhelming visceral power of ray tracing.

Make Shadow Map
These optional controls allow the generation of a traditional Shadow Map, which then can be used in conjunction with the Ray Accelerator, for the creation of hybrid traced shadow maps.

Ray Accelerator
Parameters controlling the use of shadow maps in conjunction with ray traced shadows. This hybrid approach to shadows (using both shadow maps and ray traced shadows) utilizes the strengths of both types.

   Shadow Map
  
The name of a shadow map to guide/accelerate the ray tracer. You can refer to shadow maps with a tcl expression like: [shdmap $OBJNAME]. 

   Shadow Map Blur
  
The amount to blur the shadow map accesses. Larger blurs result in more ray tracing since it is only in the penumbra region that rays are traced. 

   Shadow Map Samples
  
The number of shadow map samples to evaluate. Generally a small number should suffice because the real work is done by the ray tracer. 

Samples 
The number of rays to shoot. Using more samples allows you to achieve better antialiasing or glossy and translucent effects. Using more samples also means slower rendering.

Sample Base
Specifies a multiplier on the jitter area of the ray origin. The default value is 1 which means that the origin is jittered within an area which is the size of the micropolygon. 

Blur
Controls the blurriness of your shadows by simulating an area light. Increase the number of samples to reduce noise. 

Bias
A shadow bias value for ray traced shadow probes. 

Trace Set
Trace Sets can be used to define what objects a shader will consider for ray tracing calculations. Careful use of Trace Sets can not only be extremely efficient, it can also be used for special effects, by specifying which objects are visible to any given collection of objects. Manage Trace Sets using the familiar Maya sets, with an added Trace Set attribute. 



Reflection Map

Description: Use Reflection Map to access planar reflections. This is generally useful for flat surfaces and is cool because it requires only a single additional rendering pass.

Reflection Map

Kr

Coloration

Scale Normals

Blur


Remap

Description: A utility node for adjusting colors.

Input

Bias
A normalized gamma correction factor.  Values greater than .5 lighten the result, values less than .5 make it darker.

Gain
Gain is used to favor dark area when less than .5 or light areas when greater than .5


RSLVarsC

Description: A visualizer for shading language “globals”.

State Variable

Bias
Select the variable (dPdu, dPdv, N, Ng, l, s,t, u,v, Cs, or Os).


Shadow Map

Context
Specifies the value of the CONTEXT global during the rendering of this element. The value of the CONTEXT global can be consulted by Adaptor appearances to choose context-specific appearance attachment.

Frequency
Controls how often you want to compute your shadow map. Usually you should choose "Every Frame" but if you know that the map's contents are invariant over a sequence, choose "Once Per Job"

Camera Name
The name of the camera from which to compute the shadow map. Normally this should be empty, but if you wish to compute a map from an non-attached object, enter its name here. 

Near 
The near clipping plane for the map calculation. When set to 0 the global near clipping plane is used.

Far
The far clipping plane for the map calculation. When set to 0 the global far clipping plane is used.

Map Resolution
Defines the size of the shadow map.

Objects in Map
Only objects in the Maya sets listed here will appear in the shadow map.

Laziness
Determines when to recompute the map.

Depth Filter
The algorithm for calculating shadow maps.

Shadow Type
Select Standard Shadows, Pyramid Shadows, or Deep Shadows. Deep shadows are larger and slower than Standard and Pyramid. But they do capture transparent shadowing effects for partially transparent and tiny objects.

Pixel Samples
Affects Deep Shadows only. The number of pixel samples in x and y for your shadow mapss. When using deep shadows, you will get better results with pixel samples greater than one. Otherwise 1 pixel sample is usually sufficient.

Motion Blur
Affects Deep Shadows only. Enables motion blur during shadow map calculation. Only enable this when computing deep shadow maps and only if you want blurred shadows.

Volume Interpretation
Affects Deep Shadows only. This parameter controls the deep shadow representation. If your objects have volume over which the opacity varies continuously you should specify Continuous. If your objects are thin sheets of material you should choose Discrete. 

 File
The name of your shadow map. You can refer to shadows with a tcl expression like: [shdmap $OBJNAME]

Samples
The number of samples to take of the map.  Use larger numbers when you need smooth blurring effects.

Blur
A control for the blurriness of the shadow.

Bias
Controls self shadowing artifacts of shadow algorithm. Set the bias to 0 if you want to use the default shadow bias. If your shadows are disconnecting from the bases of objects, try adjusting this value. The appropriate value is determine by the size of your objects, however in many cases, "0.03" may be a good starting point. 

manifold
Typically you'll want to connect this to CurrentPoint

Deep Shadow Example:

Refer to Deep Shadows: Semi-Transparency.


Specular

 Ks

roughness

Coloration


Surface Color

 


Surface Opacity

 


 


Pixar Animation Studios
(510) 752-3000 (voice)   (510) 752-3151 (fax)
Copyright © 1996- Pixar. All rights reserved.
RenderMan® is a registered trademark of Pixar.