Programming Models and Shaders (RenderMan) I






ST Coloration

Using my knowledge of the ST coordinate space (identical to UV in most every way) create an interesting pattern using the RenderMan Shading Language (RSL).



Final Design

Overview

Using knowledge of the ST coordinate space and the RSL, I created an intricate pattern to be introduced to shader development in RenderMan. I started by creating a variety of simple patterns and designs on a flat grid and then proceeded to use what I learned from those simple exercises and further experimentation to build the final design above. To see the different experiments and the RSL code associated with each of them, visit my RenderMan page for the full explanation.


Review

What I Learned/Challenges

- I learned about the ST coordinate space and how to build a design/pattern off of that.
- I learned how to write basic RSL code.

Future Improvements

- I would've liked to experiment further with RSL and ST coordinate space to learn how to create more diverse, and more applicable shaders.

Technical Breakdown/Extra Information



Visual Diagram Demonstrating the Values for the ST Coordinate Space


Content on this page requires a newer version of Adobe Flash Player.

Get Adobe Flash player


This is a Video Showing the Progress I Took to Create the Final Pattern Design Seen Above



Just For Fun, I Applied my Shader to my 3D DB5 Car Model Just to See What it Looked Like - it Wasn't too Pretty


Below is the source code I created for my pattern design:

color surfcolor = color (0.1,0.2,0.7);
color orng = color (0.8,sin(s),0);
color blu2 = color (0,0,cos(t));
float circ_size = 0.1;
float quad_slider = 1;
float squar_slider = 0.1;
float wave_freq = 3;
float wave_amp = 0.2;
float wave_move = 4;

// middle - bars
if ((s + t - 0.8) < 1 && (s + t - 0.6) > 1)
surfcolor = color (sin(s),0,0.2);
if ((s + t - 0.6) < 1 && (s + t - 0.4) > 1)
surfcolor = color (0.8,sin(t),0);

if ((s + t - 0.2) < 1 && (s + t + 0) > 1)
surfcolor = color (sin(s),0,0.2);
if ((s + t + 0.2) > 1 && (s + t + 0) < 1)
surfcolor = color (0.8,sin(t),0);

if ((s + t + 0.8) > 1 && (s + t + 0.6) < 1)
surfcolor = color (sin(s),0,0.2);
if ((s + t + 1) > 1 && (s + t + 0.8) < 1)
surfcolor = color (0.8,sin(t),0);

// top left - crescent/ellipse
if ((t + 0.1) * (t + 0.1) + (s+0.1) * (s - 0.6) < 0.15 &&
(t + 0.1)*(t + 0.1)+(s+0.1) * (s - 0.6) > 0.08)
surfcolor = color (1,0.8,0);

// middle - wavy diagonal
float wavy = sin(s * 2 * PI * wave_freq);
wavy = ((wavy + wave_move) * 0.5);
wavy = wavy * wave_amp;

if (t + s < wavy)
surfcolor = orng;
if (t - s > wavy)
surfcolor = orng;

// top right - arches
if ((sqrt(s * s) - pow((t * t),1)) > 0.7)
surfcolor = color (0.7,0.2,0);
if ((sqrt(s * s) - pow((t * t),1)) > 0.8)
surfcolor = color (0,0.2,0.6);
if ((sqrt(s * s) - pow((t * t),1)) > 0.9)
surfcolor = color (0.6,0.2,0);

// bottom left - square
if (t >= 0.7 && s <= 0.3)
surfcolor = blu2;

// bottom left - circle on square
if ((t - 0.85)*(t - 0.85) + (s - 0.15) * (s - 0.15) < 0.01)
surfcolor = color (0.8,cos(t),0);

Ci = Oi * Cs * surfcolor * Kfb;

---------------------------------------------------------

This class introduced using RenderMan and learning the RenderMan Shading Language (RSL). One of the requirements of the class was to create a website that detailed everything that was done and how one reached the end result. In order to reduce redundancy, to see the full, technical explanations, go to my webpage here [dead link]. I will go into some of the more major details of the project here for a broad overview.

Back to Top