What the heck is an Edge Group?

   2809   8   2
User Avatar
Member
8 posts
Joined: Dec. 2017
Offline
Ok, so I've been trying to figure this out for a while with little success. Edge groups are everywhere in various different SOP nodes, and yet I have no clue really what they are? Are they point groups under the hood? I've seen that explanation offered, but that doesn't make much sense as:
1. They don't show up anywhere in the geometry spreadsheet as point groups would.
2. Theoretically I can have many different edges between two points (different primitives), so it would need to store more information.

Are there any staff folks around who could give a quick explanation of how edge groups are represented under the hood?



(My motivation here is that I'm debugging some of the AutoSeam/AutoUV GameDev tools)
User Avatar
Member
6704 posts
Joined: July 2007
Offline
Edge groups are defined by point pairs
You can use expandedgegroup() to get array of point pairs from existing edge group
Or setedgegroup() to add/remove point pair to a group, plus other edge functions

Since edges are technically not an element of a geometry they will not show up in spreadsheet don't have edgenums and can't hold attributes, therefore the point pair representation

Each point pair defines exactly one edge
what you mentioned in 2. houdini calls half-edges and you can also query them using vex
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
8 posts
Joined: Dec. 2017
Offline
Thanks for the help, very much appreciated. The distinction of half-edges makes sense.

This might be a silly question, but do you know why they don't show up in the geometry inspector? It seems that edges are a just as much of a fundamental structure as point, vertices, primitives, etc.
User Avatar
Member
1433 posts
Joined: May 2006
Offline
Edges are a by-product of connecting points into prims via verticies. Hand wavey explaination here:

http://www.tokeru.com/cgwiki/index.php?title=Points_and_Verts_and_Prims#Edges_and_prims [www.tokeru.com]
http://www.tokeru.com/cgwiki [www.tokeru.com]
https://www.patreon.com/mattestela [www.patreon.com]
User Avatar
Member
198 posts
Joined: Sept. 2012
Offline
How will you procedural creat half-edge groups to use for example in the Groupfindpath sop node"
Like from a given list of points or selected edge, pick on random half edge from each, feed that to that node?

See what i mean ?
Thanks everyone!
Vincent Thomas   (VFX and Art since 1998)
Senior Env and Lighting  artist & Houdini generalist & Creative Concepts
http://fr.linkedin.com/in/vincentthomas [fr.linkedin.com]
User Avatar
Member
198 posts
Joined: Sept. 2012
Offline
If i plug a path from the shortest path, Groupfindpath doesn't seem to consider it...
Vincent Thomas   (VFX and Art since 1998)
Senior Env and Lighting  artist & Houdini generalist & Creative Concepts
http://fr.linkedin.com/in/vincentthomas [fr.linkedin.com]
User Avatar
Member
6704 posts
Joined: July 2007
Offline
vinyvince
How will you procedural creat half-edge groups to use for example in the Groupfindpath sop node"
Like from a given list of points or selected edge, pick on random half edge from each, feed that to that node?

See what i mean ?
Thanks everyone!
what do you mean by half-edge group? I don't think there is such concept
there are edge groups, where the directionality of an edge is not implied
Group Find Path would also not use any particular directionality of an edge even if seemingly implied directly by the group string
so p0-1 would not produce different result to p1-0, at least I don't observe different behavior in any of it's modes

to create edge group procedurally you have many options for example: Group SOP, setedgegroup() VEX, Group Promote SOP

to create edge group from a polyline that aligns with some edges you can create edge group on that polyline and then Group Transfer to your geo with very small Distance Threshold so that only aligned edges transfer
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
198 posts
Joined: Sept. 2012
Offline
Thanks you Tomas, some good ideas there.

Yes i mean edge with direction. If I select edge from point, I will get a bunch, not one, or the one with a prefered direction..

For setedgegroup(), something like this?

_____

int hedge = pointhedge(0, @ptnum);
int src = hedge_srcpoint(0, hedge);
int dst = hedge_dstpoint(0, hedge);

i@hedge = hedge;
i@hedge_src = src;
i@hedge_dst = dst;

int nexthedge = hedge_next(0, hedge);
int nextsrc = hedge_srcpoint(0, nexthedge);
int nextdst = hedge_dstpoint(0, nexthedge);

i@nexthedge = nexthedge;
i@nexthedge_src = nextsrc;
i@nexthedge_dst = nextdst;


setedgegroup(0,"edgeselc",@hedge,@nexthedge,1);
Vincent Thomas   (VFX and Art since 1998)
Senior Env and Lighting  artist & Houdini generalist & Creative Concepts
http://fr.linkedin.com/in/vincentthomas [fr.linkedin.com]
User Avatar
Member
6704 posts
Joined: July 2007
Offline
vinyvince
For setedgegroup(), something like this?
no, just this
setedgegroup(0,"edgeselc", start_pt, end_pt, 1);
as long as there is a valid edge described by both points, so order doesnt matter

if you are already starting with halfedge then it's:
int src = hedge_srcpoint(0, hedge);
int dst = hedge_dstpoint(0, hedge);
setedgegroup(0,"edgeselc",src, dst, 1);

but as I said before, edge groups don't store direction as edge represents all equivalent half edges so potentially mixed directions
Edited by tamte - Oct. 12, 2021 13:58:23
Tomas Slancik
FX Supervisor
Method Studios, NY
  • Quick Links