See VEX contexts to learn about the different contexts (such as surface shaders or displacement shaders) in which the various functions and statements are available.
Functions
Animation

Adds new channels to a CHOP node.

Reads a CHOP attribute value on Channels, Clips, Sample or Channel/Sample from a connected CHOP input, with validity check.

Reads CHOP attribute names of a given attribute class from a CHOP input.

Returns the end sample of the input specified.

Returns the frame corresponding to the last sample of the input specified.

Returns the time corresponding to the last sample of the input specified.

Returns the channel index from a input given a channel name.

Returns the value of a channel at the specified sample in an input.

Computes the minimum and maximum value of samples in an input channel.

Returns all the CHOP channel names of a given CHOP input.

Returns the number of channels in the input specified.

Returns the sample rate of the input specified.

Returns the value of CHOP context temporary buffer at the specified index.

Removes channels from a CHOP node.

Removes a CHOP attribute.

Renames a CHOP channel.

Resize the CHOP context temporary buffer

Writes a CHOP attribute value on Channels, Clips, Sample or Channel/Sample.

Sets the length of the CHOP channel data.

Sets the sampling rate of the CHOP channel data.

Sets the CHOP start sample in the channel data.

Returns the start sample of the input specified.

Returns the frame corresponding to the first sample of the input specified.

Returns the time corresponding to the first sample of the input specified.

Writes a value of CHOP context temporary buffer at the specified index.

Returns 1 if the Vex CHOP’s Unit Menu is currently set to 'frames', 0 otherwise.

Returns 1 if the Vex CHOP’s Unit Menu is currently set to 'samples', 0 otherwise.

Returns 1 if the Vex CHOP’s Unit Menu is currently set to 'seconds', 0 otherwise.
Arrays

Adds an item to an array or string.

Returns the indices of a sorted version of an array.

Efficiently creates an array from its arguments.

Returns the length of an array.

Inserts an item, array, or string into an array or string.

Checks if the index given is valid for the array or string given.

Returns the length of an array.

Removes the last element of an array and returns it.

Adds an item to an array.

Removes an item at the given index from an array.

Removes an item from an array.

Reorders items in an array or string.

Sets the length of an array.

Returns an array or string in reverse order.

Slices a substring or subarray of a string or array.

Returns the array sorted in increasing order.

Adds a uniform item to an array.
Attributes and Intrinsics

Adds an attribute to a geometry.

Adds an attribute to a geometry.

Adds an attribute to a geometry.

Adds an attribute to a geometry.

Adds an attribute to a geometry.

Appends to the visualizer detail attribute.

Reads an attribute value from geometry.

Returns the class of a geometry attribute.

Returns the size of a geometry attribute.

Returns the type of a geometry attribute.

Returns the type info of a geometry attribute.

Imports a detail attribute value from a geometry.

Imports a detail attribute value from a geometry.

Returns the size of a geometry detail attribute.

Returns the type of a geometry detail attribute.

Returns the type info of a geometry attribute.

Imports a detail intrinsic from a geometry.

Returns element index where an integer or string attribute has a certain value.

Returns number of elements where an integer or string attribute has a certain value.

Reads an attribute value from geometry, with validity check.

Copies the value of a geometry attribute into a variable.

Checks whether a geometry attribute exists.

Returns if a geometry detail attribute exists.

Returns if a geometry point attribute exists.

Returns if a geometry prim attribute exists.

Returns if a geometry vertex attribute exists.

Looks up a point number by an id attribute.

Looks up a primitive number by an id attribute.

Looks up a point number by a name attribute.

Looks up a primitive number by a name attribute.

Returns the number of unique values from an integer or string attribute.

Imports a point attribute value from a geometry.

Imports a point attribute value from a geometry.

Returns the size of a geometry point attribute.

Returns the type of a geometry point attribute.

Returns the type info of a geometry attribute.

Imports a primitive attribute value from a geometry.

Copies the value of a primitive attribute at a certain parametric (u, v) position into a variable.

Evaluates an the length of an arc on curves using parametric uv coordinates.

Imports a primitive attribute value from a geometry.

Returns the size of a geometry prim attribute.

Returns the type of a geometry prim attribute.

Returns the type info of a geometry attribute.

Evaluates position derivative on a primitive at a certain parametric (u, v) position into a variable.

Imports a primitive intrinsic from a geometry.

Evaluates an attribute on a primitive at a certain parametric (u, v) position into a variable.

Convert parametric UV locations on curve primitives.

