Boolean Operations with VEX

calendar_today

17.01.2026

label

VEX, Hard-surface

mouse

Houdini 20.5

Description

Clipping intersecting meshes for boolean operations such as union, intersect and subtract.

1 Code Discussion

This attribute wrangle running over points creates signed distance values by combing winding numbers with world distances. The windingnumber differentiates outside from inside by returning positive or negative values. xyzdist returns the world space distance to the other surface.

CPP
        float accuracy = chf('accuracy');
float offset = chf('offset');

float wind = windingnumber(1, v@P, accuracy);
float dist = xyzdist(1, v@P);

float dist_sign = -dist * (wind - offset);

f@dist_sign = dist_sign;
    

2 Result

Subdivided meshes can be cut to output shattered pieces, intersections, unions, subtracted pieces, and seam curves. Resulting surface boundaries are not connected to one another.

download

Downloads

link

Related articles

favorite

380

label

VEX

Attribute to match across inputs

favorite

262

label

VEX

Sphere Packing / Dart Throwing Algorithm

favorite

283

label

VEX

Deintersecting spheres with Voronoi

favorite

325

label

VEX

Fitting Planes to Point Clouds

favorite

331

label

VEX

How to Analyze VEX Code

favorite

160

label

VEX

Monte Carlo Geometry Processing