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

373

label

VEX

Attribute to match across inputs

favorite

251

label

VEX

Sphere Packing / Dart Throwing Algorithm

favorite

275

label

VEX

Deintersecting spheres with Voronoi

favorite

317

label

VEX

Fitting Planes to Point Clouds

favorite

322

label

VEX

How to Analyze VEX Code

favorite

155

label

VEX

Monte Carlo Geometry Processing