Logo vun Hou Python

Hou Python

Communautéit
rheadsh
hou-python

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.

Iwwersiicht

Editeurrheadsh
Repositoryaudiovisual-production-skills
Skill-Nummhou-python
Stären
45
Forks
2
Matgeliwwert Fichieren
11
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 11 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    Vum rheadsh op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Hou Python an TypingMind, fir e mat all LLM ze benotzen, oder füügt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vun GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier hei drënner an a bestätegt.
    https://github.com/rheadsh/audiovisual-production-skills/tree/main/hou-python
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill afügen → Vu GitHub-URL, pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an de Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/rheadsh/audiovisual-production-skills.git /tmp/audiovisual-production-skills
mkdir -p .claude/skills
cp -r /tmp/audiovisual-production-skills/hou-python .claude/skills/hou-python
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Hou Python an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Hou Python automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Hou Python net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Keys.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

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:

python
# 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)

python
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

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.

Matgeliwwert Fichieren

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Hou Python?

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.

Firwat Hou Python op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Hou Python besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt amplaz vun engem Abonnement pro Benotzerplaz. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Hou Python an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/rheadsh/audiovisual-production-skills/tree/main/hou-python an. TypingMind liest d'Datei SKILL.md, bündelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Hou Python benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Hou Python benotzen?

Esou vill Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Hou Python domat benotzen – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama a méi – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Hou Python gratis?

Jo. De Skill gëtt vum rheadsh ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbaart Pak vun Instruktiounen, dat engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt en nokënnt a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a keng Lafzäitëmfeld a funktionéiere mat all Modell.

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