Procedurally create edge group of just the largest hole?

   1459   6   2
User Avatar
Member
25 posts
Joined: 6月 2020
Offline
Hi!

I'm working on some tools to clean up ugly photogrammetery geo and I'm constantly needed to make an edge group of the largest hole at the base of the mesh. Currently I'm just double clicking it manually but I need to re-do the selection when I change things up the chain. Making and edge group of unshared edges would work, except I usually have more than just the one hole and I need the group to only have the largest hole as an edge group. Any thoughts?

Thanks!

Attachments:
EdgeGroupQ.jpg (711.0 KB)

User Avatar
Member
8535 posts
Joined: 7月 2007
Offline
you can do something like this

use Divide SOP -> Measure -> Sort -> Blast -> Ends to get the largest boundary curve
ad then in Detail Wrangle you can filter unshared edges geoup by proximity to that curve and keep just edges within certain tolerance

EDIT: updated the file to have choice of measure metrics, between perimeter and area as they can each be useful for different meaning
of "largest"
Edited by tamte - 2023年1月4日 23:46:58

Attachments:
ts_group_largest_boundary.hipnc (277.8 KB)

Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
25 posts
Joined: 6月 2020
Offline
Woah this is amazing! I'm learning a ton dissecting it. Thank you so much for putting this together.
User Avatar
Member
4500 posts
Joined: 2月 2012
Offline
Another way would be to create point groups from these edge groups, process them in VEX and output the name of the group with the highest number of points and then use the same or similar name to get the corresponding edge group and then use this edge group to do whatever you want.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | animatrix2k7.gumroad.com
User Avatar
Member
25 posts
Joined: 6月 2020
Offline
Animatrix - Interesting, I'll try this out too. I'm with up until "use same or similar name to get the corresponding edge group". could you elaborate on what you mean there? Sorry, still pretty new to VEX!
User Avatar
Member
4500 posts
Joined: 2月 2012
Offline
I mean since you have to have both the edges and point groups, you can create names with suffix to identify each type or just convert edges to point groups and get rid of the edge groups and perform the attribwrangle on that branch and read the result back to the main branch since the group names will be the same.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | animatrix2k7.gumroad.com
User Avatar
Member
5 posts
Joined: 11月 2020
Online
Thanks tamte! I'm using your approach with Labs Edge Group To Curve for filling holes on a flat plane cleanly.

Attachments:
group_largest_boundary_flat_geo_fix_ff.jpg (322.0 KB)
group_largest_boundary_flat_geo_fix_ff.hipnc (174.8 KB)

  • Quick Links