How do you get a illuminance statement into Shader Builder?
DollyGirl
Posts: 2,656
I want to add the following statement
illuminance(P,Nf,PI) {
.......
}
into Shader Builder but I can not find a illuminance block to set up. I see the inverse statements, illuminate and solar. Is it called something different in Builder than illuminance or is there something fancy I need to do to get the statement into the shader?
Comments
AFAIK...no there isn't.
You'll probably have to import a standard rsl code shader containing it and then strip out everything else and save it as a user macro...or build in the code editor and save it as a user macro.
I was poking around in the sample shaders and found that DZPower uses a default macro called GI, which contains the illuminence statement. From what you said I could possibly use it and modify?
Yes you can do that. You can also do a new macro by right clicking in the Block Repository on either Function->User or Macro->User and selecting New Function (or Macro), then name it and set it up with input and output variables, and dump your illuminance code in the bottom window (middle tab, "Initialization Code", usually, for Macros).
Thank you ReDave. I did try the GI Macro and I got it to work. That was the last piece I needed and now I have the Mike King Gooch shader working! I am so proud of me. My plan is to use it for a tutorial for a beginner non-programmer person. Hopefully I can pass on my experiences of how I figured out how to use the Builder. I could not find anything at all that helped a newb understand the workings. I still don't understand everything but I will keep after it and continue to play with the Builder. I will create a new macro as you have suggested and see if it still works.
Below is a Blue Grey preset I created with the shader.
Wow...I like that one. I got a couple of other gooch shaders working, but none of them used the illuminance code.
I guess I'll have to make an illuminance block, too.
I've been playing around with ShaderLink and meShaderEd...
https://github.com/ymesh/meShaderEd/wiki
http://code.google.com/p/shaderlink/
Both of them are like standalone ShaderBuilder apps for general rsl shaders.
meShaderEd seems to include a lot more of the RSL functions/code in easy to use brick form.
I haven't had the time to really sit down and try to get anything from one of them into DS...but it shouldn't be too hard.
Well thank you for the like and the links. I have about 16 presets made up using the shader.
This is where I got Mike King's shader if you want to see what I used:
http://www.renderman.org/
At the top of the page you click on shaders then Shaders from SIGGRAPH Course Notes then Mike King Shaders.
If you want the receipe for the grey then go here and there are the receipes for Takeo's MKGooch shader. His shader performs just a little differently then mine. He is better at this then me so I suspect that he tweaked Mike's code just a little bit.
Below is a sampling of the presets.