|
|
|
Getting started with RenderMan
These exercises are designed to acquaint you with shading and lighting in the ATOR/RenderMan environment.
RenderMan and ATOR
RenderMan and Alias communicate via ATOR. A great deal of the work involved in shading and lighting involves the use ofsl, RenderMan's shading language. Usingslmay seem like a monumental task if you aren't very familiar with programming. That's ok. Input parameters for shaders are controlled from Glimpse (ATOR's shading interface). Tweaking these parameters to get a shader just right usually requires as much (if not more) work as writing the shader in the first place.
Compiling shaders
To use a shader, you must first compile it. Shaders are compiled with theshadercompiler:
prompt% shader my_shader.slThis will compile your
.slfile into a.slofile, ready for use in a scene.You might want to use the RenderMan Shader mode available for emacs, which provides some handy key-commands as well as context-based coloring. To do this, you'll want to copy (or symlink) the
.emacsfile we've set up:
prompt% cp /home/cse458/elisp/.emacs .To compile from within emacs, just type control-C, control-C.
Briefly:
.sl, .slo, .sli, .vma
.sl: this is the suffix forslsource..slo: this is the suffix for compiledsl..sli: a shading language interface file. This is where you can document the meanings of your shader's parameters for use within ATOR. Documentation on the .sli file format is available here..vma: this is the suffix for Looks. Looks, according to ATOR documentation, are "the next incarnation of shaders." They are robust shaders with lots of interface features and documentation. You can basically think of them as shrink-wrapped, marketable shaders. You likely will not write these for now.
What to do
Though this assignment won't be graded, it is pretty important that you do it to get used to working in this new environment.
- Do the ATOR tutorial. Copies of it are sitting in the animation lab.
- Read through The RenderMan Companion, chapters 14-16. Definitely skim through the Gallery of Shaders (chapter 16) to get a feel for how shaders work. These are also available online on the
slreference pages.- Compile some of the sample shaders from chapter 16. These are available in
/usr/local/prman/tutorial/ch16. Construct a simple scene in Alias (primitives are fine), and assign shaders to surfaces and lightsources. Render the scene.- Shade the scene again with your own shaders. Make sure that the shaders you design have input parameters that can be changed from Glimpse. (e.g. you should be able to change the frequency of the stripes/checkers/wood grain, or the colors involved in the shader).