s t    c o l o r a t i o n


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.

My Texture

The code

My texture doesn't have one set look. I try not to hard code any value in anything I do. I figure if I can allow the user or the artist to make it look how they like it best than I might as well try to allow them to do that. As to the texture itself it came from a question I asked myself. My question was a simple one: How do I get a trig wave along the diagonal? The answer took a long time to come to, but eventually it worked out. While tweaking the code I eventually came to this. From there I keep working it until I got the final images you see.

The Exercises

color surfcolor = tint2;

float arclen = (arc-1)/2;
float arclen2 = arclen*.1;

if(pow((s+arclen)-arclen2,2) + pow((t+arclen)-arclen2,2) < arc)
    surfcolor = tint;
color surfcolor = tint2;
if(pow((s-s1),2) + pow((t-t1),2) < arc)
    surfcolor = tint;
    surfcolor = tint;
color surfcolor = tint2;

if(pow((s-s1),2) + pow((t-t1),2) < arc)
    surfcolor = tint;

if(pow((s-s2),2) + pow((t-t2),2) < arc2)
    surfcolor =tint2;
color surfcolor = tint2;

if(pow((s-.5)*s1,2) + pow((t-.5)*t1,2)     surfcolor = tint;
color surfcolor = tint2;

if(s>= s1 && t >= t1 && s<=s2 && t<= t2)
    surfcolor = tint;
I did 5 out of the 9. This simply happened because it was taking me longer than I expected brainstorming.