Jump to content

Use a surface material shader to calculate a point attribute.


Recommended Posts

I've run into this issue a few times now.

I have a shader that generates several output variables for extra image planes. The variables that are generated would be really useful in SOPs.

The only thing I can think of that would allow me to run the same calculation on each point, is to collapse the SHOP network into an OTL that I could also exist inside a VOP. But the parameters are being driven on the shader and it seems a bit messy to channel reference all the ramps and other parameters. 

Is there some way to apply the shop_materialpath and then compute and export a variable on a per point basis?

Thanks!

Link to comment
Share on other sites

Usually I would just copy-paste the nodes from a material network and reconnect their global inputs and outputs.

As shaders work on pixels and not on points I don't think there is a direct way of exporting its calculations to points, but you could try baking out pixel maps and then import them with attribfrommap.

Link to comment
Share on other sites

Thanks Konstantin, 

I pretty much ended up doing that. I just encapsulated the network into a VOP OTL so that they will both pickup changes. The only trouble now is that I have a ramp parameter on my shader and on my point vop and I can't get them to stay in sync. 
 

Edited by iFight4theUser
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...