Importing attributes in VOP shader context

   6252   4   2
User Avatar
Member
1799 posts
Joined: Oct. 2010
Offline
Hi community!

I was trying to import a primitive attribute into a shader VOP network. However, I realized I have to specify the prim number (using the prim attribute node). Is there a way to get the current primitive number in a shaded surface context? I noticed that the only Id variable available in my globals is the Sample ID. Is that the same as the prim ID?

Thanks in advance!
-G
User Avatar
Member
299 posts
Joined: Jan. 2010
Offline
Easiest is to promote your primitive attribute to a point attribute.
Drive, monkey, drive!
User Avatar
Member
1799 posts
Joined: Oct. 2010
Offline
Thank you Erik

It looks however that even if I do that, the node requires a point ID, which seems to not be available on this context. Is there a way to get the point ID in the VOP shader context?
-G
User Avatar
Member
299 posts
Joined: Jan. 2010
Offline
Create an attribute with your point id and bring it in with a regular parameter as you would do with any attribute.
Drive, monkey, drive!
User Avatar
Member
1799 posts
Joined: Oct. 2010
Offline
Thank you for you reply Erik! I will give it a shot a little later
-G
  • Quick Links