# Imperfect Voronoi fracture

## Recommended Posts

I am getting an almost perfect voronoi fractured mesh, but at some points the edges on the outside just dont match up. I need a perect outside shell for further processing, so can this somehow be avoided? I tried with voronoi fracture points and with a scatter on an isooffset, both methods result in this problem. I could somehow fix this in VEX probably but I'd rather get this right in the first place...

voronoi problem.hiplc

Edited by s---70

##### Share on other sites

Have you tried adjusting the 3D tolerance in the fracture sop?

##### Share on other sites

Triangulate non-planar faces using Divide node.

• 3

##### Share on other sites
Quote

Triangulate non-planar faces using Divide node.

thx, that helped but didn't fix it in all occurances.

Quote

Have you tried adjusting the 3D tolerance in the fracture sop?

what do you mean by 3d tolerance?

My approach is now to find nearby points and set them to the same position before applying a clean to remove degenerate prims, but its always a bit of a pain in the ass when you have to find a threshold that works and its not really procedural.

##### Share on other sites

so if anyone is interested, this is how I fixed it:

attribute wrangle running over detail with this code, ch("epsilon") being a float parameter to control the distance in which near points are searched

```int npt = npoints(0);
int moved[];
resize(moved, npt);

for(int i=0; i<npt; i++) {

if(moved[i]) continue;

vector pos = point(0, "P", i);
int pcpts[] = pcfind(0, "P", pos, ch("epsilon"), 100);

vector center = 0;
int count = 0;

int tomove[];
push(tomove, pcpts);
foreach(int pt; pcpts) {
if(moved[pt]) {
removevalue(tomove, pt);
continue;
}
vector posi = point(0, "P", pt);
center += posi;
count ++;
}
foreach(int pt; tomove) {
moved[pt] = 1;
setpointattrib(0, "P", pt, center/count);
}

}```

after that a clean with default settings

edit: changed the clean afterwards to a simple delete -> delete degenerate primitives and set the tolerance smaller than default, bcause default clean removed some small polygpns.

Edited by s---70
• 2

## Create an account or sign in to comment

You need to be a member in order to leave a comment

## Create an account

Sign up for a new account in our community. It's easy!

Register a new account