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

VariableMeaning
$HIPDirectory of the currently opened Houdini scene file (.hip)
$HIPNAMEFile name of the current .hip file without path or extension
$HIPFILEFull path to the current .hip file
$JOBProject root directory (set manually in File → Set Project)
$TEMPSystem temp directory used by Houdini
$HOUDINI_TEMP_DIRHoudini's temporary storage directory
$HOMEUser's home directory
$HOUDINI_USER_PREF_DIRHoudini user preferences directory

Node and Geometry Variables

VariableMeaning
$OSName of the current node (Operator String)
$OBJIDObject identifier
$SOPPATHFull path to the current SOP node
$PRCurrent primitive number being processed
$PTCurrent point number being processed
$VTXCurrent vertex number being processed
$NPTTotal number of points in the geometry
$NPRTotal number of primitives in the geometry
$NVTXTotal number of vertices in the geometry
$CR, $CG, $CBColor components (red, green, blue) of a point/primitive
$CAAlpha component of color
$TX, $TY, $TZTranslate position (X, Y, Z)
$CEX, $CEY, $CEZCentroid position of geometry or group (X, Y, Z)
$BBX, $BBY, $BBZBounding box center (X, Y, Z)
$SIZEX, $SIZEY, $SIZEZBounding box size (X, Y, Z)

Time and Animation Variables

VariableMeaning
$TCurrent time in seconds
$FCurrent frame number
$FFCurrent floating-point frame number (includes subframes)
$FPSFrames per second
$RFSTART / $RFENDStart / End frame of the simulation range
$FSTART / $FENDStart / End frame of the playbar range
$TLENLength of the playbar range in frames
$NFRAMESTotal number of frames in the animation range
$TSTART / $TENDStart / End time in seconds of the playbar range
$RSTART / $RENDStart / End frames of render range

Transform Variables

VariableMeaning
$RX, $RY, $RZRotation values (X, Y, Z) in degrees
$SX, $SY, $SZScale values (X, Y, Z)
$PX, $PY, $PZPivot position (X, Y, Z)
$LX, $LY, $LZLocal position (X, Y, Z)
$WX, $WY, $WZWorld position (X, Y, Z)

Render and Simulation Variables

VariableMeaning
$WEDGEWedge index when running wedge renders
$SLICESlice number for distributed simulations/renders
$NSLICESTotal number of slices in distributed simulation
$ITERATIONCurrent iteration number in simulations
$SUBSTEPCurrent substep in simulation
$SIMFRAMECurrent simulation frame
$SIMTIMECurrent simulation time

System and Miscellaneous Variables

VariableMeaning
$CHChannel value when used with functions like ch("parm")
$USERCurrent username
$HOSTNAMEComputer hostname
$OSOperating system (Windows, Linux, MacOS)
$ARCHSystem architecture (x64, etc.)
$HOUDINI_VERSIONCurrent Houdini version number
$PIMathematical constant Pi (3.14159...)
$EMathematical constant E (2.71828...)
$DEGSDegrees to radians conversion factor (180/π)
$RADSRadians to degrees conversion factor (π/180)