Lutojar Posted February 3, 2008 Share Posted February 3, 2008 Hi I'm starter in VEX try to build simple shader (based on rsl matte) surface matte( float Ka=1, Kd=1 ) { normal Nf; Nf = faceforward(normalize(N),I); Oi = Os; Ci = Os * Cs * ( Ka*ambient() + Kd*diffuse(Nf) ); } this shader use functions: faceforward(), normalize(), ambient(), diffuse() - where can I find implementation of these functions as nodes in VEX-builder Quote Link to comment Share on other sites More sharing options...
Lutojar Posted February 3, 2008 Author Share Posted February 3, 2008 and I don't understand - where is L variable? Quote Link to comment Share on other sites More sharing options...
aracid Posted February 3, 2008 Share Posted February 3, 2008 Hey man Place down an illuminance loop VOP, the variable is inside an illuminance loop VOP hope that works Quote Link to comment Share on other sites More sharing options...
Lutojar Posted February 3, 2008 Author Share Posted February 3, 2008 Thanks a lot!!!! it solve one my problem :notworthy: and question is open: where in VOPs i can find analogs of RSL functions such as ambient(), diffuse() I found some items - normalize() - normalize VOP faceforward() - Front Face VOP ( is it true?) p.s. I don't use Lightning model VOP because i want create it by myself to get more understanding VOP workflow Quote Link to comment Share on other sites More sharing options...
symek Posted February 3, 2008 Share Posted February 3, 2008 (edited) VOPs give you the best from these two worlds: easiness of nodes and flexibility of code. Thus not every function of RSL has an implementation in VOPs. Every time you feel like you need more, you can jump in Inline VOP and write a code. Besides that Lighting Model VOP gives you an access to both diffuse() and specular() components nicely packed together. If you look for a maximum power and flexibility of RSL, code is perhaps the best choice. Many people familiar with programming prefer to write a few lines instead of wiring nodes. Specially in case of many nested loops and "if-then" statements code tends to be more elegant. cheers, sy. Edited February 3, 2008 by SYmek Quote Link to comment Share on other sites More sharing options...
Lutojar Posted February 3, 2008 Author Share Posted February 3, 2008 :notworthy: :notworthy: :notworthy: :notworthy: :notworthy: :notworthy: :notworthy: YESSSSSSS big big big thanxxx!! Quote Link to comment Share on other sites More sharing options...
mark Posted February 5, 2008 Share Posted February 5, 2008 it sounds like you are happy with the inline vop but you may want to try a lighting model vop to get diffuse() etc. also i thought there were normalize and faceforward vops Quote Link to comment Share on other sites More sharing options...
Lutojar Posted February 5, 2008 Author Share Posted February 5, 2008 I have already build my own lightning model VOP, thanks for help Quote Link to comment Share on other sites More sharing options...
Lutojar Posted July 28, 2008 Author Share Posted July 28, 2008 I find this syntax of "for" loop in RSL shader: for( i = 0; i < 10; i += 1 ) { I understand about i = 0; init 10; - condition i += 1, - change but I have question - what mean "i <"? What that operator doing here? Quote Link to comment Share on other sites More sharing options...
TheUsualAlex Posted July 28, 2008 Share Posted July 28, 2008 hi. i think that's actually an html code for "<" sign. It's probably this: for( i = 0; i < 10; i += 1 ) Quote Link to comment Share on other sites More sharing options...
Lutojar Posted July 29, 2008 Author Share Posted July 29, 2008 ouuu.. so simple thanks Quote Link to comment Share on other sites More sharing options...
Lutojar Posted August 14, 2008 Author Share Posted August 14, 2008 (edited) question about mantra light shader I'm seeking analog for illuminate, or solar loops (RSL) in Vex (shaders for Mantra). Does VEX has these constructions? Can I use it in VEX builder? Edited August 14, 2008 by Lutojar 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.