Jump to content
iFight4theUser

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!

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Works for me. Did you right-click on the parameters name and say "copy parameter" and then go to the other ramps name and say "paste relative references"?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×