How to import attribute from MAT context?

   2977   4   2
User Avatar
Member
48 posts
Joined: Sept. 2016
Offline
Hi,

I want to export an attribute from my MAT context with BindExport and use it in OBJ context, but my attribute comes with 0 value. To bring it into SOP I use Attribute VOP and inside it Bind and BindExport. Is there something I do wrong?
User Avatar
Member
26 posts
Joined: Sept. 2017
Offline
Why would you need to export an attribute from the MAT context? The normal workflow is to bind attributes in the mat context from the geometry.Bind Exporting a variable from the mat context can be used from the Render Node with extra image plane, but as far as I know it cannot be brought to the geometry. And I really cannot think of a reason to do it, perhaps clarify a little what you want to achieve. You can look at the geometry spreadsheet to see what attributes you have on the geometry.
User Avatar
Member
1391 posts
Joined: Dec. 2010
Offline
As Kaloyan said what you want to do, doesn't make sense !

Specially because of workflow, the shaders are executing on the rendertime on your geometries.

Even in theory you would get infinity loop !

Would be great if you let us know what are you looking for exactly with a reference or example !
https://www.youtube.com/c/sadjadrabiee [www.youtube.com]
Rabiee.Sadjad@Gmail.Com
User Avatar
Member
48 posts
Joined: Sept. 2016
Offline
Thanks Kaloyan and Sadjad Rabiee for replies.

My main reason to bring attribute from MAT into SOP was to utilize Patterns. When I assign one of these patterns (Ramps, Checkered, so on) to my object it works perfectly (both directly onto the object and in Principled Shader), but I want to use these patterns as attributes in my SOP context.

I also tried patterns in VOP context, I guess they require some kind of input. But in MAT context they are rendered perfectly without any input.

Is there any direct and easier way to use these patterns as a part of the attribute on geometry?
User Avatar
Member
1391 posts
Joined: Dec. 2010
Offline
Hi

All of the patterns in both Shader VOP and VOP Sop are need input, I didn't test them without input in shaders but if they are working there they may use uv or maybe global P as a input by default.

However using them inside the VOP SOP is so simple, according to what you want to do you can connect P or UV to their input.

For most of the case we are using P as input(e.g Noises) but if you need uv (e.g Texture files) you should build uv for your geometry (e.g with UV Project SOP) ,then use uv as a input of your pattern.
https://www.youtube.com/c/sadjadrabiee [www.youtube.com]
Rabiee.Sadjad@Gmail.Com
  • Quick Links