Jump to content

Diffuse(nf)


mark

Recommended Posts

hi all,

im trying to convert the basic renderman shader here using VEX builder:

surface myshader(
                float Ka = 1;
                float Kd = 1;
                )
{
    /* Initialize variables */
    normal Nf = faceforward(normalize(N),I);

    /* output */
    Oi = Os;
    Ci = Oi * Cs * (ambient() * Ka + [b]diffuse(Nf)[/b] * Kd);
}

i can get the Nf, but there is no diffuse() VOP - so my diffuse colour is the normal map.

any ideas?

Edited by mark
Link to comment
Share on other sites

Another alternative is to use an illuminance VOP, and create you own custom diffuse (or any lighting model) VOP. When it's finished you can save it as an OTL, and use the VOP over again for custom shaders. I just finished this my self, so if you need any help, or would like me to post an example, let me know.

~MP

Link to comment
Share on other sites

Another alternative is to use an illuminance VOP, and create you own custom diffuse (or any lighting model) VOP. When it's finished you can save it as an OTL, and use the VOP over again for custom shaders. I just finished this my self, so if you need any help, or would like me to post an example, let me know.

Hi HyFrmn, if it isn't too much trouble, I'd greatly appreciate seeing an example ...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...