:// ST Coloration
These images show the results of using the RenderMan Shading Language (RSL) to write a variety of
special effects surface shaders. The notes and RSL code accompanying each image explain how each
effect was achieved.
|
Cross if (s > .3 && s < 0.7)   surfcolor = color(0.980,0.615,0.2); else   surfcolor = color(0.219,0.219,0.219); if (t > .3 && t < .7)   surfcolor = color(0.980,0.615,0.2); |
|
Circle if ((s-0.5)*(s-0.5)+(t-0.5)*(t-0.5) > 0.1)   surfcolor = color(0.219,0.219,0.219); else   surfcolor = color(0.980,0.615,0.2); |
|
Diagonal if((s + t >= 1))   surfcolor = color(0.219,0.219,0.219); else   surfcolor = color(0.980,0.615,0.2); |
|
Curve if(( s*s + t*t < 1 ))   surfcolor = color(0.219,0.219,0.219); else   surfcolor = color(0.980,0.615,0.2); |
|
Target I have a fondness for the British Target symbol. Creating this pattern gave me an understanding of layering patterns ontop of each other, in this case circles. if ((s-0.5)*(s-0.5)+(t-0.5)*(t-0.5) < 0.2)   surfcolor = color(0.007,0.176,0.623); else   surfcolor = color(0.219,0.219,0.219); if ((s-0.5)*(s-0.5)+(t-0.5)*(t-0.5) < 0.1)   surfcolor = color(0.988,0.960,0.960); if ((s-0.5)*(s-0.5)+(t-0.5)*(t-0.5) < 0.0375)   surfcolor = color(0.815,0.086,0.086); |
|
Custom Pattern After creating the target I decided to play with layering a little more by overlaying curves ontop of the original pattern. I also had to use and statements to draw the portions of the circle that are diced up by the curves if ((s-0.5)*(s-0.5)+(t-0.5)*(t-0.5) < 0.2)   surfcolor = color(.980,0.615,0.2); else   surfcolor = color(0.219,0.219,0.219); if ((s-0.5)*(s-0.5)+(t-0.5)*(t-0.5) < 0.1)   surfcolor = color(.219,0.219,0.219); if ((s-0.5)*(s-0.5)+(t-0.5)*(t-0.5) < 0.0375)   surfcolor = color(1.0,1.0,1.0); if(( s*s + t*t > .5 ))   surfcolor = color(0.219,0.219,0.219); if(( s*s + t*t > .6 ) && (s-0.5)*(s-0.5)+(t-0.5)*(t-0.5) < 0.2)   surfcolor = color(.980,0.615,0.2); if(( s*s + t*t > 1))   surfcolor = color(0.219,0.219,0.219); if(( s*s + t*t > 1.1) && (s-0.5)*(s-0.5)+(t-0.5)*(t-0.5) < 0.2)   surfcolor = color(.980,0.615,0.2); |