RonanCroyal
Jan. 20, 2020 04:57:36
Hi,
I would like to know how to mimic the Partition SOP in VEX, because it's currently not compilable.
I use it mainly like that, to put each point in his own group.
Thank you
animatrix_
Jan. 20, 2020 07:01:01
Hi you can do something like this in a Point Wrangle:
setpointgroup(0, sprintf("pt%s", @ptnum), @ptnum, 1);
RonanCroyal
Jan. 20, 2020 09:00:22
Fantastic, thanks a lot !
RonanCroyal
Jan. 20, 2020 09:27:05
Just an other one I need.
I also often use the Partition SOP to group from my “name” attribute, like in the screenshot.
How would you do that in VEX ?
Thanks !
animatrix_
Jan. 20, 2020 12:08:11
You can do it like this:
setprimgroup(0, s@name, @primnum, 1);
tamte
Jan. 20, 2020 13:03:35
maybe it's worth mentioning that using many groups can be very inefficient especially if there is no need for them
I can't imagine many scenarios when you'd need to partition geometry into groups instead of attributes (maybe just for export purposes for formats that rely on groups like obj, or for hengine hosts that require groups for various purposes)
so just keep that in mind
RonanCroyal
Jan. 20, 2020 13:19:20
animatrix_: Perfect, thank you !
tamte: Thanks for the heads up, I will definitively keep that in mind