Absolute value of x.
Arc cosine of x, in the range 0 to pi radians.
Arc cosine of x, in the range 0 to 180 degrees.
Hyperbolic cosine of x.
Align the primitive with a given vector. These three expressions should be placed into offU, offV, and offN. If no parameter is passed, then a default of [0,1,0] is used, with the result being “grow up”. When a parameter is passed, it passes the same parameter to all three expressions. The parameter can be an expression and need not be normalized.
Angle between vectors (in radians).
Arc sine of x, in the range -pi/2 to pi/2 radians.
Arc sine of x, in the range -90 to 90 degrees.
Hyperbolic sine of x.
Arc tangent of x, in the range -pi/2 to pi/2 radians.
Arc tangent of x, in the range -90 to 90 degrees.
Arc tangent of x/y, in the range -pi/2 to pi/2.
Hyperbolic arc tangent.
Helper for contrast that is a variation of gamma.
Produces 0 when the expression evaluates less than val, and 1 otherwise. Subtracting a boxstep from a boxstep produces a box function where the value is 0 when less than the first boxstep's val, 1 when between the vals, and 0 when greater than the second boxstep's val. Make sure to subtract the later occurring boxstep from the earlier, otherwise an inverted box function results.
Cube root of x.
Smallest integer not less than x (round up). See floor, round and trunc.
Clamps x between min and max.
Allows expressions to set values of the individual components of a vector or color.
Contrast function for x. c < 0.5 decreases contrast, c > 0.5 increases contrast.
Cosine of x (x in radians).
Cosine in degrees.
Hyperbolic cosine of x.
Cross product of vectors
Convert radians to degrees. See also rad.
Dot product of vectors.
Distance between two points.
e raised to the power of x.
Linear transfer of [a1..x..b1] into [a2..result..b2].
Largest integer not greater than x (round down). See also ceil, round and trunc.
Real remainder of x divided by y. Same as x%y.
Gamma correction of x. Same as pow( x, 1/g).
Produces a Gaussian transition from 0 to 1. The result is 0 when x equals a and 1 when x equals b. When outside this range, the result is continuous: past a produces all 0's and past b produces all 1's. If a is less than b, then the function is a ramp up, otherwise it is a ramp down.
Gets the Maya attribute value for the attribute named N on the current guide at the current frame. The Maya attribute has to be part of the patch cache for rendering. Convert the guides (see Guides To Curves options) to curves and add these curves to the patch cache.
Square root of (x*x + y*y).
Length of vector.
Produces a linear transition from 0 to 1. The result is 0 when x equals a and 1 when x equals b. When outside this range, the result is continuous: past a produces all 0's and past b produces all 1's. If a is less than b, then the function is a ramp up, otherwise it is a ramp down.
Natural logarithm of x.
Base 10 logarithm of x.
Evaluates the mapname at the current (u,v) or the provided (s,t). The mapname can just be a path to the Ptex files. You only need to specify the file pattern if you plan on using a regular expression to modify the default $g.ptx that would be used. An optional channel can be specified to indicate which channel of the image should be read. You can use the variable ${DESC} for the description name. You can also use the built-in $PAL macro to reference maps. An example might be map( “baseCoat_${PAL,myPick}” ) where a palette expression named myPick would be evaluated and have its result inserted with %04d formatting.
Returns the larger of the two values. See alse min.
Returns the lesser of the two values. See also max.
Evaluates the Perlin noise function. When no parameters are given, it is evaluated at the current (u,v). One, two, or three parameters can be used for noise in one, two, or three dimensions. The return value is always a floating point number between -1 and 1.
Normalize vector V.
Orthogonal vector (equiv to norm(cross(X,Y))).
Raise x to the power of y. Same as x^y.
Convert degrees to radians. See also deg.
Generates a random number. When no parameters are given, 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 ensures that the number returned is random, but predictable (always x when passed y).
Remaps x between 0 and 1 such that the result equals 1 when x is within range distance from the source. Once outside that region, the result falls off to 0 over the falloff distance. The interpolation scheme can be specified by name or an integer key: linear=0, smooth=1, gaussian=2, boxstep=3. When using boxstep interpolation, a falloff value of 0.0 is used.
Integer value produced by rounding x towards zero when the decimal portion is less than 0.5 and away from zero otherwise. See also floor, ceil and trunc.
Evaluates the passed in expression only during the shadow pass of a render. Useful for changing length, width, density, and so forth 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.
Sine of x (x in radians).
Sine of x in degrees.
Hyperbolic sine of x (x in radians).
Produces a smooth (quadratic) transition from zero to one. The result is 0 when x equals a and 1 when x equals b. When outside this range, the result is continuous: past a produces all 0's and past b produces all 1's. If a is less than b, then the function is a ramp up, otherwise it is a ramp down.
Square root of x.
Tangent of x (x in radians).
Hyperbolic tangent of x.
Simple dropping of the decimal portion of x (round towards zero). See also ceil, floor, and round.
Palette expressions are called as functions. If you have a palette expression named myPick then you would call it in another expression by the syntax myPick(). Useful for connecting attributes, such as giving an association between length and width. Also useful for driving attributes in separate descriptions, such as setting a palette-wide width value. The name you give your palette expression should not overlap any predefined XGen functions; otherwise, your palette expression will not be accessible.
The following constants are valid:
The ratio of the circumference of a circle to its diameter (3.14159265358979323846).
The base of natural logarithms (2.7182818284590452354).
If an expression is invalid, an error message is displayed and it is evaluated as 0.001.