|03 March 2012||#1|
Join Date: Mar 2012
RSL book example bad illum loop?
Im on page 240 of Rudy Cortes' book The Renderman Shading Language Guide. The rest of the book has been really informative and every example has worked. However, I've been struggling with this one for the past week. And unfortunately, it doesnt work and the rest of the chapter seems to build on it. Im using 3delight studio pro 10.
I'm using an ambient light with a hdr hooked along with a provided teapot and the surface shader that the books specifies. The book also claims that you can use the parameter __nonspec to control the specularity from the light on the teapot surface shader. If I use another surface shader it works (but the nonspec doesnt work because i've been told that you need to make a custom illum loop)
Unfortunately, I just get a flat shaded image. Just reading the code I dont see any reference to diffuse like in the shaders before. However, they build on this shader a lot and the same exact code is given in the download section for the book.
If I cant get this to work within the next day Im going to probably switch books until I figure out more about illuminance loops and then switch back. I'm concerned with WHY this isnt working at all, if its a renderman versus 3delight thing?, and if it is broken, why does it appear in print and download and why do they build on it?
What I'm getting vs what I should be getting.
The illumination loop header
Last edited by bergj : 03 March 2012 at 01:25 AM.
|03 March 2012||#2|
Wichita, United States
Join Date: Jul 2006
The problem, basically, is that Pixar ignores their RenderMan spec, while 3Delight follows it. In PRMan, the predefined variable "N" is the same in both surface and light shaders. However, the RenderMan spec states that in a light source shader, "N" should return the shading normal of the emitting object (which is undefined except for area lights). 3Delight adds a predefined variable "Ns" to get the shading normal of the illuminated object.
So to fix your light shader, replace "Ns" with something else, and "N" with "Ns".
|03 March 2012||#4|
Join Date: Sep 2003
Thread automatically closed
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.
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
|Thread Closed share thread|