mark Posted July 17, 2007 Share Posted July 17, 2007 (edited) 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 July 17, 2007 by mark Quote Link to comment Share on other sites More sharing options...
Nico D. Posted July 17, 2007 Share Posted July 17, 2007 You can use the ligthing model with 0 specular and 0 ambient. Or use the "inline vop" and create your own diffuse node with the diffuse() vex function. Quote Link to comment Share on other sites More sharing options...
HyFrmn Posted July 17, 2007 Share Posted July 17, 2007 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 Quote Link to comment Share on other sites More sharing options...
mark Posted July 17, 2007 Author Share Posted July 17, 2007 thats great, thanks guys. i will have another attempt! Quote Link to comment Share on other sites More sharing options...
dee900 Posted July 21, 2007 Share Posted July 21, 2007 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 ... Quote Link to comment Share on other sites More sharing options...
HyFrmn Posted July 26, 2007 Share Posted July 26, 2007 I've attached an H8 and H9 version. It includes both a diffuse example as well as a phong example. I'm going to create a tutorial on how to build the shader. Hope this helps. ~MP illuminance_loop_H8.hip illuminance_loop_H9.hipnc Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.