rob Posted May 25, 2008 Share Posted May 25, 2008 Has anyone got any advice for adding export parms to shaders using vex code ? The help has not really helped ! . The code from an example Vop network gives me 3 main areas // labels #pragma label paintExport paintExport #pragma hint paintExport color #pragma hint paintExport invisible // declared as part of the shader export vector paintExport = { 0, 0, 0 }; export vector diffuseExport = { 0, 0, 0 }; export vector specularExport = { 0, 0, 0 }; export vector opacityExport = { 0, 0, 0 }; // bound value bound_paintExport = isbound("paintExport"); paintExport = product; I presume the bound value is the most important. I just dont know where to deploy this and in what context . Is there any chance I could have a simple example to look at. Rob Quote Link to comment Share on other sites More sharing options...
stevenong Posted May 25, 2008 Share Posted May 25, 2008 Hey Rob, The "export" call is it so in your code above, those 4 *Export parameters can be included in your render as deep rasters. Cheers! steven Quote Link to comment Share on other sites More sharing options...
rob Posted May 25, 2008 Author Share Posted May 25, 2008 Hi Steven, I know its used for exporting a parameter , but I dont see how I can add "export vector paintExport = { 0, 0, 0 };" then successfully use bound_paintExport = isbound("paintExport"); paintExport = product; when I have no value called product in my shader. I presume I could define any value to bound for export but so far with not much success in my code. rob Quote Link to comment Share on other sites More sharing options...
stevenong Posted May 25, 2008 Share Posted May 25, 2008 Hey Rob, You'll have to paste the entire shader code here so we can determine where product is defined. isbound() is used to check whether the geometry has the attribute. If the geometry has the attribute, use the attribute "bound"-ed and override the shader's parameter. From the VEX help docs: isbound vex function Parameters in VEX can be overridden by geometry attributes (if the attributes exist on the surface being rendered). Hope the above helps! Cheers! steven 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.