Jump to content

MAT vops vs Sop vops

Recommended Posts


I have a few questions about vop nodes in mat context. I have no trouble with vops in sop, but things seem to fall apart in /mat (FYI I am working inside a material builder). 

1. Is it possible to access @ptnum and @primnum? It doesn't seem to work

2. Some binds just don't seem to work. If I do the same bind in /obj vop context, it works perfectly, but binding it in /mat material builder doesn't. Why would it not work in the /mat context when the nodes are the same?

3. If the vop asks for a file and I use op: to get data from a node in /obj, it does not work and says error finding geometry. But if I do the same thing in /obj in a vop network, it works perfectly fine

4. In /obj in a vopnetwork, you can access the input from the geometry vop global parameter node. If the vop node asks for a file, you can wire it into opinput 1. How do you do that in /mat? What if I want to access the geometry to which the shader is applied? It's asking for a file, but I just want to use the geometry to which that shader is applied.


Link to comment
Share on other sites

You can import whatever attribute you want into a material builder by using a bind vop. Make sure to set the right type of the attribute to import (float, integer, vector...). You can also try with a parameter vop with the same name as your attribute to import it. To acces the ptnum/primnum try to use "point.number" and "prim.number", and there's also a node called "Import Surface Variable" which you can give a try.

I'm not sure that you can access geometry from a sop into a material builder, you can access attributes from the geometry that has your shader applied, but not geometry directly (a trick might exist but I don't know it).

Hope that helps,



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.

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