← BACK TO NOTES
2026-08-03 |
HDK HOUDINI

Why I Started Writing HDK Nodes

I started writing Houdini nodes in C++ with the HDK in January 2026.

The reason is speed. An HDK node cooks faster than the HDA that does the same job.

This first article shows one job done both ways, with timings.

Test setup

The job is edge damage: rounding and chipping the edges of a solid so it looks worn.

  • HDA: SideFX Labs Edge Damage 2.1
  • HDK: my own SOP, GEO_EdgeDamage, in Erode mode
  • Input: one 2 m cube, at voxel sizes of 0.02, 0.01 and 0.005
  • Noise: off on both, so the edges are only rounded, not chipped
  • Damage: matched by removed volume, 0.07 m³ (about 0.9% of the cube), within ±7%
  • Environment: hython, Houdini 22.0.459, Intel Core i7-8700K, 64 GB RAM

The last two points need care, because the Amount parameter cannot be compared between the two nodes. At the same Amount of 3.0 and a voxel size of 0.01, Labs removes 0.069 m³ from the cube, while my node (in subdivide mode) removes only 0.018 m³. So I tuned Amount on each node, at each voxel size, until both removed the same volume. After that, the output point counts agree within about 2%.

Left: Labs Edge Damage. Right: GEO_EdgeDamage. Top: shaded. Bottom: depth below the original surface. Same removed volume, noise off.|960

Left: Labs Edge Damage. Right: GEO_EdgeDamage, with the same volume removed. The top row is the shaded cube. The bottom row colors every point by how far it sits below the original cube surface, so the flat faces stay dark (untouched) and the damage shows up as a band along every edge.

The timing method is the same for all of them. In hython, each setup is cooked once as a warm-up and then recooked 7 times, and the three setups run in turn inside one loop. Before every run I move the input by 0.1 mm, so that every node downstream recooks, including the nodes inside the HDA.

The PC was also in use during these runs. Outside load only ever adds time, so the table shows the fastest of the 7 runs, which is the least disturbed one.

Results

Voxel size Labs HDA HDK, isotropic remesh HDK, subdivide
0.02 5.85 s 1.95 s (3.0×) 0.34 s (17.1×)
0.01 7.43 s 3.38 s (2.2×) 0.68 s (10.9×)
0.005 21.45 s 7.24 s (3.0×) 2.53 s (8.5×)

The two HDK columns differ only in how the shell is prepared before the voxel boolean.

Isotropic remesh is closest to what Labs does, so it is the fairest comparison: 2.2× to 3.0× faster.

Subdivide is the method I chose for my own node: 8.5× to 17× faster.

The size of the gap moves with the PC's load. The medians of the same runs give 2.6× to 3.4× and 6.2× to 13.9×. HDK was faster in every comparison, and I would trust the order more than the exact ratio.

Why it is faster

The Labs HDA contains 341 nodes, six of them Remesh nodes. I have not profiled it node by node, so I do not claim to know exactly where its time goes.

What I know is what I chose differently in the HDK version:

  • Subdivide instead of isotropic remesh. Midpoint subdivision keeps every new vertex on the surface, so the shape cannot shrink. The voxel boolean retessellates the result anyway, so remeshing first is wasted work.
  • A floor on shell edge length, at a few voxels. Detail finer than the voxel grid cannot survive the boolean, so I do not pay to create it.
  • One C++ node. Fractured pieces are processed in a single parallel pass inside the node, not by looping over pieces in a network.

Limits of this test

  • One shape. This is a cube. Heavy meshes and many separate pieces will behave differently. I will measure them in later articles.

  • The profiles are not identical. At the same removed volume and a voxel size of 0.01, Labs cuts slightly deeper into the corners (about 0.049 m against 0.045 m), while mine pulls the edges themselves back further (about 0.045 m against 0.032 m).

  • Rounding only. With noise off, both nodes just round the edges. The chipped look needs noise, and I have not compared the two with noise on at equal damage yet.

  • Defaults do not look the same. At default settings, with noise on, Labs stays smooth and rounded, while mine adds noise across the faces and removes less at the edges.

    Default settings. Left: Labs. Right: GEO_EdgeDamage.|960

  • One machine, one busy PC. Absolute times will differ on yours.

  • Cook time only. I did not measure memory or the time to build the node. An HDA is much quicker to make, and that is the real cost of choosing the HDK.

Next

The next articles go through the nodes one at a time: what each one does, how I built it, and a timing against the HDA it replaced.

Related articles

2026-08-12

230 Nodes Without Losing My Mind

How one person keeps 230 Houdini plugins in order - four layers, a tiny base class that saves you from crashes, and a one-line registration.

2026-08-17

Parameters in C++ Are a Chore

In an HDA you click a parameter into existence. In C++ you write every one of them. Nine lines for two parameters, folders you have to count by hand, and the helper that saves me.

2026-08-21

Making a Node Use All 12 Threads

A Houdini node cooks on one thread unless you tell it otherwise. Here is the loop that spreads the work over every core, how fast it got on my PC, and the one thing that made Houdini crash on me.

Comments