Writes an attribute value to geometry.

Sets the meaning of an attribute in geometry.

Sets a detail attribute in a geometry.

Sets a point attribute in a geometry.

Sets a primitive attribute in a geometry.

Sets a primitive intrinsic value in a geometry.

Sets a vertex attribute in a geometry.

Returns a unique value from an integer or string attribute.

Evaluates an attribute on a geometry using a uv attribute name and value.

Imports a vertex attribute value from a geometry.

Imports a vertex attribute value from a geometry.

Returns the size of a geometry vertex attribute.

Returns the type of a geometry vertex attribute.

Returns the type info of a geometry attribute.
bsdf

Returns new BSDF that only includes the components specified by the mask.
Conversion

Converts a string to a float.

Converts a string to an integer.

Returns the argument from radians into degrees.

Creates a vector4 representing a quaternion from euler angles.

Convert HSV color space into RGB color space.

Converts a quaternion represented by a vector4 to a matrix3 representation.

Converts the argument from degrees into radians.

Convert RGB color space to HSV color space.

Convert a linear sRGB triplet to CIE XYZ tristimulus values.

Flattens an array of vector or matrix types into an array of floats.

Turns a flat array of floats into an array of vectors or matrices.

Convert CIE XYZ tristimulus values to a linear sRGB triplet.
Crowds

Add a clip into an agent’s definition.

Returns all of the animation clips that have been loaded for an agent primitive.

Finds the index of a channel in an agent’s animation clip.

Returns the length (in seconds) of an agent’s animation clip.

Returns an agent primitive’s current animation clips.

Samples a channel of an agent’s clip at a specific time.

Samples an agent’s animation clip at a specific time.

Returns the sample rate of an agent’s animation clip.

Samples an agent’s animation clip at a specific time.

Returns the current times for an agent primitive’s animation clips.

Returns the transform groups for an agent primitive’s current animation clips.

Returns the blend weights for an agent primitive’s animation clips.

Returns the name of the collision layer of an agent primitive.

Returns the name of the current layer of an agent primitive.

Returns the transform that each shape in an agent’s layer is bound to.

Returns all of the layers that have been loaded for an agent primitive.

Returns the names of the shapes referenced by an agent primitive’s layer.

Returns the current local space transform of an agent primitive’s bone.

Returns the current local space transforms of an agent primitive.

Returns the child transforms of a transform in an agent primitive’s rig.

Finds the index of a transform in an agent primitive’s rig.

Returns the parent transform of a transform in an agent primitive’s rig.

Returns the number of transforms in an agent primitive’s rig.

Returns whether a transform is a member of the specified transform group.

Returns the names of the transform groups in an agent’s definition.

Returns the name of each transform in an agent primitive’s rig.

Converts transforms from world space to local space for an agent primitive.

Converts transforms from local space to world space for an agent primitive.

Returns the current world space transform of an agent primitive’s bone.

Returns the current world space transforms of an agent primitive.

Sets the current animation clips for an agent primitive.

Sets the animation clips that an agent should use to compute its transforms.

Sets the current times for an agent primitive’s animation clips.

Sets the blend weights for an agent primitive’s animation clips.

Sets the collision layer of an agent primitive.

Sets the current layer of an agent primitive.

Overrides the local space transform of an agent primitive’s bone.

Overrides the local space transforms of an agent primitive.

Overrides the world space transform of an agent primitive’s bone.

Overrides the world space transforms of an agent primitive.
File I/O

Returns file system status for a given file.
Fuzzy Logic
Geometry

Adds a point to the geometry.

Adds a primitive to the geometry.

Adds a vertex to the geometry.

In the POP and SOP contexts, sets how/whether to recompute normals. In the shading contexts, computes normals.

Samples the velocity field defined by a set of vortex filaments.

Returns a handle to the current geometry.

Returns an oppath string to unwrap the geometry inplace.

Sets two vectors to the minimum and maximum corners of the bounding box for the geometry.

Returns the center of the bounding box for the geometry.

Returns the maximum of the bounding box for the geometry.

Returns the minimum of the bounding box for the geometry.

Returns the size of the bounding box for the geometry.

Returns the bounding box of the geometry specified by the filename.

Sets two vectors to the minimum and maximum corners of the bounding box for the geometry.

Returns the center of the bounding box for the geometry.

Returns the maximum of the bounding box for the geometry.

Returns the minimum of the bounding box for the geometry.

Returns the size of the bounding box for the geometry.

Returns the destination point of a halfedge.

