Variables
Houdini's built-in variables reference
Overview
Houdini provides built-in variables for accessing file paths, geometry data, time, and other system information. Use these in parameter fields with HScript expressions.
Important Notes
- • These variables use HScript syntax (e.g.,
$F*2
) - • In VEX, use attribute bindings instead (e.g.,
@Frame
,@Time
,@P
) - • Check Help → Expression Functions → Variables for complete list
File and Path Variables
Variable | Meaning |
---|---|
$HIP | Directory of the currently opened Houdini scene file (.hip) |
$HIPNAME | File name of the current .hip file without path or extension |
$HIPFILE | Full path to the current .hip file |
$JOB | Project root directory (set manually in File → Set Project) |
$TEMP | System temp directory used by Houdini |
$HOUDINI_TEMP_DIR | Houdini's temporary storage directory |
$HOME | User's home directory |
$HOUDINI_USER_PREF_DIR | Houdini user preferences directory |
Node and Geometry Variables
Variable | Meaning |
---|---|
$OS | Name of the current node (Operator String) |
$OBJID | Object identifier |
$SOPPATH | Full path to the current SOP node |
$PR | Current primitive number being processed |
$PT | Current point number being processed |
$VTX | Current vertex number being processed |
$NPT | Total number of points in the geometry |
$NPR | Total number of primitives in the geometry |
$NVTX | Total number of vertices in the geometry |
$CR, $CG, $CB | Color components (red, green, blue) of a point/primitive |
$CA | Alpha component of color |
$TX, $TY, $TZ | Translate position (X, Y, Z) |
$CEX, $CEY, $CEZ | Centroid position of geometry or group (X, Y, Z) |
$BBX, $BBY, $BBZ | Bounding box center (X, Y, Z) |
$SIZEX, $SIZEY, $SIZEZ | Bounding box size (X, Y, Z) |
Time and Animation Variables
Variable | Meaning |
---|---|
$T | Current time in seconds |
$F | Current frame number |
$FF | Current floating-point frame number (includes subframes) |
$FPS | Frames per second |
$RFSTART / $RFEND | Start / End frame of the simulation range |
$FSTART / $FEND | Start / End frame of the playbar range |
$TLEN | Length of the playbar range in frames |
$NFRAMES | Total number of frames in the animation range |
$TSTART / $TEND | Start / End time in seconds of the playbar range |
$RSTART / $REND | Start / End frames of render range |
Transform Variables
Variable | Meaning |
---|---|
$RX, $RY, $RZ | Rotation values (X, Y, Z) in degrees |
$SX, $SY, $SZ | Scale values (X, Y, Z) |
$PX, $PY, $PZ | Pivot position (X, Y, Z) |
$LX, $LY, $LZ | Local position (X, Y, Z) |
$WX, $WY, $WZ | World position (X, Y, Z) |
Render and Simulation Variables
Variable | Meaning |
---|---|
$WEDGE | Wedge index when running wedge renders |
$SLICE | Slice number for distributed simulations/renders |
$NSLICES | Total number of slices in distributed simulation |
$ITERATION | Current iteration number in simulations |
$SUBSTEP | Current substep in simulation |
$SIMFRAME | Current simulation frame |
$SIMTIME | Current simulation time |
System and Miscellaneous Variables
Variable | Meaning |
---|---|
$CH | Channel value when used with functions like ch("parm") |
$USER | Current username |
$HOSTNAME | Computer hostname |
$OS | Operating system (Windows, Linux, MacOS) |
$ARCH | System architecture (x64, etc.) |
$HOUDINI_VERSION | Current Houdini version number |
$PI | Mathematical constant Pi (3.14159...) |
$E | Mathematical constant E (2.71828...) |
$DEGS | Degrees to radians conversion factor (180/π) |
$RADS | Radians to degrees conversion factor (π/180) |