PDA

View Full Version : begin to learn shader wiritng for renderman


luxkoo
01-16-2012, 12:31 AM
Hi,


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?

Thanks!

earlyworm
01-19-2012, 04: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 (http://www.amazon.co.uk/RenderMan-Shading-Language-Guide/dp/1598632868) specifically covers RSL and is fairly recent so covers stuff like BRDFs, raytracing, subsurface scattering and global illumination. Advanced Renderman (http://www.amazon.co.uk/Advanced-RenderMan-Creating-Pictures-Kaufmann/dp/1558606181)is a bit older and contains less of the new features - is more of a general guide to Renderman.

http://www.amazon.co.uk/RenderMan-Shading-Language-Guide/dp/1598632868

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

http://www.fundza.com/

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

http://www.renderman.org/RMR/Publications/index.html

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.

AJ1
01-21-2012, 12:14 AM
Thanks for the insight Will.

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

-AJ

luxkoo
01-23-2012, 11:53 PM
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)

earlyworm
01-25-2012, 11:30 PM
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 myshader.sl is the name of your shader)...

"%DELIGHT%/bin/shaderdl" myshader.sl

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.

http://www.3delight.com/en/uploads/docs/3delight/3delight_11.html

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

rendermaniac
03-17-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
http://www.amazon.com/Essential-Renderman-fast-Ian-Stephenson/dp/1852336080

Rendering for Beginners: Image synthesis using RenderMan
http://www.amazon.com/Rendering-Beginners-Image-synthesis-RenderMan/dp/0240519353/ref=pd_cp_b_3

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

http://accad.osu.edu/~smay/RManNotes/

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

Simon

ThE_JacO
03-18-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.

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

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

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

noizFACTORY
03-19-2012, 05:25 AM
You might be interested in this training series as well :
www.amazon.com/dp/B006AVV6RY

I would definitely recommend it. And the thread for this series :
www.3delight.com/en/modules/PunBB/viewtopic.php?id=3283

gawl126
03-19-2012, 07:53 AM
You might be interested in this training series as well :
www.amazon.com/dp/B006AVV6RY (http://www.amazon.com/dp/B006AVV6RY)

I would definitely recommend it. And the thread for this series :
www.3delight.com/en/modules/PunBB/viewtopic.php?id=3283 (http://www.3delight.com/en/modules/PunBB/viewtopic.php?id=3283)

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

CGTalk Moderation
03-19-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.