agentleFS
rheadshrheadsh/audiovisual-production-skills/hou-python/SKILL.md

hou-python

Skill40 starsChanged 5 months agoMITView on GitHub

Write Python (HOM) for SideFX Houdini — procedural modeling, animation, and render automation. Use when scripting the hou module, Python SOPs, parameter expressions, keyframe/animation rigs, ROP/Karma render farming, or translating sculpting and carving workflows into procedural code. Triggers on hou.node, hou.Geometry, Python SOP, hython, .hip automation, or any Houdini Python task.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 1

    1. eltallerdepiyamas/claude-skills★ 0100% same

    Edited · 0

    None found.

    Wrote their own version · 0

    None found.

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository7 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Write Python with the Houdini Object Model (HOM) for procedural modeling, animation, and optimized rendering.

    line 8
  2. Distinctive:

    When providing Houdini Python, always include:

    line 89
  3. Distinctive:

    Write the minimal working script, then add error handling.

    line 100
  4. Distinctive:

    Use Python to *orchestrate* (build networks, set parms, render).

    line 123

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Houdini Python (HOM) Scripting

Write Python with the Houdini Object Model (HOM) for procedural modeling, animation, and optimized rendering. The hou package is the root of the API and is auto-imported inside parameter expressions and hython; everywhere else you import hou.

Quick Start

There are four main places Python runs in Houdini:

# 1. PARAMETER EXPRESSION (one-liner, language set to Python, auto-cooks)
hou.frame()                                  # current frame
hou.ch("../master/scale")                    # value of another parm
hou.pwd().parm("ty").eval() * 2

# 2. PYTHON SOP (generate/modify geometry per cook)
node = hou.pwd()
geo = node.geometry()
pt = geo.createPoint()
pt.setPosition((0, 1, 0))

# 3. SHELF / SCRIPT / hython (drive the whole scene)
import hou
geo_obj = hou.node("/obj").createNode("geo", "carved_block")
box = geo_obj.createNode("box")
box.parm("scale").set(2.0)

# 4. CALLBACKS & EVENTS (react to parm changes, scene events)
def onParmChanged(node, **kwargs):
    hou.node("/obj/light1").parm("dimmer").set(node.parm("intensity").eval())

Critical Rules

  1. hou.pwd() is the running node — inside a Python SOP it returns that SOP; hou.pwd().geometry() is the geometry to build into.
  2. .eval() to get a value, .set() to write — node.parm("tx").eval() reads; node.parm("tx").set(5) writes. Use parmTuple for vectors: node.parmTuple("t").set((1,2,3)).
  3. Bulk attribute access beats per-element loops — geo.setPointFloatAttribValues(...) / geo.pointFloatAttribValues(...) are an order of magnitude faster than iterating geo.points() in Python.
  4. Never trigger cooks in a tight loop — batch edits, then let Houdini cook once. Wrap large scene edits in with hou.undos.disabler(): for speed when undo isn't needed.
  5. Math runs once per cook in expressions — keep expressions cheap; move heavy work into a Python SOP or cache it as an attribute. Prefer hou.frame()/hou.time() over recomputing time.
  6. Python is single-threaded; VEX is not — for per-point math at scale, generate a Wrangle from Python rather than looping points in Python. (See hou-vex.)

The Core Objects (under the hou module)

hou.node("/obj/geo1")          # node by absolute path  -> hou.Node
hou.pwd()                       # the node running this code
hou.parent()                    # parent of the running node
hou.ch("../ctrl/speed")         # quick parm read (expression shorthand)
hou.frame()                     # current frame (float)
hou.time()                      # current time in seconds
hou.fps()                       # scene FPS
hou.playbar.setFrameRange(1,240)
hou.hipFile.path()              # current .hip path
hou.pwd().geometry()            # hou.Geometry of the running SOP

Three Domains This Skill Covers

This skill maps three production domains onto HOM Python. Each has a dedicated reference:

1. Procedural Modeling — carving & sculpting as code. Traditional craft splits into subtractive (carving wood, stone, wax — remove material from a mass) and additive (clay sculpting — push, pinch, and build up form). Both map cleanly to procedural operations. See reference/MODELING.md for the full translation table and recipes:

  • Subtractive (boolean carving, displacement erosion, chiseling with VDBs)
  • Additive (clay-like push/inflate, polymer vs. oil vs. water clay behaviour, smoothing)
  • Build geometry from scratch in a Python SOP, drive HDA carving tools, VDB sculpt loops

2. Animation — the 12 principles, expressions, optimized time math. See reference/ANIMATION.md for keyframing via HOM, expression-driven motion, and how the 12 classic principles (squash & stretch, anticipation, ease in/out, follow-through, etc.) become hou.Keyframe, bezier interpolation, and cheap time functions.

3. Rendering — Python-driven, optimized. See reference/RENDERING.md for batch ROP/Karma rendering, frame-range farming with hython, wedging, dependency-aware output, and the optimization checklist (cook once, freeze sims, defer-load, sane bucket/sample settings).

Common Patterns

See examples/PATTERNS.md for copy-paste templates:

  • Node creation, wiring, and layout
  • Parameter read/write, keyframes, expressions
  • Building geometry in a Python SOP (points, polys, attributes — bulk and per-element)
  • Carving (boolean / VDB) and clay (smooth / inflate) recipes
  • Animation rigs and the 12 principles in code
  • Batch rendering and wedging

Response Format

When providing Houdini Python, always include:

  1. Python code with comments.
  2. Context — where it goes (parameter expression, Python SOP, shelf tool, hython script, or event callback).
  3. Houdini setup — which nodes to create, how to wire them, parameters to set, and whether the parm language must be switched to Python.
  4. Performance note — if the operation could cook heavily, say how to keep it cheap (bulk attrib calls, freeze, cook once).

Writing Process

  1. Identify the context (expression / Python SOP / standalone hython / callback).
  2. Choose Python vs. VEX — heavy per-point math should be VEX generated from Python.
  3. Write the minimal working script, then add error handling.
  4. Note required node connections, parm setup, and the cook/render cost.

Additional Resources

  • examples/PATTERNS.md — Ready-to-use templates per context
  • examples/COMPLETE.md — Full systems (procedural carved relief, clay-sculpt setup, animation rig, render farm script)
  • reference/API.md — Core HOM API (hou.Node, hou.Geometry, hou.Parm, hou.Keyframe, ROPs)
  • reference/MODELING.md — Carving & clay-sculpting workflows in Python
  • reference/ANIMATION.md — 12 principles, expressions, optimized time math
  • reference/RENDERING.md — Render automation & optimization
  • reference/BEST-PRACTICES.md — Performance, organization, style
  • reference/TROUBLESHOOTING.md — Common errors & fixes
  • templates/ — Starter scripts (Python SOP, animation, batch render)

Key Differences from Other Languages

From TouchDesigner Python (td-python):

  • hou.pwd() ≈ me; hou.node(path) ≈ op(path); .eval()/.set() instead of direct par assignment.
  • Houdini cooks a dependency graph on demand — there is no continuous per-frame onCook unless you render or scrub.

From VEX (hou-vex):

  • Python is single-threaded and runs once per cook; VEX runs per-element in parallel.
  • Use Python to orchestrate (build networks, set parms, render); use VEX/Wrangles for per-point math at scale.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.