(Novice Q) For-each Named-Primitive is not registering Prim Groups

   2285   5   0
User Avatar
Member
38 posts
Joined: July 2017
Offline
Hello, I can't seem to troubleshoot this issue i'm having with the For-each Named Primitive', it's not picking up the primitive groups i have created throughout a model - look: https://imgur.com/a/9DViQGL [imgur.com]
User Avatar
Member
900 posts
Joined: Feb. 2016
Offline
Hello the “piece attribute” field needs an actual attribute, not a group.
It would take the attribute you feed and return as a single piece for that iteration the prims whose attribute has the same value (usually integer or string).
Let's say the “class” attribute has value of 0 for prims 0-4, and value of 1 for prims 5-6.
When you iterate with piece attribute “class”, you would get two iterations in total (because the attribute “class” has only 2 values)


If you want to iterate over groups, the “name” node can help you to transform your group names into attributes.
Have a look here too:
https://www.sidefx.com/forum/topic/52979/?page=1#post-270169 [www.sidefx.com]


Cheers
Edited by Andr - Feb. 21, 2019 08:43:39
User Avatar
Member
38 posts
Joined: July 2017
Offline
Ahh,ok. The ‘Name’ node helped to clarify this since it identifies Class: Primitive, of which I was then able to divide it into the attributes. Thank you very much, i have it sorted now.
User Avatar
Member
38 posts
Joined: July 2017
Offline
Hi Andr,

I've now managed to put it all through a for-each primitive loop (which recognises each piece of geometry fine), but when I add a voxel mesh inside it, parts of the model don't show up. Do you think this is anything to do with having used the ‘Name’ node?

Here's an example of what I mean - https://imgur.com/a/xP3Ruy5 [imgur.com]
User Avatar
Member
900 posts
Joined: Feb. 2016
Offline
Hello, I never used this voxel mesh node, but as far as I know when the convert-to-volume fails, it is often due to the original geometry not being water tight.

Make sure your mesh has no holes, and if you suspect that the connected prims have unique points, append a fuse sop, to fuse the overlapping points together.

cheers
User Avatar
Member
38 posts
Joined: July 2017
Offline
OK, i think the geometry is fine, but i'll double check. Thanks for your help man.
  • Quick Links