Renderman shader scripting is a complicated process so here are some links that could help you on your way. I also have my scripts and work from when I was in Savannah College of Art and Design. M. Kessen was my professor and had alot of useful tools like his program he wrote Cutter. His site www.fundza.com and I suggest checking out. |
![]() |
|---|---|
| Here are some of my old class room work while I attended SCAD. |
|
Matrix assignment 1 - demonstrates the basics of scripting shapes directly into RenderMan RIB file. Coding shapes in this way focuses attention on the use of color, opacity and the fundamental concepts related to xyz coordinate system. TransformBegin
Rotate 90 1 0 0
Torus 1.0 .03 90 360 360
TransformEnd
TransformBegin
Scale .1 .1 .1
Translate 10 0 0
Sphere 1.0 -0.5 0.8 360
TransformEnd
TransformBegin
Rotate 90 0 1 0
Torus 1.0 .03 90 360 360
TransformEnd
TransformBegin
Scale .1 .1 .1
Translate 0 10 0
Sphere 1.0 -0.5 0.8 360
TransformEnd
TransformBegin
Scale .1 .1 .1
Translate -10 0 0
Sphere 1.0 -0.5 0.8 360
TransformEnd
TransformBegin
Scale .1 .1 .1
Translate 0 -10 0
Sphere 1.0 -0.5 0.8 360
TransformEnd
====================================================== |
![]()
===================================================== |
#LightSource "pointlight" 1 "intensity" 25 "from" [1 4 1] LightSource "pointlight" 1 "intensity" 10 "from" [3 -4 3] #LightSource "pointlight" 1 "intensity" 25 "from" [-1 -2 -3]
LightSource "pointlight" 1 "intensity" 25 "from" [1 4 1] #LightSource "pointlight" 1 "intensity" 10 "from" [3 -4 3] #LightSource "pointlight" 1 "intensity" 25 "from" [-1 -2 -3]
#LightSource "pointlight" 1 "intensity" 25 "from" [1 4 1] #LightSource "pointlight" 1 "intensity" 10 "from" [3 -4 3] LightSource "pointlight" 1 "intensity" 25 "from" [-1 -2 -3] ====================================================== |
Lighting assignment 2- shows the results of several (not-so-simple) lighting exercises. Light sources were specified directly in a RIB file with the intention of altering a veiwers perception of the "mood" and/or scale of a cluster of simple plain white objects. Particular attention was given to camera placement, framing and the general composition of the objects in the scene. as a side note to turn off a line of scripting hit # also the numbers in the "[ ]"'s are in order of [x y z] for the coordinates
All together
LightSource "pointlight" 1 "intensity" 25 "from" [1 4 1] LightSource "pointlight" 1 "intensity" 10 "from" [3 -4 3] LightSource "pointlight" 1 "intensity" 25 "from" [-1 -2 -3]
===================================================== |
Level of Detail "LOD" assignment 3 - The animations on this assignment demonstrate the support offered by RenderMan for LOD. Three models of a gumball seed were made in Maya. Using LOD the renderer chooses the appropriate model to use based on the area of the screen space occupied by the model.
Scale .15 .15 .15
AttributeBegin
Detail [-.5 .5 -.5 .5 -.5 .5]
Color 1 0 0
DetailRange [ 1 1 5 50 ]
ReadArchive "lowrez.rib"
Color 0 1 0
DetailRange [ 5 50 200 400 ]
ReadArchive "midrez_1.rib"
ReadArchive "midrez_2.rib"
Color 0 0 1
DetailRange [ 200 400 4000 4000 ]
ReadArchive "highrez_1.rib"
ReadArchive "highrez_2.rib"
AttributeEnd
====================================================== |
high - medium - low
As a side note 50 blocks were replaced with the models to show the change in them as it chooses. This script also helps saves on rendertime and is quick and easy to do.
===================================================== |
if( s/t >= .9 && t/s >= .9 )
surfcolor = color (1.0,0.0,0.2);
if( s*t >= .2 && t*s >= .2
if( s/t >= .9 && t*s >= .2 ) ====================================================== |
ST Coloration assignment 4 - These images show the results of using the RenderMan Shading Language (RSL) to write a veriety of special effects surface shaders. The note and RSL code accompanying each image explain how each effect was achieved.
if( s >= .3 && t >= .3 && s <= .7 && t <= .7 ) surfcolor = color (1.0,0.0,0.2); if( s <= .1 && t <= .1 ) surfcolor = color (1.0,0.0,0.2); if( s <= .1 && t >= .9 ) surfcolor = color (1.0,0.0,0.2); if( s >= .9 && t <= .1 ) surfcolor = color (1.0,0.0,0.2); if( s >= .9 && t >= .9 ) surfcolor = color (1.0,0.0,0.2);
===================================================== |
Maya Pattern Animation assignment 5 - The animation and notes explain how custom shaders written in the RSL can be animated using SLIM parameter expressions.
Lerp(.1,.9,$pct) on my extentions
This is just another exapmle of the same thing but i wanted to try it on some thing 3d and moving to feel out the next effect.
====================================================== |
With RenderMan and Maya you have to keep your textures in the square uv mapping area for it to render any texture.
This just shows how to put your scripting in. It must be a TCL script. ===================================================== |
And this is the shadow map for the main flood light. I kept its every frame frequency, yet changed the map res down to 128, the pixel sample to 4, and the normal sample to 9. This was all in efforts of boosting up the rendering time in Alfred.
This is the lighting change node that i applied this lerp to. It changes the color.
====================================================== |
Maya Lighting Animation assignment 6 - The animation and notes explain some aspects of applying RenderMan light sources to Maya animations. Also I was bored of doing plain work so i made a eye ball kind of wiggling around to keep me interested. These are also just 2 different versions of using lights. I learned much later to adjust the bias to get rid of the grainyness.
This is just the normal flood light settings. I didn't change anything from the defaults.
Finally since I had started using more of the GUI I desided to show you what the work area for linking up nodes looks like. If you ever worked with nodes befor this is pretty basic. ===================================================== |
You can see the blending I did with the bump to make these changes.
images used
Finally the lerp used to switch over time. :P ===================================================== |
Nature Mort assignment 5 - shows the results of applying a custom surface shader using the GUI in Maya. It's practice is making the illusion of decay and rotting. I went with lettuce for time sake.
closer veiw
finished
geometry animation
time laps I shot but it goes really quick
Showing how I combined them in the nodes GUI
===================================================== |
Slim Templates advanced assignment 1 - slime enables artists to interactively create shading networks. Unlike most other systems Slim also allows custom nodes to be created programmatically. The assignment shows several custom nodes and explains how they were created.
freeBars ( this is the focus gradient circle code. freeCircle (
Just checking some more stuff trying some marble and whatever
and for this final part i just wanted to make it look good. ====================================================== |
here is a little bit of frequency change and i messed around a little for the blend just checking to see if it works correctly and after a while of messing around with the code it came out pretty good.
this is me trying to change the colors to a turbulance and fractal just seeing what i can do with this. it has some nice color change effects.
this is me messing around once again to make sure everything is working and fine.
it was interesting to me to see that color two didn't move with the freqency.
===================================================== |
this is the finished product of my slim shader I was writing.
Ci = Oi * Cs * surfcolor * (envcolor + trueLightColor
+ fakeLightColor +
DoublefakeLightColor +
TriplefakeLightColor - tint);
This really changes the look of the one from the right to the one above.
//========This Calculates a layer of noise With this code i basically looped it so that way it would seem to be bumpier and less like an image. so i did multiple noise displacements. one with a swirl challenging s and t then i did 2 normal bumps and the original no bump. with all finish it looks like this right Here is the finished code in a txt file.
===================================================== |
Vase advanced assignment 2 - Surface and displacement shading techniques can make the geometry that represents a real world object appear far more complex than its true underlying form. This assignment shows the development of a shader(s) that exhibits a non uniform response to light. The shader(s) also provide a viewer with the illusion that the surface of anobject - in this instance a vase - has a rich sub-surface texture.
This Part of the code makes it so you have color changes thoughout the vase but what i didn't like about it was the really bright colors so instead of adding the tint to the end i tried different math equations to make it more suttle or mistic this was the out come. tint = spline(dot, color(0,0,1), color(0,0,1),
P = ToldP;
==================================================== |
Falling Water Droplets advanced assignment 3 - This assignment provides a technical breakdown of an animation sequence of a rain drop hitting a hard surface. It has less to do with Renderman but was still interesting. I didn't know how to use particles at the time so nurbs were my best shot.
Reference video
So i went thru and pushed and pulled the points out and keyframed as I went along.
this ended up being my final version. The Tcl expression just wasn't for me. =================================================== |
This is a playblast of me trying to do it in 2d version of a blood droplet and then using a revolve.
This is with a Tcl Expression that adds blobies to the veticies of the revolved Curve converted to pollies from here. http://www.fundza.com/mtor/rib_box/ribbox4/ribbox4.html but it didn't really look right so i was thinking i should just shape it myself.
================================================== |
this script is in the rib box [ set raw [cycle $pct 2] set rem [remap $raw .02 1.0] return [getColor $rem 0.5 .2] ] and then I sourced my utilities in a TCL box and sourced this proc getColor { r g b } {
return "Color $r $g $b\n"
}
proc cycle { input repeats } {
return [expr
(sin($input * 3.14159 * 2 * $repeats) + 1) * 0.5]
}
proc remap { input min max } {
set range [expr $max - $min]
return [expr $range * $input + $min]
}
====================================================== |
TCL Scripting advanced assignment 4 - this is a Tcl scripting showing how this language can be utilized in renderman TCL boxes or RIB boxes.
not so cool but its scripting!
===================================================== |
Final Project advanced assignment 5 - this final is to try making a high quality model that could actually be used in the industry.
This is the layout i did for the uv's. I was worried about have a bad quality to the bump so i made my image size in photo shop 2000x2000 pixels.
I tried to use a mid tone so i could add further detail in the bump map. Just something i picked up from all those drawing classes. And then i used a stain glass filter in photoshop.
These are the shaders i manipulated to have such an outcome. I was eager to try the skin shader for sometime! So i got to see how it is effected by the lights in the scene. I think it turned out really well.
but up really close the skin bump looks even finer up close. kind of reminds me of the dinosaur from Toy Story... not bad i was only 7 years behind the greatest 3d. lol
====================================================== |
this was the final version
now you can see with the midtone i was able to add slight details on the top of the head. you can also see where they are in the image to the left.
now to get the model to look right and not split appart these settings in the mtor combine was the only way to have this slight bump.
this is how the skin looks with this displacement setup. It has a reall soft look!
this was the final test to see with bones in it how the displacement reacted... not bad It would be better if i was better at rigging I think.
===================================================== |
| I hope this gives you some kind of idea where to go. Now here are those links to help you on your way. | |
LINKS: |
The work of Mark Matta
e-mail: freepupet@yahoo.com phone: 586-219-2368