# Subdivision - transfer edge groups

## Recommended Posts

Hi,

How would you transfer edge groups using subdivision? I can't figure it out...

##### Share on other sites

So here's the solution:

before subdiv > uvflatten (using the edge group) > subdivide > splituvseams > group (edge, unshared edges)

• 1

##### Share on other sites

that's tricky,

and several weeks ago I used another approach for maintaining edge group on subdivided geo,

hope there are some useful informations for you

Edited by Benyee

##### Share on other sites

Hi,

You can update your edge groups automatically using VEX (Detail Wrangle), but you will pay performance penalty for very high res geometry that has very large edge groups:

```string edgegroups [ ] = split ( chs("edgegroups"), " " );
foreach ( string edgegroup; edgegroups )
{
int pts [ ] = expandedgegroup ( 1, edgegroup );
int count = len ( pts );
for ( int i = 0; i < count; i += 2 )
{
int pt0 = pts [ i ];
int pt1 = pts [ i + 1 ];

int pts0 [ ] = neighbours ( 0, pt0 );
int pts1 [ ] = neighbours ( 0, pt1 );

int sharedpt = -1;
foreach ( int pt; pts0 )
{
if ( find ( pts1, pt ) >= 0 )
{
sharedpt = pt;
break;
}
}

if ( sharedpt != -1 )
{
setedgegroup ( 0, edgegroup, pt0, sharedpt, 1 );
setedgegroup ( 0, edgegroup, pt1, sharedpt, 1 );
}
}
}```

Edge group expression:

``edgegrouplist(-1)``

If you need multiple levels of subdivision, you need to encapsulate the Subdivide and Attribute Wrangle inside a For Each Loop network, as the edges have to be updated at each subdivision.

Alternatively you can change the VEX code to walk the edges instead, then it would handle any edge group regardless of the subdivision levels difference between 2 geometries.

• 2

## Create an account

Register a new account