VEX edge loop selection script tutorial Houdini
ฝัง
- เผยแพร่เมื่อ 1 ส.ค. 2024
- link with hip file and complete script drive.google.com/drive/folder...
With all the Houdini 19 cool features, let's do something not so exciting, but still useful and a good exercise in a vex.
0:00 end result
01:37 setup
04:27 converting group string to int array
10:34 theory behind getting edge loop selection
14:40 get edge selection points function
29:50 get next point function
37:20 using both functions to get loop arrays
55:24 getting single string as a detail attrib
1:02:37 make sure we run only valid edge selections
1:04:24 im out!
thank you! this was very useful
My brain just exploded
Hi nice tutorial, what plugin do you use for auto complete context?
In vscode marketplaces just search vex.
What to do if group of edges already created prodcedurally and we dont have "basegroup" string?
so what you could do is to create a detail attrib. lets say you have edge group convert it to detail string, imitating a manually selected edge group.
int edge_points[] =expandedgegroup(0,"single_edges" ); //get array of edge points
string edge_array[];
foreach (int index; int pt; edge_points){
if (index % 2 == 0) { //since we need point pairs, the expandedgegroup array should give us ordered points so we can just skip every second loop with modulus of 2
string pt_1 = itoa(pt);
string pt_2 = itoa(edge_points[index +1]);
string edge_pt_str = concat("p",pt_1, "-", pt_2); // imitate manual edge selection syntax
append(edge_array, edge_pt_str);
}
}
setdetailattrib(0, "edges", join(edge_array, " ")); //join string array into one string, and set it to detail attrib
@@viktors_anfimovs Thank you very much
My details attrib just not woring in my group , can you tell how you exactly transfer details attrib to the base group? That part is a little bit confusing for me.
Go ahead and download the hip file in description. That should make things more clear.