Returns the destination vertex of a halfedge.

Returns the number of halfedges equivalent to a given halfedge.

Determines whether a two halfedges are equivalent (represent the same edge).

Determines whether a halfedge number corresponds to a primary halfedge.

Determines whether a halfedge number corresponds to a valid halfedge.

Returns the halfedge that follows a given halfedge in its polygon.

Returns the next halfedges equivalent to a given halfedge.

Returns the point into which the vertex following the destination vertex of a halfedge in its primitive is wired.

Returns the vertex following the destination vertex of a halfedge in its primitive.

Returns the point into which the vertex that precedes the source vertex of a halfedge in its primitive is wired.

Returns the vertex that precedes the source vertex of a halfedge in its primitive.

Returns the halfedge that precedes a given halfedge in its polygon.

Returns the primitive that contains a halfedge.

Returns the primary halfedge equivalent to a given halfedge.

Returns the source point of a halfedge.

Returns the source vertex of a halfedge.

Returns 1 if the edge specified by the point pair is in the group specified by the string.

Returns 1 if the point specified by the point number is in the group specified by the string.

Returns 1 if the primitive specified by the primitive number is in the group specified by the string.

This function computes the intersection of the specified ray with the geometry.

This function computes all intersections of the specified ray with the geometry.

Returns 1 if the vertex specified by the vertex number is in the group specified by the string.

Once you get a handle to a metaball using metastart and metanext, you can query attributes of the metaball with metaimport.

Takes the ray defined by p0 and p1 and partitions it into zero or more subintervals where each interval intersects a cluster of metaballs from filename.

Iterate to the next metaball in the list of metaballs returned by the metastart() function.

Open a geometry file and return a "handle" for the metaballs of interest, at the position p.

Returns the metaweight of the geometry at position p.

Finds the closest position on the surface of a geometry.

Finds the closest point in a geometry.

Finds the all the closest point in a geometry.

Returns the number of edges in the group.

Returns the point index of the neighbour of the point.

Returns the number of points that are connected to the specified point.

Returns an array of the point numbers of the neighbours of a point.

Returns the number of points in the input or geometry file.

Returns the number of points in the group.

Returns the number of primitives in the input or geometry file.

Returns the number of primitives in the group.

Returns the number of vertices in the input or geometry file.

Returns the number of vertices in the group.

Evaluates an attribute at the subdivision limit surface using Open Subdiv.

Finds and returns a halfedge with the given endpoints.

Finds and returns a halfedge with a given source point or with given source and destination points.

Returns the next halfedge with the same source as a given halfedge.

Returns the list of primitives containing a point.

Returns a linear vertex number of a point in a geometry.

Returns the list of vertices connected to a point.

Returns the normal of the primitive (prim_number) at parametric location u, v.

Returns a list of primitives potentially intersecting a given bounding box.

Returns one of the halfedges contained in a primitive.

Converts a primitive/vertex pair into a point number.

Returns the list of points on a primitive.

Converts a primitive/vertex pair into a linear vertex.

Returns number of vertices in a primitive in a geometry.

Returns the list of vertices on a primitive.

Returns the relative position of the point given with respect to the bounding box of the geometry.

Returns the relative position of the point given with respect to the bounding box of the geometry.

Removes a point from the geometry.

Removes a primitive from the geometry.

Sets edge group membership in a geometry.

Sets point group membership in a geometry.

Sets primitive group membership in a geometry.

Rewires a vertex in the geometry to a different point.

Sets vertex group membership in a geometry.

Rewires a vertex in the geometry to a different point.

Returns primitive number of an adjacent tetrahedron.

Returns vertex indices of each face of a tetrahedron.

Finds the distance of a uv coordinate to a geometry in uv space.

This function computes the intersection of the specified ray with the geometry in uv space.

Returns the halfedge which has a vertex as source.

Converts a primitive/vertex pair into a linear vertex.

Returns the linear vertex number of next shared vertex in a geometry.

Returns the point number of linear vertex in a geometry.

Returns the linear vertex number of previous shared vertex in a geometry.

Returns the primitive number of a linear vertex in a geometry.

Converts a linear vertex number into a vertex number within that primitive.

Returns the volume of the microvoxel containing a variable such as P.

Calculates the volume primitive’s gradient.

Gets the value of a specific voxel.

Gets the index of the bottom left of a volume primitive.

Converts a volume voxel index into a position.

Gets the vector value of a specific voxel.

Converts a position into a volume voxel index.

