View Full Version : Slim template and aovs

08 August 2009, 06:24 PM
Hi. I have a question. How to write custom surface shader template for slim. It is nesessary to include custom aov output like this:

surface mycustomshader(
color blabla = 1.0;
output varying color var1 = 0.0;
output varying color var2 = 0.0;
output varying color var3 = 0.0;
output varying color bla = 0.0;)
Ci = blabla;
bla = blabla;

Please, write for me simplest example.

08 August 2009, 03:16 PM
If you have access to the pixar forums, there are tons of examples there on doing this.

I havent had any sucess writting custom aovs into the template it self. What most people tend todo is modify:

And add your new aovs there.

nb: get a copy of cutter, it has template shading component that uses rms aovs


08 August 2009, 04:46 PM
parameter color var1 {
default {0 0 0}
access output
provider primitive
detail varying
display hidden

When adding AOVs to a template you need all the attributes defined above. Provider primitive makes sure the name does not get munged by Slim.

Also in the code you can't access them directly. You need to extern them first as (usually) you are in a function rather than the shader body.


CGTalk Moderation
08 August 2009, 04:46 PM
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.