Implicit Surfaces and Volumes

calendar_today

11.08.2024

label

VEX, Modeling

mouse

Houdini 20.5

Description

Houdini's volume wrangle can define the shape of volumes and iso surfaces with mathematical formulas.

1 Code

For a simple sphere we take in the radius parameter r and disassemble the position vector v@P using the assign VEX function. Next, a distance equation using x, y and z gets assigned to the volume named f@d.

VEX
        float r = chf('radius');

float x, y, z;
assign(x, y, z, v@P);

f@d = x * x + y * y + z * z - r;
    

2 Gyroid

VEX
        float a = chf('a');

float x, y, z;
assign(x, y, z, v@P);

f@d = sin(x / a) * cos(y / a) + sin(y / a) * cos(z / a) + sin(z / a) * cos(x / a);
    
download

Downloads

link

Related articles

favorite

473

label

VEX

Attribute to Match across Inputs

favorite

177

label

VEX

Curves from Ramp Parameters

favorite

420

label

VEX

Sphere Packing / Dart Throwing Algorithm

favorite

434

label

VEX

Deintersecting spheres with Voronoi

favorite

477

label

VEX

How to Analyze VEX Code

favorite

324

label

VEX

Monte Carlo Geometry Processing