Houdini Crash Course#
Overview#
Terminology#
Tutorials#
- General Tutorials
- Maya To Houdini
- Houdini Training
-
Cvex_bsdf
- http://www.sidefx.com/docs/houdini/vex/functions/cvex_bsdf
- https://gist.github.com/WhileRomeBurns/38edb7ac5476f52ae3fd
- https://github.com/groundflyer/physhader-for-mantra
-
ggx_eval, approxsss_sample
-
Irradiance Caching
-
https://groundflyer.github.io/point-based-gi.html#point-based-gi
-
Illuminance
-
http://www.sidefx.com/docs/houdini/vex/functions/illuminance
-
OpenGL Shaders
- http://www.sidefx.com/docs/houdini/shade/opengl
- https://www.sidefx.com/docs/hdk/_h_d_k__viewport_g_l3.html
-
Scripting
- http://www.sidefx.com/docs/houdini/render/soho
Internals#
- For every cook (frame change, parm change, etc)
- the network starts at the Display/Render node and then walks up the chain looking for nodes with changes and evaluates dependencies for each node also querying those nodes for changes until it hits the top nodes
- The nodes marked dirty causing the network to evaluate the dirty nodes top down evaluating the dependencies that were found
- You can set a few options in the Performance Monitor to work in the older H11 way and see this evaluation tree order if you wish.
- It is "mandatory" that you do this if you want a deeper understanding of Houdini.
- You definitely need to use the Performance Monitor if you want to see how the networks have evaluated as it is based on creation order along with the set-up dependencies.
- Yes deleting and undeleting an object can and will change this evaluation order and can sometimes get you out of a spot with crashing.
- Houdini is a file system, in memory, and on disk in the .hip "cpio" archive file.
- If you want, you can use a shell, and given any .hip file, run the hexpand shell command on the file
- This will expand the Houdini file in to a directory structure that you can read and edit if you so wish
- Then wrap it back up with hcollapse
- Each node is captured as three distinct files:
- the file that that adds the node and wires it up to other nodes
- the parameter file that sets the nodes parameters
- another file that captures additional info on the node
- If you locked a SOP, then that binary information will be captured as a fourth file for that node
- Different types of node networks and nodes of a specific type can only be worked on in specific directory node types
- You can dig deeper with Houdini textport pane to navigate the houdini scene via the textport as you would in a unix shell
- opcf (aliased to cd)
- opls (aliased to ls)
- oppwf (aliased to oppwd and pwd)
- Ex
Bashcd '/obj' ls -al
- (Reference) - an excellent Houdini Internals Explanation
References#
- Excellent Houdini Internals Explanation
- Attributes
- Global expression variables
- Standard variables
- Local SOP variables
- Houdini basics
- Terminology
- More Terminology
Coordinate System#
Coordinate System: Right handed, Y-Up
Matrix
- Matrices are post multiplied (
x * M * V * P
) - Row addressable
M[RowIndex][ColumnIndex]
- Matrix stored as row major
m[0]-m[3]
= first row,m[4]-m[7]
= second row
Note that Houdini’s matrices are stored in row-major format, and vectors that are multiplied with matrices are treated as row vectors. (Reference)
- So, if p is a hou.Vector4 representing a point and M is a Matrix4, you write
p*M
, notM*p
- Similarly,
p*M1*M2
will first transform p by M1, and then transform it by M2
IMPORTANT however, in the houdini network editor, some nodes like channel multiply can be premutliplied/postmultiplied.
For left to right inputs A, B, C =>
- Post-multiply (eg Multiply node) means
v * C * B * A
- Pre-multiply (eg Transform node) means
v * A * B * C
are connected in a left to right order bc they are "post-multiply implying a premultiply order (eg: WorldSpace * ObjectSpace * v). Others like transform give you the option to premultiply or post multiply
Configuration#
- Environment Variables
- Houdini Python Setup
- hconfig: for listing houdini config and environment variables
-a
: dump all the environment vars-ap
: dump all the seach paths- hgpuinfo: dump GPU info
-c/-l
: dump OpenCL info for active/all devices-g
: dump OpenGL info-o
: dump OptiX info- Special characters:
@
=> expands to directories inHOUDINI_PATH
Ex: ifHOUDINI_PATH=$HIP;$HFS/houdini;$HOME/houdini
, then@/vex
would expand to$HIP/vex;$HFS/houdini/vex;$HOME/houdini/vex
=
=> equiv to$HIP
&
=> default path for given envar^
=> expands to the shader type for VEX-related variables
Ex: ifHOUDINI_VEX_PATH="$HOME/vex/^"
, when loading Surface shaders it will expand to"$HOME/vex/Surface"
Shortcuts#
To set a shortcut, click on a menu option while holding ctrl+shift+alt to bring up the hotkey manager for that menu command
General#
Viewport#
Shortcut | Description |
---|---|
Spacebar+B | Toggle maximize viewport (from splitview to one view) |
X,C,V | Radial menu for Snapping, Current, View |
Spacebar+Z | Move viewport pivot |
S | Volatile toggle to selection |
Spacebar | Volatile: toggle to camera mode |
Shift+Z | Reset rotate pivot to a viewport center |
Viewport Modelling#
Shortcut | Description |
---|---|
/ | Toggle construciton plane |
Alt | to detach curve from construction plane |
Ctrl | Constrain placement within 45 degrees |
Space, Ctrl+6,7,8,9 | To save a particular view |
Space, 6,7,8,9 | Return to specific view |
/, Ctrl+6,7,8,9 | To save a particular c-plane |
/, 6,7,8,9 | Return to specific c-plane |
Network pane#
Shortcut | Description |
---|---|
C | color |
P | parameter |
Shift+A+Mouse Drag Up/Down | Layout selected nodes either vertically or horizontally |
Network view#
Action | Shortcut |
---|---|
Align nodes | press A, press LMB, move left(or up) |
Move node with upstream connections | Shift + LMB + move |
Move node with downstream connections | Ctrl + LMB + move |
Duplicate node | Alt + LMB + move . |
Duplicate node with upstream connections | Alt + Shift + LMB + move |
Duplicate node with downstream connections | Alt + Ctrl + LMB + move |
Set display and render flag | R + LMB click |
Set render flag | T + LMB click |
Set bypass flag | Q + LMB click |
Set template flag | W + LMB click |
Reoder inputs | Shift + R |
Add **dot | ** Alt + LMB click . |
Pin the wire | Alt + LMB click |
Cut the wire | Y + LMB drag |
Set quickmark 1 | Ctr + 1 |
Go to quickmark 1 | 1 |
Togle quickmarks | tilda |
Drop visualizer node | X+LMB |