Houdini 101

From bernie's
Jump to navigation Jump to search

This page was created when I learned Houdini, it might be old and wrong ! (looking at you, HOM expressions). I'll try to add more info with the hindsight.

Where to Start

There's a ton more videos nowadays then when I learned houdini, and instead of pointing to a thousand websites (well, I do just afterwards in the [links]), I'll simply point out that SideFX have a curated list of tutorials.

Links

Links to stuff I've saved (could have been a webring. remember those?). This was started long ago, some sites might be down, let's try to clean this up (2023 edit)

  • Manuel and Moritz' Entagma. If you're seeing this page, you probably know their soothing voice already !
  • Richard C Thomas's website, loads of cool stuff!
  • Junichiro Horikawa's experiments, he's also in the Houdini subreddit.
  • Howiem's blog with code, CHOPs and various hardware hacking.
  • Houdini Gubbins technical blog. Doesn't share HIPs, but goes through his ideas, thought processes and implements research papers. Super inspiring stuff !
  • Matt Estela's cgwiki, aka Our Houdini Jesus :° -- if you landed on my wiki you've probably seen him. Super nice ressource and eve nicer dude, gives away his files too.
  • Henry Foster, known as Toadstorm has a blog, and also created MOPs, which tries to make Motion Design life more like Cinema4D (ie friendlier)
  • John Kunz's wiki, and associated youtube account with top Notch recorded streams.
  • Jake Rice's blog (not updated recently)
  • Probiner's website (not updated much anymore)
  • Eetu Martola's blog (last update 2021)
  • Sam Hancock's blogspot (last update 2020 but interesting articles nonetheless)
  • Technische Universität Berlin's wordpress 'for Mathematicians'.
  • Rich Lord's website, full of downloadable goodies (creatures made with constraints!) It had disappeared from the web glad to see it's back up.
  • -------- TODO sort the rest of the list --------------

Other Nifty links

Flips

Basic setup:

cJpBIsk.png
  • better quality: more points (smaller point separatation) or decrease grid scale
  • reseed particle in flipsolver: nice for droplets but /!\ particle IDs change

Expressions Vex & General Syntax

Houdini_VEX

$NPT number of points
$CEX $CEY $CEZ centroid
$FF frame number 
$T time
$PT point
$CR $CB $CG color

$OS use node name (in groups for ex)

$CY copy number in copy node, use for placement w/o having to stamp

`$OS`_`$OBJID` give objects nynamic names 
opdigits($NAME)

opinputpath("sopnode",inputN) get the incoming connection (0, 1...)
op:`opinputpath("../",1)`      ---> get full path of input 2 of parent
nprims("../sort1")       ----> number of primitives
$TEMP/houdiniCache/simdata.`padzero(4,if($F>70,70,$F))`.simdata   -----> read from cache, hold at a certain frame

$OS.`substr(chs("camera"),rindex(chs("camera"), "/")+1,200)`      ------> get the name of the camera if it's a complicated name with lots of / / / 
------------------------------------------------------------
in vex no uppercase:
v@Cd
i@id
set()


Print to console with precision

printf("Point %*.*g\n", 10, 10, @value);

Expressions dump

