boogiboy Posted August 5, 2009 Share Posted August 5, 2009 Hi guys. I'm trying to execute some parts of the shader based on image plane Vex variable. Basically for image plane with "specularExport" variable, I would execute only specular function, for "diffuseExport" - only diffuse, and so on. Any idea how to use those variable names inside shader? Thanks a lot Quote Link to comment Share on other sites More sharing options...
stevenong Posted August 6, 2009 Share Posted August 6, 2009 Hi there, Please go to the Material Palette, drag & drop the Basic Surface material to the right column, go to SHOPs and dive into the surface shader. There are a couple of Parameter VOPs coloured green and they export variables from the shader. This should give you the setup for your own shader. Cheers! steven Quote Link to comment Share on other sites More sharing options...
boogiboy Posted August 7, 2009 Author Share Posted August 7, 2009 Hi there, Please go to the Material Palette, drag & drop the Basic Surface material to the right column, go to SHOPs and dive into the surface shader. There are a couple of Parameter VOPs coloured green and they export variables from the shader. This should give you the setup for your own shader. Cheers! steven Hey Stevenong, I'm asking about something else rather just output image plane variable. Inside shader I have independent if() statements which check for particular image plane variable availability and depends on that execute or not chunk of code inside this if() statement. So basically I'm looking how to get information from currently rendered mantra node and about currently rendered image plane variable name inside this node. Sorry for misunderstanding. Thanks. Quote Link to comment Share on other sites More sharing options...
mrice Posted August 9, 2009 Share Posted August 9, 2009 Hey Stevenong, I'm asking about something else rather just output image plane variable. Inside shader I have independent if() statements which check for particular image plane variable availability and depends on that execute or not chunk of code inside this if() statement. So basically I'm looking how to get information from currently rendered mantra node and about currently rendered image plane variable name inside this node. Sorry for misunderstanding. Thanks. I dont think there's any way to do that. Mantra would have to do a new render for every imageplane. You should be able to set up something similar though. You could have a switch VOP or a vex if... else if... block which routes the different sections of your shader to its output using a user parameter (in place of the imageplane variable you're asking about) and use takes to render out the sections by changing that parameter. Does that make sense? Quote Link to comment Share on other sites More sharing options...
boogiboy Posted August 10, 2009 Author Share Posted August 10, 2009 I dont think there's any way to do that. Mantra would have to do a new render for every imageplane. You should be able to set up something similar though. You could have a switch VOP or a vex if... else if... block which routes the different sections of your shader to its output using a user parameter (in place of the imageplane variable you're asking about) and use takes to render out the sections by changing that parameter. Does that make sense? Thats exactly what I have now, just wanna to be more efficient and minimize time for setting up the shaders workflow. Thanks for answer anyway, I will go with usual approach, just exporting all of the image plane variable. 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.