Houdini's volume wrangle can define the shape of volumes and iso surfaces with mathematical formulas.
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
.
float r = chf('radius');
float x, y, z;
assign(x, y, z, v@P);
f@d = x * x + y * y + z * z - r;