Warning: Use of undefined constant BloggerRedirector_Use301 - assumed 'BloggerRedirector_Use301' (this will throw an Error in a future version of PHP) in /homepages/27/d651581989/htdocs/digital-vfx.co.uk/wp-content/plugins/blogger-redirector/blogger-redirector.php on line 19

Warning: Use of undefined constant GFCI_MEMBER_WIDGET - assumed 'GFCI_MEMBER_WIDGET' (this will throw an Error in a future version of PHP) in /homepages/27/d651581989/htdocs/digital-vfx.co.uk/wp-content/plugins/google-friend-connect-integration/gfcintegration.php on line 26

Warning: Use of undefined constant GFCI_LOGIN_WIDGET - assumed 'GFCI_LOGIN_WIDGET' (this will throw an Error in a future version of PHP) in /homepages/27/d651581989/htdocs/digital-vfx.co.uk/wp-content/plugins/google-friend-connect-integration/gfcintegration.php on line 27
Secondary outputs

Secondary outputs

Rudy over at renderman academy has already given an excellent run through of this, but theres no harm in doing another run through, in particular what you need to put in the 3delight UI for it to work.

First thing I modify the shinymetal shader.

surface
shinymetal(
float Ka = 1;
float Ks = 1;
float Kr = 1;
float roughness = .1;
string texturename = “”;
float samples = 1;
float blur = 0.0;
float specularcolor = 1;
float Kd = 1;
output varying color Cdif = 0;
output varying color Cspec = 0;
output varying color Crefl = 0;
)
{
normal Nf;
vector D, V;
color Cr;
Nf = faceforward(normalize(N), I);
V = normalize(-I);
D = reflect(I, Nf) ;
D = vtransform( “world”, D);
/* Initialise outputs */
Cdif = Cs * Kd * diffuse(Nf);
Cspec = specularcolor * Ks * specular(Nf, V, roughness);
Crefl = Kr * color environment (texturename, D, “samples”, samples, “blur”, blur );
if( texturename != “”
)
{
Cr = Kr *
color environment(
texturename, D, “samples”, samples, “blur”, blur );
}
else
{
Cr = 0;
}
Oi = Os;
Ci = Cs * (Ka * ambient() + Ks * specular(Nf, V, roughness) + Cr);
Ci *= Oi;
}

The amendments are the information that 3delight needs to read from the shader for it to render out the additional information. By adjusting the layers in Photoshop or whatever, you can see how many more options there are.
The top is straight out, the bottom one with secondary.

Leave a Reply

Your email address will not be published. Required fields are marked *