Gets the resolution of a volume primitive.

Samples the volume primitive’s value.

Samples the volume primitive’s vector value.

Computes the approximate diameter of a voxel.

Finds the distance of a point to a geometry.
Image Processing

Returns the default name of the alpha plane (as it appears in the compositor preferences).

Returns bilinearly sampled input.

Returns the default name of the bump plane (as it appears in the compositor preferences).

Returns the channel name of the indexed plane.

Returns point sampled input.

Returns the default name of the color plane (as it appears in the compositor preferences).

Returns the default name of the depth plane (as it appears in the compositor preferences).

Reads the zrecords stored in a pixel of a deep shadow map or deep camera map.

Returns fully filtered pixel input.

Queries if metadata exists on a composite operator.

Returns 1 if the plane specified by the parameter exists in this COP.

Returns the aspect ratio of the specified input.

Returns the channel name of the indexed plane of the given input (e.

Returns the last frame of the specified input.

Returns the end time of the specified input.

Returns 1 if the specified input has a plane named planename.

Returns the number of planes in the given input.

Returns the index of the plane named 'planename' in the specified input.

Returns the name of the plane specified by the planeindex of the given input

Returns the number of components in the plane named planename in the specified input.

Returns the frame rate of the specified input.

Returns the starting frame of the specified input.

Returns the start time of the specified input.

Returns the X resolution of the specified input.

Returns the Y resolution of the specified input.

Returns the default name of the luminence plane (as it appears in the compositor preferences).

Returns the default name of the mask plane (as it appears in the compositor preferences).

Returns a metadata value from a composite operator.

Reads a pixel and its eight neighbors into a 3×3 matrix.

Returns the default name of the normal plane (as it appears in the compositor preferences).

Returns the index of the plane specified by the parameter, starting at zero.

Returns the name of the plane specified by the index (e.

Returns the number of components in the plane (1 for scalar planes and up to 4 for vector planes).

Returns the default name of the point plane (as it appears in the compositor preferences).

Returns the default name of the velocity plane (as it appears in the compositor preferences).
Math

Takes the derivative of the given value with respect to U.

Takes the derivative of the given value with respect to V.

Takes the derivative of the given value with respect to the 3rd axis, for volume rendering.

Returns the absolute value of the argument.

Returns the inverse cosine of the argument.

Returns the inverse sine of the argument.

Returns the inverse tangent of the argument.

Returns the inverse tangent of y/x.

Returns the average value of the input(s)

Compute the color value of an incandescent black body.

Returns the cube root of the argument.

Returns the smallest integer greater than or equal to the argument.

Computes a CatmullRom (Cardinal) spline between the key points specified.

Returns value clamped between min and max.

Clip the line segment between p0 and p1.

Returns the cosine of the argument.

Returns the hyperbolic cosine of the argument.

Depending on the value of c, returns the translate (c=0), rotate (c=1), or scale (c=2) component of the transform (xform).

Returns the cross product between the two vectors.

Computes a CatmullRom (Cardinal) spline between the key points specified.

Computes the determinant of the matrix.

Computes the rotation matrix or quaternion which rotates the vector a onto the vector b.

Returns the distance between the two 3 or 4 dimensional point arguments.

Returns the squared distance between the two 3 or 4 dimensional point arguments.

Returns the dot product between the arguments.

Takes the value in the range (omin, omax) and shifts it to the corresponding value in the new range (nmin, nmax).

Computes the eigenvalues of a matrix.

Gauss error function.

Inverse Gauss error function.

Gauss error function’s complement.

Returns the exponential function of the argument.

Takes the value in the range (omin, omax) and shifts it to the corresponding value in the new range (nmin, nmax).

Takes the value in the range (0, 1) and shifts it to the corresponding value in the new range (nmin, nmax).

Takes the value in the range (1, 0) and shifts it to the corresponding value in the new range (nmin, nmax).

Takes the value in the range (1, 1) and shifts it to the corresponding value in the new range (nmin, nmax).

Returns the largest integer less than or equal to the argument.

Returns the fractional component of the floating point number.

Computes the fresnel reflection/refraction contributions given an incoming vector, surface normal (both normalized), and an index of refraction (eta).

If dot(I, Nref) is less than zero, N will be negated.

Return an identity matrix.

Creates an instance transform matrix.

Inverts the matrix.

Checks whether a value is a normal finite number.

Checks whether a value is not a number.

Returns an interpolated value along a spline curve.

Returns the length of the vector or vector4.

Returns the squared distance of the vector or vector4.

Performs bilinear interpolation between the values.

Computes a linear spline between the key points.

Returns the natural logarithm of the argument.

Returns the logarithm (base 10) of the argument.

Computes a rotation matrix or angles to orient the zaxis along the vector (tofrom) under the transformation.

Computes a linear spline between the key points.

Compute the luminance of the RGB color specified by the parameters.

Creates an orthonormal basis given a zaxis vector.

Builds a 3×3 or 4×4 transform matrix.

Returns the normalized vector.

Returns the outer product between the arguments.

Transforms a normal vector from Object to World space.

Transforms a direction vector from Object to World space.

Computes the distance and closest point of a point to an infinite plane.

Computes the intersection of a 3D sphere and an infinite 3D plane.

Computes the polar decomposition of a matrix.

Raises the first argument to the power of the second argument.

Determines if a point is inside or outside a triangle circumcircle.

Determines if a point is inside or outside a tetrahedron circumsphere.

Determines the orientation of a point with respect to a line.

Determines the orientation of a point with respect to a plane.

Returns the product of the vector’s components.

This function returns the closest distance between the point Q and a finite line segment between points P0 and P1.

Finds distance between two quaternions.

Inverts a quaternion rotation.

Multiplies two quaternions and returns the result.

Rotates a vector by a quaternion.

Creates a vector4 representing a quaternion.

Rounds the number to the closest integer.

Applies a rotation to the given matrix.

Rotates a vector by a rotation that would bring the xaxis to a given direction.

Scales the given matrix in three directions simultaneously (X, Y, Z  given by the components of the scale_vector).

Bitshifts an integer left.

Bitshifts an integer right.

Bitshifts an integer right.

Returns the sign of the argument.

Returns the sine of the argument.

Returns the hyperbolic sine of the argument.

Quaternion blend between q1 and q2 based on the bias.

Finds the normal component of frame slid along a curve.

Computes a number between zero and one.

Returns the closest equivalent Euler rotations to a reference rotation.

Solves a cubic function returning the number of real roots.

Finds the real roots of a polynomial.

Solves a quadratic function returning the number of real roots.

Returns an interpolated value along a polyline or spline curve.

Returns the square root of the argument.

Returns the sum of the vector’s components.

Returns the trigonometric tangent of the argument

Returns the hyperbolic tangent of the argument

Translates the given matrix.

Transposes the given matrix.

If the argument is negative, this returns ceil(x), otherwise it returns floor(x).
Nodes

Adds the mapping of the attribute aname to the local variable vname.

Evaluates a channel (or parameter) and return its value.

Evaluates a channel (or parameter) and return its value.

Evaluates a channel (or parameter) and return its value.

Evaluates a channel (or parameter) and return its value.

Evaluates a channel (or parameter) and return its value.

Evaluates a channel (or parameter) and return its value.

Evaluates a ramp parameter and return its value.

Evaluates a channel (or parameter) and return its value.

Returns the raw string channel (or parameter).

Evaluates a channel or parameter, and return its value.

Returns 1 if input_number is connected, or 0 if the input is not connected.

Returns the number of inputs.

Returns the full path for the given relative path

Returns the parent bone transform associated with an OP.

Returns the parent transform associated with an OP.

Returns the parm transform associated with an OP.

Returns the preconstraint transform associated with an OP.

Returns the pretransform associated with an OP.

Returns the transform associated with an OP.
Noise and Randomness

These functions are similar to the Worley noise functions listed above.

Computes divergence free noise based on Perlin noise.

Computes 2d divergence free noise based on Perlin noise.

Computes divergence free noise based on Simplex noise.

Computes 2d divergence free noise based on simplex noise.

Generates 1D and 3D Perlin Flow Noise from 3D and 4D data.

There are two forms of Perlinstyle noise: a nonperiodic noise which changes randomly throughout Ndimensional space, and a periodic form which repeats over a given range of space.

Mimics the Houdini expression functions noise(), snoise(), turb(), and sturb().

Produces the exact same results as the Houdini expression function of the same name.

There are two forms of Perlinstyle noise: a nonperiodic noise which changes randomly throughout Ndimensional space, and a periodic form which repeats over a given range of space.

Derivatives of Perlin Noise.

The nrandom() functions are nondeterministic random number generators for VEX.

These functions are similar to wnoise and vnoise.

There are two forms of Perlinstyle noise: a nonperiodic noise which changes randomly throughout Ndimensional space, and a periodic form which repeats over a given range of space.

Creates a random number between 0 and 1 from a seed.

Generate a random number based on the position in N dimensional space (where N is 1 to 4 dimensions).

Hashes floating point numbers to integers.

Hashes integer numbers to integers.

Hashes string to integers.

Generate a uniformly distributed random number.

These functions are similar to wnoise.

Voronoi noise gives almost identical results to the Worley noise functions.

Worley noise scatters points randomly through space (according to a nice Poisson distribution).

Simplex noise is very close to Perlin noise, except with the samples on a simplex mesh rather than a grid. This results in less grid artifacts. It also uses a higher order bspline to provide better derivatives.

Derivatives of Simplex Noise.
Point Clouds and 3D Images

This function will "integrate" the 3d image along the line specified by p0 and p1.

The integrate3dClip function integrates along the ray described by p0 and p1 where "interesting" things start happening in a given I3D texture.

This function intersects a ray (with it’s origin at p0 and extending to p1), against a 3d texture image.

Returns the value of the point attribute for the metaballs if metaball geometry is specified to i3dgen.

Returns the density of the metaball field if metaball geometry is specified to i3dgen.

Transforms the position specified into the "local" space of the metaball.

This function closes the handle associated with a pcopen function.

Writes data to a point cloud inside a pciterate or a pcunshaded loop.

Returns the distance to the farthest point found in the search performed by pcopen.

Filters the points found by pcopen using a simple reconstruction filter.

Returns a list of closest points from a file.

Returns a list of closest points from a file taking into account their radii.

Generates a point cloud.

Imports channel data from a point cloud inside a pciterate or a pcunshaded loop.

Imports channel data from a point cloud outside a pciterate or a pcunshaded loop.

Imports channel data from a point cloud outside a pciterate or a pcunshaded loop.

Imports channel data from a point cloud outside a pciterate or a pcunshaded loop.

Imports channel data from a point cloud outside a pciterate or a pcunshaded loop.

Imports channel data from a point cloud outside a pciterate or a pcunshaded loop.

Imports channel data from a point cloud outside a pciterate or a pcunshaded loop.

Imports channel data from a point cloud outside a pciterate or a pcunshaded loop.

This function can be used to iterate over all the points which were found in the pcopen query.

This node returns the number of points found by pcopen.

Returns a handle to a point cloud file.

Returns a handle to a point cloud file.

Changes the current iteration point to a leaf descendant of the current aggregate point.

Iterate over all of the points of a readwrite channel which haven’t had any data written to the channel yet.

Writes data to a point cloud file.

Returns a list of closest points from a file.

The photonmap function will evaluate a photon map and return the resulting color information.

Returns the value of the 3d image at the position specified by P.

This function queries the 3D texture map specified and returns the bounding box information of the file.
Sampling

Creates a CDF from an array of input PDF values.

Creates a PDF from an array of input values.

Limits u in , in a way that maintains uniformity and inrange consistency.

Samples a bsdf.

Samples the Cauchy (Lorentz) distribution.

Samples a CDF based on a random variable.

Generates a uniform unit vector2, within maxangle of center, given a uniform number between 0 and 1.

Generates a uniform unit vector2, given a uniform number between 0 and 1.

Generates a uniform vector2 with length < 1, within maxangle of center, given a vector2 of uniform numbers between 0 and 1.

Generates a uniform vector2 with length < 1, given a vector2 of uniform numbers between 0 and 1.

Generates a uniform unit vector, within maxangle of center, given a vector2 of uniform numbers between 0 and 1.

Generates a uniform unit vector, given a vector2 of uniform numbers between 0 and 1.

Returns an integer, either uniform or weighted, given a uniform number between 0 and 1.

Samples the exponential distribution.

Samples geometry in the scene and returns information from the shaders of surfaces that were sampled.

Generates a unit vector, optionally biased, within a hemisphere, given a vector2 of uniform numbers between 0 and 1.

Generates a uniform vector4 with length < 1, within maxangle of center, given a vector4 of uniform numbers between 0 and 1.

Generates a uniform vector4 with length < 1, given a vector4 of uniform numbers between 0 and 1.

Samples a 3D position on a light source and runs the light shader at that point.

Samples the lognormal distribution based on parameters of the underlying normal distribution.

Samples the lognormal distribution based on median and standard deviation.

Samples the normal (Gaussian) distribution.

Generates a uniform unit vector4, within maxangle of center, given a vector of uniform numbers between 0 and 1.

Generates a uniform unit vector4, given a vector of uniform numbers between 0 and 1.

Samples a 3D position on a light source and runs the light shader at that point.

Generates a uniform vector with length < 1, within maxangle of center, given a vector of uniform numbers between 0 and 1.

Generates a uniform vector with length < 1, given a vector of uniform numbers between 0 and 1.

Warps uniform random samples to a disk.

Computes the solid angle (in steradians) a bsdf’s function subtends.

Splits a bsdf into it’s component lobes.

Computes the mean value and variance for a value.
Sensor Input

Sensor function to render GL scene and query the result.

Sensor function query a rendered GL scene.

Sensor function to query average values from rendered GL scene.

Sensor function query a rendered GL scene.

Sensor function to save a rendered GL scene.
Shading and Rendering

Returns the albedo (percentage of reflected light) for a bsdf given the outgoing light direction.

Returns the color of ambient light in the scene.

Returns the area of the micropolygon containing a variable such as P.

Returns a specular BSDF using the Ashikhmin shading model

Computes attenuated falloff.

Returns the illumination for specular highlights using the Blinn model.

Returns the diffuse (Lambertian) illumination given the normalized surface normal.

Imports a variable from the displacement shader for the surface.

Returns the emissive component of a bsdf.

Evaluates a bsdf given two vectors.

Sends a ray from the position P along the direction specified by the direction D.

Sends a ray from the position P along direction D.

Returns the antialiased weight of the step function.

Sends rays into the scene and returns information from the shaders of surfaces hit by the rays.

Returns the blurred point position (P) vector at a fractional time within the motion blur exposure.

Evaluates surface derivatives of an attribute.

Returns the name of the current object whose shader is being run.

Returns the depth of the ray tree for computing global illumination.

Returns group id containing current primitive.

Returns a light struct for the specified light identifier.

Returns the light id for a named light (or 1 for an invalid name).

Returns the name of the current light when called from within an illuminance loop, or converts an integer light ID into the light’s name.

Returns an array of light identifiers for the currently shaded surface.

Returns a selection of lights that illuminate a given material.

Evaluates local curvature of primitive grid, using the same curvature evaluation method as Measure SOPs.

Returns a material struct for the current surface.

Returns material id of shaded primitive.

Returns the object id for the current shading context.

Returns the name of the current object whose shader is being run.

Returns the integer ID of the light being used for photon shading.

Returns the number of the current primitive.

Returns the ptexture face id for the current primitive.

Returns the depth of the ray tree for the current shading.

Returns an approximation to the contribution of the ray to the final pixel color.

Looks up sample data in a channel, referenced by a point.

Returns a selection of objects visible to rays for a given material.

Returns modified surface position based on a smoothing function.

Evaluates UV tangents at a point on an arbitrary object.

Returns the gradient of a field.

Returns whether a light illuminates the given material.

Returns an anisotropic volumetric bsdf, which can scatter light forward or backward.

Loops through all light sources in the scene, calling the light shader for each light source to set the Cl and L global variables.

Returns an estimate of a light’s contribution to the overall scene lighting.

Interpolates a value across the currently shaded micropolygon.

Finds the nearest intersection of a ray with any of a list of (area) lights and runs the light shader at the intersection point.

Computes irradiance (global illumination) at the point P with the normal N.

Returns 1 if the shader is being called to evaluate illumination for fog objects, or 0 if the light or shadow shader is being called to evaluate surface illumination.

Returns an isotropic bsdf, which scatters light equally in all directions.

Indicates whether a shader is being executed for ray tracing.

Returns 1 if the shader is being called to evaluate opacity for shadow rays, or 0 if the shader is being called to evaluate for surface color.

Returns 1 if the shader is invoked by raytracing and 0 for micropolygon rendering.

Indicats whether the shader is being evaulated while doing UV rendering (e.g. texture unwrapping)

Returns the bounce mask for a light struct.

Returns the light id for a light struct.

Imports a variable from the light shader for the surface.

Returns the normal for the diffuse component of a bsdf.

Computes ambient occlusion.

Returns the illumination for specular highlights using different lighting models.

Sends a ray from the position P along the direction D.

Imports a value sent by a shader in a gather loop.

Returns the vector representing the reflection of the direction against the normal.

Computes the amount of reflected light which hits the surface.

Returns the refraction ray given an incoming direction, the normalized normal and an index of refraction.

Computes the illumination of surfaces refracted by the current surface.

Queries the renderer for a named property.

Returns the background color for rays that exit the scene.

Evaluates a scattering event through the domain of a geometric object.

Sets the current light

Stores sample data in a channel, referenced by a point.

Calls shadow shaders for the current light source.

Executes the shadow shader for a given light and returns the amount of shadowing as a multiplier of the shaded color.

Imports a variable from the shadow shader for the surface.

Imports a variable sent by a surface shader in an illuminance loop.

Returns the illumination for specular highlights using different lighting models.

Returns the computed BRDFs for the different lighting models used in VEX shading.

Creates an approximate SSS BSDF.

Stores exported data for a light.

Use a different bsdf for direct or indirect lighting.

Sends a ray from P along the normalized vector D.

Returns the lambertian translucence given the surface normal.

Computes the position and normal of an object given a (u, v) coordinate

Writes color information to a pixel in the output image
Strings

Converts an unicode codepoint to a UTF8 string.

Concatenate all the strings specified to form a single string.

Indicates the string ends with the specified string.

Returns 1 if all the characters in the string are alphabetic

Returns 1 if all the characters in the string are numeric

Converts an integer to a string.

Concatenate all the strings of an array inserting a common spacer.

Strips leading whitespace from a string.

This function returns 1 if the subject matches the pattern specified, or 0 if the subject doesn’t match.

Returns the integer value of the last sequence of digits of a string

Converts an UTF8 string into a codepoint.

Converts an English noun to its plural.

Finds the given regular expression in the string

Finds all instances of the given regular expression in the string

Returns 1 if the entire input string matches the expression

Replaces instances of regex_find with regex_replace

Splits the given string based on regex match.

Computes the relative path for two full paths.

Strips trailing whitespace from a string.

Splits a string into tokens.

Splits a file path into the directory and name parts.

Formats a string like printf but returns the result as a string instead of printing it.

Returns 1 if the string starts with the specified string.

Strips leading and trailing whitespace from a string.

Returns the length of the string.

Returns a string that is the titlecase version of the input string.

Converts all charactors in string to lower case

Convers all charactors in string to upper case
string, array

Finds an item in an array or string.
Texturing

Looks up a color from a disk image.

The depthmap functions work on an image which was rendered as a zdepth image from mantra.

Returns the color of the environment texture.

Perform UDIM or UVTILE texture filename expansion.

Returns the gradient of a single channel texture image at the position specified by P.

Evaluates an ocean spectrum and samples the result at a given time and location.

Computes a filtered sample from a ptex texture map.

The shadowmap function will treat the shadow map as if the image were rendered from a light source.

Imports attributes from texture files.

Similar to sprintf, but does expansion of UDIM or UVTILE texture filename expansion.

Computes a filtered sample of the texture map specified.
Transforms and Space

Transforms between color spaces.

Transforms a position from normal device coordinates to the coordinates in the appropriate space.

See getspace

See ptransform.

Imports attributes from OpenColorIO spaces.

Returns the names of color spaces supported in Open Color IO

Transform colors using Open Color IO

Transforms a position value from Object to World space.

Transforms a vector from one space to another.

Transforms a position into normal device coordinates.

Transforms a normal vector from Texture to World space.

Transforms a position value from Texture to World space.

Transforms a direction vector from Texture to World space.

See ptransform.

Transforms a normal vector from World to Object space.

Transforms a position value from World to Object space.

Transforms a direction vector from World to Object space.

Transforms a normal vector from World to Texture space.

Transforms a position value from World to Texture space.

Transforms a direction vector from World to Texture space.
Utility

Returns 1 if the VEX assertions are enabled (see HOUDINI_VEX_ASSERT) or 0 if assertions are disabled.

An efficient way of extracting the components of a vector, vector4, matrix3 or matrix to float variables.

Reports a custom runtime VEX error.

Extracts a single component of a vector type, matrix type, or array.

Parameters in VEX can be overridden by geometry attributes (if the attributes exist on the surface being rendered).

Check whether a VEX variable is varying or uniform.

End a long operation.

Start a long operation.

Reversibly packs an integer into a finite, nondenormal float.

Prints string arguments exactly one time.

Prints values to the console which started the VEX program.

Returns one of two parameters based on a conditional.

These two functions provide a very efficient way of creating a vector/vector4.

Sets a single component of a vector type, matrix type, or array.

Yields processing for a certain number of milliseconds.

Rearranges components of a vector.

Reverses the packing of pack_inttosafefloat to get back the original integer.

Reports a custom runtime VEX warning.