abs
float abs(float x)
absolute value of x acos
float acos(float angle)
arc cosine in radians acosd
float acosd(float angle)
arc cosine in degrees angle
float angle(vector a,vector b)
angle between two vectors (in radians) asin
float asin(float angle)
arc sine in radians asind
float asind(float angle)
arc sine in degrees atan
float atan(float angle)
arc tangent in radians atan2
float atan2(float y,float x)
arc tangent in radians of y/x between -PI and PI atan2d
float atan2d(float y,float x)
arc tangent in degrees of y/x between -180 and 180 atand
float atand(float angle)
arc tangent in degrees bias
float bias(float x, float g)
Variation of gamma where values less than 0.5 pull the curve down
and values greater than 0.5 pull the curve up
pow(x,log(b)/log(0.5)) boxstep
float boxstep(float x,float a)
if x < a then 0 otherwise 1 ccellnoise
color cellnoise(vector v)
cellnoise generates a field of constant colored cubes based on the integer location.
This is the same as the prman cellnoise function. ccurve
color curve(float param,float pos0,color val0,int interp0,float pos1,color val1,int interp1,[...])

Interpolates color ramp given by control points at 'param'. Control points are specified
by triples of parameters pos_i, val_i, and interp_i. Interpolation codes are
0 - none, 1 - linear, 2 - smooth, 3 - spline,
4 - monotone (non oscillating spline) ceil
float ceil(float a)
next higher integer cellnoise
float cellnoise(vector v)
cellnoise generates a field of constant colored cubes based on the integer location.
This is the same as the prman cellnoise function. cfbm
color cfbm(vector vint octaves=6,float lacunarity=2,float gain=.5) cfbm4
color cfbm4(vector v,float time,int octaves=6,float lacunarity=2,float gain=.5) choose
float choose(float index,float choice1, float choice2, [...])
Chooses one of the supplied choices based on the index (assumed to be in range [0..1]). clamp
float clamp(float x,float lo,float hi)
constrain x to range [lo,hi] cnoise
color cnoise ( vector v)
color noise formed with original perlin noise at location (C2 interpolant) cnoise4
color cnoise4 ( vector v,float t)
4D color noise formed with original perlin noise at location (C2 interpolant) compress
float compress(float x,float lo,float hi)
Remaps x in [0,1] to [lo,hi] contrast
float contrast(float x,float x)
Adjust the contrast.  For c from 0 to 0.5, the contrast is decreased.  For c > 0.5, the contrast is increased. cos
float cos(float angle)
cosine in radians cosd
float cosd(float angle)
cosine in degrees cosh
float cosh(float angle)
hyperbolic cosine in radians cross
vector cross(vector a,vector b)
vector cross product cturbulence
color cturbulence(vector v,int octaves=6,float lacunarity=2,float gain=.5)
Absolute value of each noise term is taken. This gives billowy appearance curve
float curve(float param,float pos0,float val0,int interp0,float pos1,float val1,int interp1,[...])

Interpolates a 1D ramp defined by control points at 'param'. Control points are specified
by triples of parameters pos_i, val_i, and interp_i. Interpolation codes are
0 - none, 1 - linear, 2 - smooth, 3 - spline,
4-monotone (non oscillating spline) cvoronoi
color cvoronoi(vector v, int type=1,float jitter=0.5, float fbmScale=0, int fbmOctaves=4,float fbmLacunarity=2, float fbmGain=.5)
returns color in cellular pattern. It is a jittered variant of cellnoise. cycle
int cycle(int index, int loRange, int hiRange )
Cycles through values between loRange and hiRange based on supplied index.
This is an offset "mod" function. The result is rotates v such that the
Y axis points in the given up direction deg
float deg(float angle)
radians to degrees dist
float dist(vector a, vector b)
distance between two points dot
float dot(vector a,vector b)
vector dot product exp
float exp(float x)
E raised to the x power expand
float expand(float x,float lo,float hi)
Remaps x in [lo,hi] to [0,1] fbm
float fbm(vector v,int octaves=6,float lacunarity=2,float gain=.5)
fbm (Fractal Brownian Motion) is a multi-frequency noise function.
The base frequency is the same as the "noise" function. The total
number of frequencies is controlled by octaves. The lacunarity is the
spacing between the frequencies - a value of 2 means each octave is
twice the previous frequency. The gain< controls how much each
frequency is scaled relative to the previous frequency. fbm4
float fbm4(vector v,float time,int octaves=6,float lacunarity=2,float gain=.5)
fbm (Fractal Brownian Motion) is a multi-frequency noise function.
The base frequency is the same as the "noise" function. The total
number of frequencies is controlled by octaves. The lacunarity is the
spacing between the frequencies - a value of 2 means each octave is
twice the previous frequency. The gain< controls how much each
frequency is scaled relative to the previous frequency. fit
float fit(float x,float a1,float b1,float a2,float b2)
Linearly remaps x from the range [a1,b1] to the range [a2,b2]

