$-globals and @-attributes

Houdini Global Variables Reference

The two families of Houdini globals in one place: HScript $-variables for parameters and VEX @-attributes for wrangles, with what each means.

Houdini has two kinds of global you meet constantly, and mixing them up is a common source of confusion. HScript $-globals live in parameter fields; VEX @-attributes live in wrangles.

HScript global variables ($)

These resolve in parameter fields and expressions.

VariableMeaning
$F, $FFCurrent frame (integer), and the fractional frame.
$T, $FPSCurrent time in seconds, and the scene frame rate.
$OSName of the current operator (node) - great in file paths.
$HIP, $HIPNAMEFolder of the current .hip, and its file name.
$JOBProject root - anchor paths here to keep a project portable.

VEX attribute globals (@)

These are the attributes you bind and edit inside wrangles.

AttributeTypeMeaning
@PvectorPoint position in world space.
@NvectorNormal - shading and copy-to-points primary axis.
@CdvectorDiffuse colour.
@ptnumintCurrent point number.
@numptintTotal number of points.
@TimefloatCurrent time in seconds, inside VEX.
@pscalefloatUniform per-point scale for copies and points render.

Which one do I use?

If you are typing into a parameter field, you want an HScript $-global. If you are inside a wrangle processing geometry, you want a VEX @-attribute. Note the overlap in naming: $F (HScript frame) and @Frame / @Time (VEX) refer to the same clock from different worlds. See the HScript cheatsheet for expressions that use the $-globals, and the snippets for wrangles that read the @-attributes, such as rand(@ptnum).

Frequently asked questions

What is the difference between $F and @Time?

$F is the HScript frame number used in parameter fields; @Time is the current time in seconds available inside VEX wrangles. Both describe the playhead from different contexts.

Is @ptnum available in every wrangle?

@ptnum is the current point number when a wrangle runs over points. In other run-over modes you get the matching index, such as the primitive or vertex number.

Open Houdini VEX Lab