Importing attributes in VOP shader context

   7033   4   2
User Avatar
Member
1814 posts
Joined: 10月 2010
オフライン
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
300 posts
Joined: 1月 2010
オフライン
Easiest is to promote your primitive attribute to a point attribute.
Drive, monkey, drive!
User Avatar
Member
1814 posts
Joined: 10月 2010
オフライン
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
300 posts
Joined: 1月 2010
オフライン
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
1814 posts
Joined: 10月 2010
オフライン
Thank you for you reply Erik! I will give it a shot a little later
-G
  • Quick Links