Jump to content

image plane variable inside shader


boogiboy

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

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...