Note: This extrapolates if x is outside [a1,b1]
To clamp the result, use fit(x,a1,b1,a2,b2)->clamp(a2,b2) floor
float floor(float a)
next lower integer fmod
float fmod(float x,float y)
remainder of x/y (also available as % operator) gamma
float gamma(float x, float g)
Gamma correction of x with gamma factor g gaussstep
float gasussstep(float x,float a,float b)
if x < a then 0, if x > b then 1, and
x transitions smoothly (exponentially) when < x < b hash
float hash(float seed1,[float seed2, ...])
Like rand, but with no internal seeds. Any number of seeds may be given
and the result will be a random function based on all the seeds. hsi
color hsi(color x, float h, float s, float i, float map=1)
The hsi function shifts the hue by h
(in degrees) and scales the saturation and intensity by s and i
respectively.  An map may be supplied which will control the shift
- the full shift will happen when the map is one and no shift will
happen when the map is zero.  The shift will be scaled back for
values between zero and one. hsltorgb
color hsltorgb(color hsl)
RGB to HSL color space conversion.
HSL is Hue, Saturation, Lightness (all in range [0..1] )
These functions have also been extended to support rgb and hsl values
outside of the range [0..1] in a reasonable way.  For any rgb or
hsl value (except for negative s values), the conversion is
well-defined and reversible. hypot
float hypot(vector v)
length of 2d vector [x,y] invert
float invert(float a)
Defined as 1-x length
float length(vector v)
length of vector linearstep
float linearstep(float x,float a,float b)
if x < a then 0, if x > b then 1, and
x transitions linearly when < x < b log
float log(float x)
Natural logarithm log10
float log10(float x)
Base 10 logarithm max
float max(float a,float b)
greater of a and b midhsi
color midhsi(color x, float h, float s, float i, float map, float falloff=1, int interp=0)
The midhsi function is just like the hsi function except that
the control map is centered around the mid point (value of 0.5)
and can scale the shift in both directions. min
float min(float a,float b)
lesser of a and b mix
mix(float a,float b,float alpha)
Blend of a and b according to alpha. noise
float noise ( vector v )

float noise ( float x, float y )
float noise ( float x, float y, float z )
float noise ( float x, float y, float z, float w )
Original perlin noise at location (C2 interpolant) norm
vector norm(vector v)
vector scaled to unit length ortho
vector angle(vector a,vector b)
normalized vector orthogonal to a and b scaled to unit length pick
int pick(float index, int loRange, int hiRange, [float weights, ...] )
Picks values randomly between loRange and hiRange based on supplied index (which is
automatically hashed).  The values will be distributed according
to the supplied weights.  Any weights not supplied are assumed to
be 1.0. pnoise
float pnoise ( vector v, vector period )
periodic noise pow
float pow(float x)
x to the y power, also available as ^ printf
printf(string format,[vec0, vec1, ...])
Prints out a string to STDOUT, Format parameter allowed is %v pvoronoi
color pvoronoi(vector v, int type=1,float jitter=0.5, float fbmScale=0, int fbmOctaves=4,float fbmLacunarity=2, float fbmGain=.5)
returns center of voronoi cell. rad
float rad(float deg)
degrees to radians remap
remap(float x, float
source, float range, float falloff, int interp)
General remapping function.
When x is within +/- range of source, the result is one.
The result falls to zero beyond that range over falloff distance.
The falloff shape is controlled by interp. Numeric values
or named constants may be used:
    int linear
= 0
    int smooth = 1
    int gaussian = 2
rgbtohsl
color rgbtohsl(color rgb)
RGB to HSL color space conversion.
HSL is Hue, Saturation, Lightness (all in range [0..1] )
These functions have also been extended to support rgb and hsl values
outside of the range [0..1] in a reasonable way.  For any rgb or
hsl value (except for negative s values), the conversion is
well-defined and reversible. rotate
vector rotate(vector v,vector axis,float angle)
rotates v around axis by given angle (in radians) round
float round(float x)
constrain x to range [lo,hi] saturate
color saturate(color val, float amt)
Scale saturation of color by amt.
The color is scaled around the rec709 luminance value,
and negative results are clamped at zero.
sin
float sin(float angle)
sine in radians sind
float sind(float angle)
sine in degrees sinh
float sinh(float angle)
hyperbolic sine in radians smoothstep
float smoothstep(float x,float a,float b)
if x < a then 0, if x > b then 1, and
x transitions smoothly (cubic) when < x < b snoise
float snoise ( vector v)
signed noise w/ range -1 to 1 formed with original perlin noise at location (C2 interpolant) snoise4
float snoise4 ( vector v,float t)
4D signed noise w/ range -1 to 1 formed with original perlin noise at location (C2 interpolant) spline
float spline(float param,float y1,float y2,float y3,float y4,[...])