On a switch; switches between inputs if first input is an empty vdb (fix for Maxwell's shitty VDB implementation) - the second input being an 'empty' but existing vdb

if(prim(opinputpath(".",0),0,"file_voxel_count",0)!=0,1,0)

Shortcuts

general / viewport
---------------------
ctrl-b: full window
h: center
d: display options
p: show params
space-shift-h: center on object
h: center on grid/frame current selection
w: wireframe
left/right arrows =prev/next frame
ctrl-left arrow: go to first frame

node editor
---------------------
u/i: up down hierachy
c: set color
ctrl-click on node blue bit: becomes purple = final output


animation
---------------------
alt on param boxes = keyframe
alt on param name = key x y z

chops:
---------------------
d show points on curve


graph editor:
---------------------
shift-lmb: access graph editor
up down arrows: play forward
left right: prev next frame
v-h: zoom vertically/horizontally
j: show whole timeline
k: key all
g: group keys 

* drag & drop parameters


vopsop
----------------------
r: reverseinputs


POPNET

  • birthgroup: group of particles that were just borne, lasts 1 frame

DOPNET

  • can inherit params
  • 3 solvers, bullet = speed
  • 'activate' node to do bullet time
  • shelf tool always update latest created dopnet ('set always')
  • clones for active object = active creation with modulo

General

  • drag and drop nodes to get path names

Color Schemes

  • Red: out geo
  • Purple: VOP_name
  • Yellow: creation/merge
  • Blue: POP DOP
  • Light Green: Pre split

Volumes

  • Volume from inside as well as surface:
  • add a 'volume from points' > ' stamp points ' before volume object


  • with volume dops: use curl noise --> 4d with vector4 to do a time noise
  • displace noise: use shader, dig into 'fireball' shader

Wtf

${OS}_new_pieces
pillar_?   (group)
@Cd
$VALUE
vector vexcode
`interpreted text`
op:opinputpath
chramp(values)


rendering

  • get motion blur on objects : geometry velocity motion blur
  • plug stuff in a premade mantra surface (displace along normal, diffuse etc...)

Chops

  • right click anim channels to add motion effects
  • expressions: $I = ptnum, for curves
  • object merge to grab channels
  • multiply: order is important
  • lookup: timeshift
  • at Geo level, to get chop value: chop("../CHOPNET/out/ty0") or chopf
  • recording mouse keyboard: keyboard - mouse -> record, hit scroll lock to disable shortcuts

l-systems

http://algorithmicbotany.org/papers/

proba: ':'
rules
function

nodes

point replicate : multiply points

attribute promote : transfer from point <> primitives


Render Stuff and Cache Geo and Alembic

  • wedge: change node values an filenames with $WEDGENUM
  • fetch: renders specific ROPs, can be daisy-chained with a merge and (node to node)
  • multiple shapes in maya with alembic: in Houdini, need a primitive with strings called 'name', the names will be shape names, in the alembic exporter, make sur to choose Partition Mode: Use Combination Of Transform/Shape Node and choose previously created 'name' as Attribute (also Ogawa format - ?)

Fur/hair

  • put RBD solver before Wire solver in merge otherwise = bug


Python

Houdini_Python

Howto's / Tricks

  • Wedges and HQUEUE:

OjEpvpv.png

  • stop stepping: disable integer in frame options, add timeblend
  • using 'rest' to get more interesting fractures
  • restpos: can be used in SHOPS to get object space

pZLGdrn.jpg

  • instances: instancepoint() w/ full point instancing --> packed disk primitives = refs = light
  • instances materials: "declare materials>declare all shops" to export shaders to instances (add using paramet interface window)
  • triangulate a whole object cleanly using foreach primitive

0KZYipI.jpg

  • On crashes: load with 'Manual' and hit escape so nodes aren't read (if file is corrupt for ever)
  • Blend between slowed down continuous mesh:

eduhgBs.png

  • RBD Point Object from sequence from odforce:
    • add int attr on points (call it 'shape')
    • write RBDs to disk
    • in RBD point object override point value geometry path: /path/to/geo.*.bgeo
    • 'allow editing of contents' in RBD point object, dive inside fin 'sopgeo2', add a stamp OBJID, $OBJID, disable 'Use External SOP'
    • dive inside sopgeo, add a read file, and replace * from RBD point object to proper file path: `strreplace(chs("../../geopath"), "*", point("/obj/gridscatter/OUT", stamp("..", "OBJID", -1), "shape", 0))`


  • Parenting: at object level or using 'Rivet' for deforming geo
  • Group according to mesh connectivity: use 'Island 1' 'Island 2' etc...
  • If you get 'unable to initialize UV rendering module with camera' when baking textures, add a new cam to your scene (cam1)
  • If you are using maxwell and alembic (abc) files to render particles (realflow plug-in) you NEED a vector v and int id attributes otherwise it won't render
  • Fluid simulation: collision reversed ? Use a vdb with a static solver, and reverse the vdb with a volume wrangle @surface *= -1
  • Why is my motion blur not working ? You need 'v' and to check 'geometry velocity blur' on your object
  • I still have a hard time with vex code rotations/matrices even with matt estela's wiki so VOP quicktip to rotate normals around an edge:

RcrtESH.png

Specific Forum/Blog/Wiki articles

Modeling

Vex