View Full Version : begin to learn shader wiritng for renderman

01 January 2012, 01:31 AM

I have been using raytracers like mental ray through its front-end GUI in Maya for some years. Now I would like to deepen my understanding on shading and lighting through learning shader writing for renderman. I am totally new to shader writing and no experience with C/C++. I am wondering if you can shed some light on my questions below.

The Goal: learn shader writing to solidify my knowledge in shading, lighting, and rendering. (with the least amount spent out front to just get started)

1. How much knowledge in C/C++ do I need before I can actually get to learn RSL? Can I learn them in parallel?

2. The development environment? I am currently on Windows 7 and may migrate to Linux in the near future. What kind of applications do I need so I can code and compile shaders easily without spending a fortune.

3. What's the general workflow of writing and test-rendering the shader you write? (e.g. Save the .sl out of the editor -> complie it as .slo -> import the .slo into 3Delight or eval. version of Renderman for Maya maybe?)

4. Would you go with the free 2-thread 3Delight or Educational version of PRMan for this purpose?


01 January 2012, 05:57 PM
RSL itself isn't that difficult - if your familiar with Mel or C it should be fairly easy to get to grips with.

This is about the simplest shader you could write. All it does is render out the object as a constant colour (by default it's set to white).

surface simple_srf
color myColour = 1;
//Set the final oacity. Os is an attribute which you can attach to the geometry.
Oi = Os;
//Set the final colour and multiply it by the opacity.
Ci = myColour * Oi;

As far as learning materials go, the RenderMan Shading Language Guide ( specifically covers RSL and is fairly recent so covers stuff like BRDFs, raytracing, subsurface scattering and global illumination. Advanced Renderman ( a bit older and contains less of the new features - is more of a general guide to Renderman.

As far as web resources go, Malcolm Kesson's site is a really good resource.

Once you starting getting into things, the Siggraph Course Notes are a good source of information

The 3Delight 2-thread license is fine for learning. Get a text editor, save out the SL file, compile it, load it into Maya, hit render. Make changes to SL, compile it, hit render.

01 January 2012, 01:14 AM
Thanks for the insight Will.

I just started learning RSL as well. Thanks for taking some time to help us beginners!


01 January 2012, 12:53 AM
Thank you for the suggestions Will.

I am on Windows 7 x64. Would you recommend a compiler that is suitable for the workflow mentioned in your post? (editing .sl > compiler > Maya with 3Delight > modify the .sl in text editor)

01 January 2012, 12:30 AM
Glad to help. I'm trying to improve my shader writing skills at the moment so this is all the info I'm using at the moment. Realised I left off the example shader in the first post - it's there now.

As for compiling shaders. 3Delight uses shaderdl (it's under the 3delight/bin path) to compile shaders.

All you need to do is open up the windows commandline and navigate to the path where you keep your shaders and type something along the lines of (where is the name of your shader)...


It'll compile a .slo file, this is the one that you load into Maya via the 3Delight assignment panel. %DELIGHT% is an environment variable that 3Delight installs on your system (so that command sure work). It's better to use the commandline to compile shaders (rather than right clicking on the file in the windows explorer) as 3Delight produces errors and warnings which are impossible to catch without having the commandline constantly open.

03 March 2012, 08:57 AM
Any recommendation about IDE/text editor for shading language?

03 March 2012, 12:20 PM
I know quite a few people use Eclipse - but that's mainly because of it's integration with Source Control and it works well on Linux. Any text editor should do - if you want syntax highlighting C++ or C# are close enough and can be adapted easily if you need to.

You might want to also have a look at:

Essential RenderMan Fast

Rendering for Beginners: Image synthesis using RenderMan

and Steve May's rman notes are old, but walk you through quite a few basics and I found them very useful:

Advanced RenderMan is definitely highly recommended - if you only get one book get Advanced RenderMan.


03 March 2012, 12:05 AM
There's a workshop here on CGS starting again soon exactly on that subject. I would consider it in your place.
It might cost some cash, but as someone who has thaught programming and technical direction myself to quite a few people, and having had to learn both on my own and with the assistance of some brilliant people at work, at different stages and on different subjects, having someone knowledgable to help with the more frustrating trivialities that are often a bigger challenge than the discipline's core concepts, can shave off months from a learning cycle.

Not an answer to your questions, but something I wish was around when I first had to dig myself out of those ditches ages ago when I first started learning those subjects.

03 March 2012, 04:46 PM
Any recommendation about IDE/text editor for shading language?

Malcolm Kesson's Cutter from is a really good one.

03 March 2012, 12:02 AM
I use notepad++ with rib and rsl support.

03 March 2012, 05:25 AM
You might be interested in this training series as well :

I would definitely recommend it. And the thread for this series :

03 March 2012, 07:53 AM
You might be interested in this training series as well : (

I would definitely recommend it. And the thread for this series : (

Whoa nice! I didn't know about this. Thanks! I purchased the first chapter.

CGTalk Moderation
03 March 2012, 07:53 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.