Interpolates a set of values to the parameter specified where y1, ..., yn are
distributed evenly from [0...1] sqrt
float sqrt(float x)
square root tan
float tan(float angle)
tangent in radians tand
float tand(float angle)
tangent in degrees tanh
float tanh(float angle)
hyperbolic tangent in radians turbulence
float turbulence(vector v,int octaves=6,float lacunarity=2,float gain=.5)
Absolute value of each noise term is taken. This gives billowy appearance up
vector up(vector P,vector upvec)
rotates v such that the Y axis points in the given up direction vfbm
vector vfbm(vector vint octaves=6,float lacunarity=2,float gain=.5) vfbm4
vector vfbm4(vector v,float time,int octaves=6,float lacunarity=2,float gain=.5) vnoise
vector vnoise ( vector v)
vector noise formed with original perlin noise at location (C2 interpolant) vnoise4
vector vnoise4 ( vector v,float t)
4D vector noise formed with original perlin noise at location (C2 interpolant) voronoi
float voronoi(vector v, int type=1,float jitter=0.5, float fbmScale=0, int fbmOctaves=4,float fbmLacunarity=2, float fbmGain=.5)
voronoi is a cellular noise pattern. It is a jittered variant of cellnoise. vturbulence
vector vturbulence(vector v,int octaves=6,float lacunarity=2,float gain=.5)
Absolute value of each noise term is taken. This gives billowy appearance wchoose
float wchoose(float index,float choice1, float weight1, float choice2, float weight2, [...] )
Chooses one of the supplied choices based on the index (assumed to be in range[0..1]).
The values will be distributed according to the supplied weights. rand
float rand([float min, float max] [,float seed])
Generates a random number. With no parameters, the number generated is between
0 and 1. Optionally, two parameters can be passed in to give a range for the
random number. In either case a seed value can be given that will ensure that
the number returned is random, but predictable (always "x" when passed "y"). shadow
shadow( string x)
Evaluates the passed in expression only during the shadow pass of a render.
Useful for changing length, width, density, etc. between the color and shadow
passes of a render. When not in the shadow pass this function evaluates to 1.0,
so it should be used as a multiplier. map
map( string mapname [, float s, float t] [, int channel] )
Evaluates the mapname at the current (u,v) or the provided (s,t). alignU
alignU( [X] )
Align the primitive with a given vector.
If no parameter is passed then a default of [0,1,0] will be used
with the result being "grow up". When a parameter is passed it makes
most sense to pass the same parameter to all three expressions.
The parameter can be an expression and need not be normalized. alignV
alignV( [X] )
Align the primitive with a given vector.
If no parameter is passed then a default of [0,1,0] will be used
with the result being "grow up". When a parameter is passed it makes
most sense to pass the same parameter to all three expressions.
The parameter can be an expression and need not be normalized. alignN
alignN( [X] )
Align the primitive with a given vector.
If no parameter is passed then a default of [0,1,0] will be used
with the result being "grow up". When a parameter is passed it makes
most sense to pass the same parameter to all three expressions.
The parameter can be an expression and need not be normalized. $u
The u parameters of the underlying surface. $v
The v parameters of the underlying surface. $cLength
The final, computed length of the current primitive $cWidth
The final, computed width of the current primitive $cDepth
The final, computed depth of the current primitive without displacement. $Cs
Color surface for the current primitive. $cam
The current camera id. $aCount
The number of archive used by the current archive primitive. $faceId
The current face id. $frame
The current frame being evaluated. $id
The current primitive's ID (useful for fx modules). $P
The surface point at which the primitive is being evaluated. $Pg
The surface point without displacement. $Pref
The reference surface point at which the primitive is being evaluated. $Prefg
The reference surface point without displacement. $Pw
The surface point at which the primitive is being evaluated. $Pgw
The surface point without displacement. World space. $Prefw
The reference surface point at which the primitive is being evaluated. $Prefgw
The reference surface point without displacement. World space. $N
The surface normal at which the primitive is being evaluated. $Ng
The surface normal without displacement. $Nref
The reference surface normal at which the primitive is being evaluated. $Nrefg
The reference surface normal without displacement. $dPdu
The surface dPdu at which the primitive is being evaluated. $dPdug
The surface dPdu without displacement. $dPduref
The reference surface dPdu at which the primitive is being evaluated. $dPdurefg
The reference surface dPdu without displacement. $dPdv
The surface dPdv at which the primitive is being evaluated. $dPdvg
The surface dPdv without displacement. $dPdvref
The reference surface dPdv at which the primitive is being evaluated. $dPdvrefg
The reference surface dPdv $patchId
The current patch's ID. $descId
The current description's ID. $objectId
alias for $patchId. PI
The ratio of the circumference of a circle to its diameter (3.14159265358979323846). E
The base of natural logarithms (2.7182818284590452354).