Alaa Alnahlawi

Alaa Alnahlawi

About Me

Greetings! My name is Alaa Alnahlawi, and I am a seasoned Post Producer / VFX Supervisor from Syria with over a decade of experience spanning multiple graphic design fields. I am passionate about my work, and I have a proven track record of delivering exceptional results that exceed client expectat...  more
専門知識
Technical Director
業界:
Film/TV

Connect

LOCATION
Riyadh, Saudi Arabia
ウェブサイト

Houdini Engine

Availability

Not Specified

Recent Forum Posts

Illustrator → Houdini: Smart SVG Importer (Python SOP) 2025年10月8日6:32

Your text to link here... [c10.patreonusercontent.com]

Update v2:

New elements

<line> support – imports as stroke centerlines (open polylines).
Optional: Bake Strokes → converts each line to a thick bar (closed rectangle).

<polyline> support – imports as stroke centerlines (open polylines).
Tip: give thickness later with PolyExpand2D or Sweep.

Layering & order
svg_layer (string) – hierarchical layer/group path from the SVG
(e.g., Main/Ornament/Stem — great for layer-based materials and for-each loops).

svg_order (int) – Illustrator-like draw/stack order (back → front).
Use Sort SOP → By Attribute → svg_order to match paint order.

Stroke workflow
Import Strokes toggle

Strokes as centerlines – centerline curves with stroke_width per prim

Bake Strokes (rect/circle/ellipse/line) – generates closed geometry for simple shapes

Stroke Width Scale – multiplies parsed stroke widths

Fill rules & hole helpers
svg_fillrule (nonzero / evenodd)

svg_area (signed), svg_winding (cw/ccw)

svg_contour (0,1,2,…) & svg_is_hole_evenodd (0/1)

svg_path_id – groups all contours from the same SVG element

Other quality-of-life
name attribute from element id → class → tag (easy selections/materials)

Honors transforms (matrix/translate/scale/rotate) and class CSS from <style>

Resolves <defs> + <use>

Rect clipPath support (contents are clipped to the rectangle)

Flip Y, Normalize, Base Curve Samples, Verbose Debug

Quick tips
Give lines/polylines thickness: add PolyExpand2D after the importer → Distance ≈ @stroke_width/2.

Match Illustrator stacking: Sort SOP by svg_order.

Layer materials: use groups/expressions on @svg_layer.

Current limits
Non-rect clipPaths, masks, gradients/pattern fills, and precise stroke joins/caps aren’t baked (centerlines preserved).

Hole booleaning isn’t automatic—use the provided attributes in a simple For-Each/Boolean pass if needed.

Original Post:
Ever wished you could bring Illustrator artwork straight into Houdini as clean geometry with colors intact—without a mess of broken paths? I built a compact Python SOP that does exactly that, with a bunch of quality-of-life features baked in.

What it does
Reads real-world SVGs (from Illustrator, Figma, Inkscape) and turns them into Houdini polygons.

Preserves fills (Cd colors), optional strokes, and group transforms.

Handles complex paths: M/L/H/V/C/S/Q/T/A + Z, including arcs and smooth handles.

Respects class-based styles from <style> blocks (e.g., .cls-4 { fill:#9f3b29 }).

Supports <defs> + <use> (no more missing instances).

Optional clipPath support (rectangular clips) so what you see matches your design.

Adds useful attributes for post-work: svg_path_id, svg_contour, svg_fillrule, svg_winding, svg_area, and stroke_width.

Why it’s useful
Perfect for motion graphics, type & logos, and pattern art you want to animate, extrude, bevel, or scatter in Houdini.

Keeps your color design intact from day one—no manual reassigning.

Gives you the data to rebuild holes correctly (nonzero/even-odd), or expand strokes later with PolyExpand2D.

Highlights
Colors: Fill colors become Cd on points.

Strokes: Import as centerlines with a stroke_width attribute, or bake simple strokes (rect/circle/ellipse) as outer/inner rings.

Transforms: Honors element & group transforms (matrix/translate/scale/rotate).

Robust parsing: Even tricky S, T, and A commands are handled safely.

How to use (quick start)
Set Houdini Update Mode → Manual.

Drop the Python SOP supplied.

Point it to your SVG file.

Toggle options:

Flip Y if your art imports upside-down.

Normalize to recenter/scale to unit size.

Import Strokes (centerlines or baked rings).

Respect clipPath if your file uses rectangular clips.

Force Recook, then press H to frame.

Working with holes (optional)
Houdini polygons don’t carry SVG fill rules. I tag each contour with svg_area (signed) and svg_winding.

For nonzero: Boolean subtract contours whose winding opposes the outer ring.

For evenodd: Use svg_is_hole_evenodd (second, fourth… ring = hole).
I can share a tiny For-Each/Boolean setup if you want a one-click “make holes” subnet.

Performance tips
Start with Base Curve Samples = 12 (default). If art is heavy, lower to 8–10.

If you only need fills, turn off baked strokes.

Use Normalize + H to find off-canvas geometry quickly.

If you share results, tag me—I love seeing what you build with it.
Questions or edge cases (masks, complex clipping, compound fills)? Drop a comment and I’ll extend the importer for you.