Writing RenderMan Shaders

User support for JPatch

Writing RenderMan Shaders

Postby squirrelhavoc » Mon Oct 31, 2005 1:35 am

I don't know if this belongs in Support, if not I am truely sorry.

Does anyone know of a good website/tutorial that is a primer for writing renderman shaders? I have some documents ive found on the net, but they arent much help.

Thanks
Squirrel Havoc

We live as we think, very very slowly....
squirrelhavoc
 
Posts: 180
Joined: Tue Jun 28, 2005 11:17 pm
Location: Oklahoma, USA

Postby dcuny » Mon Oct 31, 2005 3:59 am

RManNotes is probably the best site I've found.

You might also want to look at The Renderman Academy and The Renderman Repository.
dcuny
 
Posts: 2902
Joined: Fri May 21, 2004 6:07 am

Postby rjh » Mon Oct 31, 2005 4:51 am

There's also a handy free application called Shaderman.

http://www.dream.com.ua/thetool.html

This approaches shader writing from a visual / logic based point of view, and comes with many pre-packaged shader "bricks" that one can start from when writing their own.

Rob
rjh
 
Posts: 179
Joined: Thu Dec 30, 2004 10:33 pm

Postby sascha » Mon Oct 31, 2005 10:11 am

If you are familiar with POV-Ray, there's a tool called pov2rib. It's quite old and it doesn't support all features of recent POV-Ray versions. It used to be on http://www9.informatik.uni-erlangen.de/ ... lg/pov2rib, but unfortunately this link is dead. If anybody knows where it can be downloaded, please let me know.

It did not only convert the geometry to RIB, but also built RenderMan shaders from POV-Ray texture definitions. Now shaders are far more flexible than POV-Ray textures, but for me it was a way to become familiar with shader language. You could write a simple texture with POV-Ray (e.g. wood, marble, clouds, etc.) and then convert it into an SL program.


And here's the auxilary materials for the book "Advanced RenderMan: Creating CGI for Motion Pictures", containing all the shaders from the book.
sascha
Site Admin
 
Posts: 2792
Joined: Thu May 20, 2004 9:16 am
Location: Austria

Postby pndragon » Mon Oct 31, 2005 6:08 pm

There is a lot info here: http://www.fundza.com/

This site is home page for Cutter, a free RIB editing tool written in java. You can also download a .pdf book about using MacRenderMan which, though dated, is very useful to a newbie. (I know!)

There are also many tutorials on many different aspects of using the RenderMan Specification... I haven't had time to read everything that is available on that site.

The source materials for the "RenderMan for Beginners" book are available here:
http://www.smartcg.com/tech/cg/books/RfB/download/contents/index.html.

Download and look at the Lecture notes from this site. If you use 3Delight, this site also has the basic ARMan shaders rewritten to work
better with 3Delight.

--- Jim
pndragon
 
Posts: 591
Joined: Sun Dec 05, 2004 1:27 am
Location: North Carolina

Postby squirrelhavoc » Tue Nov 01, 2005 10:11 pm

Thanks for all the info. Now on to another question: How can I use shaders with jpatch? Either with the animator or exported rib files
Squirrel Havoc

We live as we think, very very slowly....
squirrelhavoc
 
Posts: 180
Joined: Tue Jun 28, 2005 11:17 pm
Location: Oklahoma, USA

Postby dcuny » Tue Nov 01, 2005 10:52 pm

In the tree view, open the Materials turner, and you can see the materials that have been created for your model. Select a material from the tree and click the Edit button, and the Material Editor will appear. There, you can change the various settings of the material: red, green, blue, filter, etc.

Under those sliders, you'll see, you'll see that there are three tabs: POV-Ray, Renderman and Inyo. By default, the POV-Ray tab is selected. If you choose the Renderman tab, you can see the default template that JPatch will use to create that material. This shader is basically the default "plastic" Renderman shader:
Code: Select all
Color [$r $g $b]
Opacity [$opacity]
Surface "plastic" "Ka" [$ambient] "Kd" [$diffuse] "Ks" [$specular] "roughness" [$roughness]
The parameters (such as $r and $opacity) are filled in from the values you set the sliders to.
You can enter your own shader code here (using the parameters instead of actual hard-coded numbers), and JPatch will automatically combine it with the parameters and create that as the material shader when you render using Renderman.
dcuny
 
Posts: 2902
Joined: Fri May 21, 2004 6:07 am

Postby sascha » Wed Nov 02, 2005 10:03 am

As David pointed out, you can change the default shader in these tabs. For RenderMan, you can set the parameters (either directly or with one of the variables from the sliders like "$diffuse" and the shader name. The renderer must be able to find a compiled shader with that name in it's shader path. Note that you can not enter Renderman shaderlanguage code in JPatch!
If you'd like to write a custom shader you'll have to do it in an external editor and compile it with the tools the renderer provides.

For POV-Ray, you can either use a material or texture name that has been defined elsewhere (e.g. in an .inc file that has been included with an #include directive somewhere) or you can directly insert POV-SDL code here (which I do not recommend because there is no syntax checking).
sascha
Site Admin
 
Posts: 2792
Joined: Thu May 20, 2004 9:16 am
Location: Austria

Postby rjh » Wed Nov 02, 2005 7:51 pm

Sascha wrote:

... there's a tool called pov2rib ... If anybody knows where it can be downloaded, please let me know.


I contacted Christian Vogelgsang, and he stated that he no longer supports pov2rib, but he did provide a very useful link to where the source can be obtained. That link is:

http://www.rburkett.com/media/download/ ... -versions/

If you navigate up to the ".../download/pov2rib/" location, you can also obtain code that has been updated by "r burkette" (a 1.0.1 version).

Soooo, there you have it. I hope that this is useful.

Rob
rjh
 
Posts: 179
Joined: Thu Dec 30, 2004 10:33 pm

Postby sascha » Wed Nov 02, 2005 8:09 pm

Thanks a lot for that link Rob!
sascha
Site Admin
 
Posts: 2792
Joined: Thu May 20, 2004 9:16 am
Location: Austria


Return to Support / Help

Who is online

Users browsing this forum: No registered users and 1 guest

cron