Isocontours: Importing & Exporting Vectors to/from Houdini

comments 10
Free Tutorials

Niklas Rosenstein is with us again! And if Niklas is in the house, chances for some Python code are pretty high. This time we’ll import vectors from Illustrator into Houdini, create an isocontour-effect and export the result back to illustrator.

Apart from the bread-and-butter standard way of using DXF files for interchange, Niklas will go over implementing an SVG exporter using Python to be able to export into another format that is a bit more common amongst designers than DXF.

Download Project File (.zip)

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

10 Comments

  1. Thanks for the very helpful Python script. I just wanted to say that it’s possible to do this with a slightly different method, albeit not in a pure Houdini environment. If you have access to Rhino, then you can export from Houdini as an ‘IGES’ file, and import that into Rhino. From there, Rhino can export to Illustrator.

  2. Is it any skill to export the color from Houdini to AI?

  3. benjamin

    please delete my comment , it’s not working in any case
    🙂

  4. Carl Fairweather

    Thanks for the tutorial guys. That SVG export is just what I’ve been after, thank you.

    I have an alternative approach for flattening the geometry into the XY plane. Just needs two wrangle nodes so you can keep it vex based:

    wrangle1_removeCamTransform:

    matrix camM = optransform(chs(“cam”)); // create parameter and pick the camera
    @P *= invert(camM);

    wrangle2_flattenToXYPlane:

    vector bboxMax = getbbox_max(0); // getbbox has _min and _max in H16+
    float zDiff = bboxMax.z – @P.z;
    vector dir = -normalize(@P);
    float cos = dot({0,0,1},dir);
    @P += ((zDiff/cos)*dir) + set(0,0,-bboxMax.z);

  5. Found japan webpage, “How to use Wren ROP and pipe with external application by SOHO”, where he dealing with same problem, how to export nurbs from Houdini to Illustrator as SVG. Not really understand what exactly he is doing, but may be you, Entagma guys, can make it more clear.
    Take a look, use google translate:
    https://qiita.com/kit2cuz/items/0acc5b6352129db587cb

    • It’s too bad Wren node only works for Houdini FX, not Indie…
      Was hoping to find a way to write out an SVG sequence with Python instead. But have not found a way yet.

  6. Really helpfull tuto, i learned so much.
    But i don’t see the imprementation of Z = closepath
    in my case all my circle miss a part.
    So it miss a Fuse to close the path primitives.
    then How can we check if the primitive/path is closed ?
    the hou.Face class have function isClosed (but not what i expect)
    Thx

Leave a Reply