Attribute Wrangler: how to loop over edge group?

   1540   4   0
User Avatar
Member
692 posts
Joined: 8月 2019
オフライン
Attribute Wrangler can run over Points, Primitives or Vertices:



But where is "Edges"? If I have an edge group, how to run some vex code for each edge in the group?

I know I can use expandedgegroup()in Detail mode, but it will be single-threaded, without the usual benefit of using a Wrangler, right?

Attachments:
Screenshot 2025-03-03 075907.jpg (39.9 KB)

User Avatar
Member
5048 posts
Joined: 2月 2012
オフライン
Hi,

Edge support in VEX is a long standing RFE #58641 (11 years old). It goes hand in hand with having edge attributes which would also open up a lot of interesting workflows IMO.

Right now there are a few ways you can do this. One of them is making your own Edge Wrangle but it's quite involved:


Another approach is to utilize half edges in your code rather than edges.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com] https://lnk.bio/animatrix [lnk.bio]
User Avatar
Member
692 posts
Joined: 8月 2019
オフライン
animatrix_
Edge Wrangle

Thank you for the answer. Is this custom node available anywhere?
Edited by raincole - 2025年3月7日 00:11:55
User Avatar
Member
692 posts
Joined: 8月 2019
オフライン
As for the hedge solution, this is the best I can come up with:

string egroup = chs("group");

int he = vertexhedge(0, @vtxnum);
int spt = hedge_srcpoint(0, he);
int dpt = hedge_dstpoint(0, he);
int ingroup = inedgegroup(0, egroup, spt, dpt) & (spt < dpt);

if(ingroup) {
    // Actually process the edge here
}

It's rather hacky but at least it does run over the edges.
User Avatar
Member
5048 posts
Joined: 2月 2012
オフライン
raincole
animatrix_
Edge Wrangle

Thank you for the answer. Is this custom node available anywhere?

Oh yes it's on my patreon. It's a really old node so I have see if it still works in the latest version of Houdini.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com] https://lnk.bio/animatrix [lnk.bio]
  • Quick Links