I understand edges "don't exist" in Houdini but I would like to know the link between Maya's edge numbers and Houdini's. On a simple cube, Maya has numbers from 0 to 11 (12 total edges). How can I match each edges in Houdini to Maya's number system?
My goal is to select an edge in Houdini and generate a Mels script to select the same edge in Maya.
For example, in Maya the edge from point 0 to 1 is edge #0. How can I get that same info in Houdini?
Maya edge selection number = what in Houdini?
2439 6 0-
- olivierth
- Member
- 1177 posts
- Joined: April 2017
- Offline
-
- tamte
- Member
- 9379 posts
- Joined: July 2007
- Offline
You can probably assume that the index of a primary half-edge within the ordered array of primary half-edges corresponds to the edge index
Which you can find out in VEX
However I don't really know how Maya numbers the edges so it may not match, but I'd consider it a logical assumption
Which you can find out in VEX
However I don't really know how Maya numbers the edges so it may not match, but I'd consider it a logical assumption
Tomas Slancik
CG Supervisor
Framestore, NY
CG Supervisor
Framestore, NY
-
- _haru_
- Member
- 2 posts
- Joined: March 2019
- Offline
-
- olivierth
- Member
- 1177 posts
- Joined: April 2017
- Offline
arg! Thanks for the help but sadly, that's the logic I was goin' for. I manually checked a few edges in Houdini/Maya and none of the half edges matches what I see in Maya.
I think I'll simply make a script to select vertices so I can convert to edges once in Maya. Its not perfect but it should work 95% of the time.
-Olivier
I think I'll simply make a script to select vertices so I can convert to edges once in Maya. Its not perfect but it should work 95% of the time.
-Olivier
-
- tamte
- Member
- 9379 posts
- Joined: July 2007
- Offline
olivierthI wasn't suggesting the halfedge numbers matching (except maybe the first one)
none of the half edges matches
but index within ordered array of primary ones, in other words enumerated primary half edge array
but also as said that may not match either, just wanted to clarify I didn't mean half edge numbers themselves
this may be a question for Maya forums, simply asking what is the order of edges and if it can be implicitly derived from topology. There is also a chance Edges may be explicitly defined element in Maya geo in which case there may not be any way to infer the order from other elements
Edited by tamte - Oct. 16, 2023 23:55:41
Tomas Slancik
CG Supervisor
Framestore, NY
CG Supervisor
Framestore, NY
-
- olivierth
- Member
- 1177 posts
- Joined: April 2017
- Offline
hmm.. not sure I follow. You want me to generate an array of all the half edges and sort() them? And what do you mean by "Primary ones". Do you mean the first half of the sorted array?
EDIT: ok, I get what you mean by Primary. I'll try to figure out how to get the list of all primaries from a geo.
EDIT: ok, I get what you mean by Primary. I'll try to figure out how to get the list of all primaries from a geo.
Edited by olivierth - Oct. 17, 2023 10:49:02
-
- tamte
- Member
- 9379 posts
- Joined: July 2007
- Offline
olivierthyou can do this in Primitive wrangle and get primary_hedges detail attrib (should in theory be already sorted, and then the index within the array would in theory be stable edge number, first element 0, second 1, third 2, etc. Regardless of the actual hedge numbers in the array)
I'll try to figure out how to get the list of all primaries from a geo.
int hedge = primhedge(0, @primnum); int first_hedge = hedge; int primary_hedges[] ; do { if ( hedge_isprimary(0, hedge) ) { append(primary_hedges, hedge); } hedge = hedge_next(0, hedge); } while (hedge != first_hedge); setdetailattrib(0, "primary_hedges", primary_hedges, "append");
Edited by tamte - Oct. 17, 2023 13:14:13
Tomas Slancik
CG Supervisor
Framestore, NY
CG Supervisor
Framestore, NY
-
- Quick Links

