T h e   R u s t   S h a d e r

The rust shader represented on this page was created with the Renderman Shading Language, and the use of Photoshop created color channels. This is meant to be a shader that can manipulate color channels into the appearance of rust on a car paint.

 

 

Step 1::  Getting Started, forming a plan

     The picture shown above is my reference photo for a rusting car.  It shows the brownish-orange color as a stage of rust, as well as a nasty corrosion around the edges of a fairly large hole.  Also, if you look closely, you'll be able to pick out a few bits of chipped paint.

 

 

  The first attempts at this project was to create the appearance of rust based off of sine waves.  After a few attempts at the sine waves, I ended up taking a completely different path.

  

  I found that it was much easier for myself, and any other user, to just create a quick colored map of where for where the erosion and rust should appear.  The idea was that any area painted red would create a rust colored effect that would be based off of the intensity of the red.  This makes the appearance of the rust adjustable easy for any artist.


Colored Map


First Attempt map to shader translation


Second attempt, with use of smoothstep, 
and the addition of a displacement.

     Once the second attempt had a decent render, I knew it was time to start the actual shader.

 

Step 2::  Making the Pieces

     Now that there's a plan, the next step is putting it in action.  The image to the left displays a layered effect of all the pieces I made.  Here is a list of what each block is (from bottom to top)

 

1.)  A medium gray polyplane with nothing on it but the basic plastic surface shader.

2.)  The Color Map. 
      The color map is set up based on the images channels.  Channel [0], the red channel, indicates where the rust color should appear on the surface shader, based on the intensity of the red; this channel also indicates a small percent of erosion on the displacement shader.  Channel [1], the green channel, indicates where the surface shader should be completely transparent, representing an hole, or extreme erosion.  Channel [2], the blue channel, indicates where the displacement takes in full effect, showing the eroded areas of the rust.  It is advised that the artist creates these erosions particularly where the holes were created in order to render out a more believable rust effect.  The black area's in the map indicate where the original surface (before rust) should appear.

3.)  The Rust Surface.
      This is a surface shader created from the use of the Red and Green channels in the Color Map.

4.)  The Displacement.
     This is a displacement shader created from the use of the Blue channel in the Color Map.

5.)  The Car Paint Surface.
   This is a quick car paint shader I put together by tweaking the numbers in the vase shader.  The car paint shader information can be found in the top half of the final surface shader; here is a better image of it's appearance (second to the left).

6.)   The combination of the rust surface and the Displacement to make a rust effect.

7.)  The composting of the rust overtop of the car paint.

 

 

Step 3:: Putting it all together

     A friend of mine, Paul Bush, already had a model of a car door I could use to experiment with for my shader.

Maya Polygon Model Wire frame

  Unfortunately, I had encountered a detail problem with using polygons with my shader.  So I tested the current map on all three types of geometry, to find the the second test prevailed over Polygons and Nurbs.

 
Polygon Surface Subdiv Surface Nurbs Surface

 

This is the color map I created by painting in the channels of the image.  I also found it helpful to create a 4th channel (labeled channel [3]), to create a map for where the paint and rust should have chipped off.

Red Channel Blue Channel Green Channel Alpha Channel
Channel [0] Channel [1] Channel [2] Channel [3]

    Time for the breakdown...

 

Color Map Original Model (converted to subdiv) Car paint Surface
Rusty Surface  Displacement  Final, with new Paint-chip channel
     
   
 

Me goofing off with a 'trogdor' rust map

 

Full Surface Shader Source Here
Full Displacement Shader Source Here

 

 

     
     
     

 

 

Copyright Jennifer Kate Green © 2008