12.0 Expressions
https://www.sidefx.com/docs/houdini/ref/expression_cookbook.html
https://www.sidefx.com/docs/houdini/expressions/index.html
12.1 Channel lookups
ch() Returns the value of a parameter. chramp() chs() Evaluates the string value of a parameter at the current time. chf() Evaluates a parameter at a given frame.
12.2 Current frame
$FF or @Frame (sub-frames) $F $SF (simulation frames)
12.3 Current time
$T or @Time
12.4 Random number
rand($F)
12.5 Fit range
fit01(n, newmin, newmax)
12.6 Trigonometric functions
cos(@ptnum * 2) sin()
12.7 Conditions
if ($F<12, $F, 75)
12.8 Attributes
prim("/obj/geo1/facet1", 3, "P", 0) Evaluates the X component of the centroid of primitive 3 in the specified surface node. point("/obj/geo1/facet1", 3, "P", 0) Returns the X component of point 3 of the facet1 surface node in geo1. detail("/obj/geo1/attribpromote1", "area", 0) floor()
12.9 Other
abs() Returns the absolute value of the argument. sqrt() atof() Converts a string to a float bbox() Returns bounding box information for a surface node chop() Evaluates a channel within a CHOP at the current time. clamp() Returns a value clamped between a minimum and maximum. cross() Computes the cross-product of two vectors. dot() Computes the dot product of two vectors. max() Returns the larger of two values. normalize() Normalizes a vector. opdigits() Returns the numeric suffix of a node name. padzero() Returns a string padding a number to a given length with zeros. padzero(5, 126) = 00126 smooth() Takes a value and range and returns a smooth interpolation between 0 and 1. smooth ($F, 12, 55) This example will generate an ease-type curve between values 0 and 1, starting at frame 12 and ending at frame 55. Dig it!