adhoc syntax for groups

   2725   4   1
User Avatar
Member
5 posts
Joined: March 2008
Offline
Hi,

I have a mesh consisting of many leaves, all with different polycount. I used the assemble node to create one group per leaf, so now the mesh has about 100 groups called piece0, piece1 , piece…
I wanted to create three groups from those piece groups - but I haven´t found the right syntax yet. I tried piece0 - piece30, piece0-30, piece {0-30} and a few more, non of them worked so far.
What would be the correct syntax?

Or would there a complete different way, how I could split those leaves into three groups for material assignment?

thanks!
Edited by Walli - July 31, 2019 11:05:28
User Avatar
Member
453 posts
Joined: Feb. 2013
Offline
Depends entirely on what you have and how you want to control it.
Typically it's better to iterate over an attribute. Since you create the number on the group from some attribute you might as well just use that attribute directly.
You could then use loops or Vex or Vops, or use a group expression or group by range.
User Avatar
Member
5 posts
Joined: March 2008
Offline
okay, thanks - I will look into that, as this is probably something that I will stumble over more frequently.

For now I simply changed the l-system, instead of creating a group per leaf I now only create three groups via g(rand(i)*3).
That way I don´t have to create goups afterwards.
User Avatar
Member
20 posts
Joined: Oct. 2013
Offline
you could use opdigits(@name)<30 in a groupexpression-node. You need to tick Create Name Attribute in the assemble node, the value of the name attribute is then piece0 piece1 …
Edited by raschberg - Aug. 1, 2019 07:16:40
User Avatar
Member
5 posts
Joined: March 2008
Offline
thanks, will try that!
  • Quick Links