Season Finale: Procedural Subdivision Curves

comments 7
Free Tutorials

Data Viz – ever tried creating a bunch of smoothly connecting lines manually? Me neither, that just seems too involved. Enter Houdini. But how do you create control vertices for those subdivision curves?

In this tutorial we’ll roll our own little algorithm for creating control vertices to be used in a subdivision curve. This allows us to procedurally connect individual points, creating a smooth node graph which can be used for Data Visualisation, Generative Design or maybe Fantasy UI…

Download Project File (.hip)

Liked it? Take a second to support Moritz on Patreon!
Become a patron at Patreon!


  1. Great tutorial! As always.

    Btw, you don’t have to capitalize the first letter in a chf(‘foo’) function. It will appears as ‘Foo’ in the parameter automatically :).

  2. Cool! Seems useful for a soft plexus effect. By the way, what dataviz book were you reading? I assume it was good since it inspired this vid!

  3. Any tips on how to animate this polyline from start to finish? Thank you

  4. Nayan Bodawala

    Thank you.
    Beautiful tutorial, but is it possible if I want the curves to not start and end in one direction, but would like to start and end from surface normals….
    Any tips or idea on how to achieve that.

    • Hey! We sure do!
      First of all when using normal directions, the idea of a “middle plane” does not work anymore. So we’ll get rid of p3 and npt3 in our code.
      P1 and p5 will still be the positions of our start and end points, so no change here.
      P2 and P4 should now be calculated by adding the normal vectors to their respective start and end positions. We can implement smoothing here by multiplying the normal vectors with our smoothing slider s.

      In Vex this all should look like this. Just paste it in a point wrangle, wire it up like in Mo’s setup and make sure those input points have an ‘N’ normal attribute.

      float s = chf(“Curve_Softness”);

      vector npos = point(1, “P”, @ptnum);
      vector pos = v@P;
      vector nnorm = point(1, “N”, @ptnum);
      vector norm = v@N;

      vector p2 = pos + norm*s;
      vector p4 = npos + nnorm*s;

      int npt2 = addpoint(0, p2);
      int npt4 = addpoint(0, p4);
      int npt5 = addpoint(0, npos);

      int newprim = addprim(0, “polyline”, @ptnum, npt2, npt4, npt5);

Leave a Reply