Add Edge Loops? [{SOLVED}]

   424   2   0
User Avatar
Member
1010 posts
Joined: April 2017
Offline
Hi!

I have a bunch of surfaces with no edge loops in the center. Is there a procedural way of adding multiple edge loops on each?

-Olivier
Edited by olivierth - Jan. 17, 2024 12:29:14

Attachments:
Houdini_add_Segments_01.JPG (48.7 KB)

User Avatar
Member
8583 posts
Joined: July 2007
Offline
you can either:

- provide an edge group to Edge Divide (set Divisions and Connect Points)

or

- specify beginning edge in Poly Split/Split Locations (Path Type: Edge Loop, set Number Of Loops)

so you only need to procedurally find the edge group or the first edge for the splits, which may be specific to your surfaces
can be as simple as hardcoding consistent edge like 0e0 if they are all consistent or finding the edge based on robust rules that you know all your surfaces obey, like longest border edge, etc..
Edited by tamte - Jan. 17, 2024 12:08:33
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
1010 posts
Joined: April 2017
Offline
ah! The Poly Split method is interesting.

In the end, I made a script to create a string that will be use as a group for the Edge Divide sop. It's a bit complicated but it works well.

in a Detail Wrangle I used:
int npts = npoints(0);
int listA[], listB[];
for(int i=0; i<npts/2; i++)
    {
    append(listA, i);
    append(listB, i+npts/2);
    }

int firsStop = npts/2-1;
string loopA = "p";
string loopB = "p";
for(int i=0; i<npts/2; i++)
    {
    loopA += itoa(listA[i]) + "-";
    loopB += itoa(listB[i]) + "-";
    }
s@edgeGroupS = loopA[:-1] + " " + loopB[:-1];

This give me a string like: "p0-1-2-3-4-5-6 p7-8-9-10-11-12-13". I invert the result with a Group combine sop and use the result in the Edge Divide sop.

EDIT: Arg! Some times, the edgeDivide is very unpredictable and gives weird topology... The PolySplit with the Split Locations set to1e1 did the trick!
Edited by olivierth - Jan. 17, 2024 12:36:24
  • Quick Links