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.



So for this assignment, we had to attempt 4 of the 6 shaders in Renderman.
Also, we weren't allowed to use red. I chose this blue-ish color
because I liked it.


if(s<=t)
surfcolor = tint;


if ((s-.5)*(s-.5) + (t-.5)*(t-.5) <.05)
surfcolor = tint;


if (t >=0.3 && t <=0.7 || s >=0.3 && s <=0.7)
surfcolor = tint;


if (t >=0.2 && t <=0.8 && s >=0.2 && s <=0.8)
surfcolor = tint;



if ((s-.5)*(s-.5) + (t-.5)*(t-.5) <.05)
surfcolor = tint;
if ((s-.7)*(s-.5) + (t-.5)*(t-.5) <.03)
surfcolor = color(1.0,1.0,1.0);



if (((s*s) + (t*t)) < 1)
surfcolor = tint;



Here is my Ultraman-inspired custom shader!

//background
if(t >= topEdge && s >= leftEdge)
surfcolor = color(0.874,0.101,0.0);

//red corners
if (sqrt ((t-.3)*(s-0.3)) <=0.18)
if (sqrt ((s*.3)*(t*0.3)) <=0.2)
surfcolor = color(0.764,0.796,0.8);

//diagonal
if(t >= s && t-.1 <= s)
surfcolor = color(0.874,0.101,0.0);
if(-t >= -s && -t-.1 <= -s)
surfcolor = color(0.874,0.101,0.0);

//silver curves
if ((s-.8)*(s-.8) + (t-.4)*(t-.4) <.05)
surfcolor = color(0.764,0.796,0.8);
if ((t-.8)*(t-.8) + (s-.4)*(s-.4) <.05)
surfcolor = color(0.764,0.796,0.8);

//red swoop
if (sqrt ((t-.4)*(s-0.4)) + .29 <=0.3)
if (sqrt ((s*.7)*(t*0.7)) <=0.3)
surfcolor = color(0.874,0.101,0.0);

//circles
if ((s-.4)*(s-.4) + (t-.4)*(t-.4) <.07)
surfcolor = color(0.764,0.796,0.8);
if ((s-.4)*(s-.4) + (t-.4)*(t-.4) <.05)
surfcolor = color(0.223,0.564,1.0);
 

Copyright 2008
Best viewed in Mozilla Firefox.