Join / Forgotten your password?
 
HomeFeaturesStoreForumsWikiWorkshopsJobsPortfolioGalleryEvents Members
 
> CGWiki Home       > Community Portal       > Current Events      > Recent Changes     > Random Page       > Join       > Support Forum       > Help     
 

SL

RenderMan Shader Language is a programming language that is used to describe how objects, lights and environments look when a Renderman scene is being rendered. In Renderman there are five different types of shaders - Surface, Displacement, Light, Volume and Imager. Some shaders can be relativly simple, while others can be highly complex and allow a wide range of controls. This large degree of customization allows an artist to use different shading models and methods for the final rendered image. In a sense RSL are mini programs that the renderer uses to create the final image, as opposed to some other 3D programs that do not allow as much customization to materials.


This is an example of a simple surface shader:

/* Copyrighted Pixar 1989 */
/* From the RenderMan Companion p.337 */
/* Listing 16.4  Surface shader for a plastic appearance */

/*
 *  plastic(): give the appearance of a plastic surface
 */
surface 
RCPlastic( 
	float	Ks			= .5, 
		Kd			= .5, 
		Ka			=  1, 
		roughness		= .1; 
	color	specularcolor		=  1 )
{
	point Nf = faceforward(normalize(N), I );
	point V = normalize(-I);
	
	Oi = Os;
	Ci = Os * ( Cs * (Ka*ambient() + Kd*diffuse(Nf)) + 
	 	specularcolor * Ks * specular(Nf,V,roughness) );
}

Shader Types

  • Surface Shaders - Describe the appearance of surfaces and how they react to light.
  • Displacement Shaders - Describe how surfaces wrinkle or bump.
  • Light Shaders - Describe the directions, amounts and colors of illumination distributed by a light source in a scene.
  • Volume Shaders - Describe how light is affected as it passes through a medium such as smoke or haze.
  • Imager Shaders - Describe color transformations made to final pixel values before they are output.

References

External links