Houdini 16.0 VEX VEX functions

maketransform VEX function

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

  • matrix3 maketransform(const vector zaxis, yaxis)

  • matrix maketransform(const vector zaxis, yaxis, translate)

  • matrix maketransform(const int trs, xyz; const vector t, r, s)

  • matrix maketransform(const int trs, xyz; const vector t, r, s, p)

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

    maketransform(int trs, ...) builds a general 4×4 transform matrix given an order of transformations (trs), an order for rotations (xyz), a vector representing the translation (t), rotation (r), scale (s) (and optionally a pivot (p)). The specifications for the trs and xyz parameters can be found in $HFS/houdini/vex/include/math.h

    maketransform(vector zaxis, yaxis, ...) builds either a 3×3 transform matrix or a 4×4 transform matrix. The matrix will be constructed so that the z-axis will be transformed to the z-axis specified with the given up vector (yaxis). Thus, maketransform({0,0,1}, {0,1,0}) will result in an identity matrix. The version which returns a 4×4 transform will apply the translation to the 4×4 matrix. This function is very similar to the lookat function. The vectors passed in are not normalized meaning that scales should be preserved in construction of the transform.

    Note

    Unlike most VEX function, this function expects rotations in degrees, not radians.

    VEX functions

    Animation

    • chadd

      Adds new channels to a CHOP node.

    • chattr

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

    • chattrnames

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

    • chend

      Returns the end sample of the input specified.

    • chendf

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

    • chendt

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

    • chindex

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

    • chinput

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

    • chinputlimits

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

    • chnames

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

    • chnumchan

      Returns the number of channels in the input specified.

    • chrate

      Returns the sample rate of the input specified.

    • chreadbuf

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

    • chremove

      Removes channels from a CHOP node.

    • chremoveattr

      Removes a CHOP attribute.

    • chrename

      Renames a CHOP channel.

    • chresizebuf

      Resize the CHOP context temporary buffer

    • chsetattr

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

    • chsetlength

      Sets the length of the CHOP channel data.

    • chsetrate

      Sets the sampling rate of the CHOP channel data.

    • chsetstart

      Sets the CHOP start sample in the channel data.

    • chstart

      Returns the start sample of the input specified.

    • chstartf

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

    • chstartt

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

    • chwritebuf

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

    • isframes

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

    • issamples

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

    • isseconds

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

    Arrays

    • append

      Adds an item to an array or string.

    • argsort

      Returns the indices of a sorted version of an array.

    • array

      Efficiently creates an array from its arguments.

    • arraylength

      Returns the length of an array.

    • foreach

    • insert

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

    • isvalidindex

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

    • len

      Returns the length of an array.

    • pop

      Removes the last element of an array and returns it.

    • push

      Adds an item to an array.

    • removeindex

      Removes an item at the given index from an array.

    • removevalue

      Removes an item from an array.

    • reorder

      Reorders items in an array or string.

    • resize

      Sets the length of an array.

    • reverse

      Returns an array or string in reverse order.

    • slice

      Slices a sub-string or sub-array of a string or array.

    • sort

      Returns the array sorted in increasing order.

    • upush

      Adds a uniform item to an array.

    Attributes and Intrinsics

    • addattrib

      Adds an attribute to a geometry.

    • adddetailattrib

      Adds an attribute to a geometry.

    • addpointattrib

      Adds an attribute to a geometry.

    • addprimattrib

      Adds an attribute to a geometry.

    • addvertexattrib

      Adds an attribute to a geometry.

    • addvisualizer

      Appends to the visualizer detail attribute.

    • attrib

      Reads an attribute value from geometry.

    • attribclass

      Returns the class of a geometry attribute.

    • attribsize

      Returns the size of a geometry attribute.

    • attribtype

      Returns the type of a geometry attribute.

    • attribtypeinfo

      Returns the type info of a geometry attribute.

    • detail

      Imports a detail attribute value from a geometry.

    • detailattrib

      Imports a detail attribute value from a geometry.

    • detailattribsize

      Returns the size of a geometry detail attribute.

    • detailattribtype

      Returns the type of a geometry detail attribute.

    • detailattribtypeinfo

      Returns the type info of a geometry attribute.

    • detailintrinsic

      Imports a detail intrinsic from a geometry.

    • findattribval

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

    • findattribvalcount

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

    • getattrib

      Reads an attribute value from geometry, with validity check.

    • getattribute

      Copies the value of a geometry attribute into a variable.

    • hasattrib

      Checks whether a geometry attribute exists.

    • hasdetailattrib

      Returns if a geometry detail attribute exists.

    • haspointattrib

      Returns if a geometry point attribute exists.

    • hasprimattrib

      Returns if a geometry prim attribute exists.

    • hasvertexattrib

      Returns if a geometry vertex attribute exists.

    • idtopoint

      Looks up a point number by an id attribute.

    • idtoprim

      Looks up a primitive number by an id attribute.

    • nametopoint

      Looks up a point number by a name attribute.

    • nametoprim

      Looks up a primitive number by a name attribute.

    • nuniqueval

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

    • point

      Imports a point attribute value from a geometry.

    • pointattrib

      Imports a point attribute value from a geometry.

    • pointattribsize

      Returns the size of a geometry point attribute.

    • pointattribtype

      Returns the type of a geometry point attribute.

    • pointattribtypeinfo

      Returns the type info of a geometry attribute.

    • prim

      Imports a primitive attribute value from a geometry.

    • prim_attribute

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

    • primarclen

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

    • primattrib

      Imports a primitive attribute value from a geometry.

    • primattribsize

      Returns the size of a geometry prim attribute.

    • primattribtype

      Returns the type of a geometry prim attribute.

    • primattribtypeinfo

      Returns the type info of a geometry attribute.

    • primduv

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

    • primintrinsic

      Imports a primitive intrinsic from a geometry.

    • primuv

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

    • primuvconvert

      Convert parametric UV locations on curve primitives.

    • setattrib

      Writes an attribute value to geometry.

    • setattribtypeinfo

      Sets the meaning of an attribute in geometry.

    • setdetailattrib

      Sets a detail attribute in a geometry.

    • setpointattrib

      Sets a point attribute in a geometry.

    • setprimattrib

      Sets a primitive attribute in a geometry.

    • setprimintrinsic

      Sets a primitive intrinsic value in a geometry.

    • setvertexattrib

      Sets a vertex attribute in a geometry.

    • uniqueval

      Returns a unique value from an integer or string attribute.

    • uvsample

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

    • vertex

      Imports a vertex attribute value from a geometry.

    • vertexattrib

      Imports a vertex attribute value from a geometry.

    • vertexattribsize

      Returns the size of a geometry vertex attribute.

    • vertexattribtype

      Returns the type of a geometry vertex attribute.

    • vertexattribtypeinfo

      Returns the type info of a geometry attribute.

    bsdf

    • mask_bsdf

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

    Conversion

    • atof

      Converts a string to a float.

    • atoi

      Converts a string to an integer.

    • degrees

      Returns the argument from radians into degrees.

    • eulertoquaternion

      Creates a vector4 representing a quaternion from euler angles.

    • hsvtorgb

      Convert HSV color space into RGB color space.

    • qconvert

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

    • radians

      Converts the argument from degrees into radians.

    • rgbtohsv

      Convert RGB color space to HSV color space.

    • rgbtoxyz

      Convert a linear sRGB triplet to CIE XYZ tristimulus values.

    • serialize

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

    • unserialize

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

    • xyztorgb

      Convert CIE XYZ tristimulus values to a linear sRGB triplet.

    Crowds

    File I/O

    • file_stat

      Returns file system status for a given file.

    Fuzzy Logic

    Geometry

    • addpoint

      Adds a point to the geometry.

    • addprim

      Adds a primitive to the geometry.

    • addvertex

      Adds a vertex to the geometry.

    • computenormal

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

    • expandedgegroup

    • expandpointgroup

    • expandprimgroup

    • filamentsample

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

    • geoself

      Returns a handle to the current geometry.

    • geounwrap

      Returns an oppath string to unwrap the geometry inplace.

    • getbbox

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

    • getbbox_center

      Returns the center of the bounding box for the geometry.

    • getbbox_max

      Returns the maximum of the bounding box for the geometry.

    • getbbox_min

      Returns the minimum of the bounding box for the geometry.

    • getbbox_size

      Returns the size of the bounding box for the geometry.

    • getbounds

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

    • getpointbbox

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

    • getpointbbox_center

      Returns the center of the bounding box for the geometry.

    • getpointbbox_max

      Returns the maximum of the bounding box for the geometry.

    • getpointbbox_min

      Returns the minimum of the bounding box for the geometry.

    • getpointbbox_size

      Returns the size of the bounding box for the geometry.

    • hedge_dstpoint

      Returns the destination point of a half-edge.

    • hedge_dstvertex

      Returns the destination vertex of a half-edge.

    • hedge_equivcount

      Returns the number of half-edges equivalent to a given half-edge.

    • hedge_isequiv

      Determines whether a two half-edges are equivalent (represent the same edge).

    • hedge_isprimary

      Determines whether a half-edge number corresponds to a primary half-edge.

    • hedge_isvalid

      Determines whether a half-edge number corresponds to a valid half-edge.

    • hedge_next

      Returns the half-edge that follows a given half-edge in its polygon.

    • hedge_nextequiv

      Returns the next half-edges equivalent to a given half-edge.

    • hedge_postdstpoint

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

    • hedge_postdstvertex

      Returns the vertex following the destination vertex of a half-edge in its primitive.

    • hedge_presrcpoint

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

    • hedge_presrcvertex

      Returns the vertex that precedes the source vertex of a half-edge in its primitive.

    • hedge_prev

      Returns the half-edge that precedes a given half-edge in its polygon.

    • hedge_prim

      Returns the primitive that contains a half-edge.

    • hedge_primary

      Returns the primary half-edge equivalent to a given half-edge.

    • hedge_srcpoint

      Returns the source point of a half-edge.

    • hedge_srcvertex

      Returns the source vertex of a half-edge.

    • inedgegroup

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

    • inpointgroup

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

    • inprimgroup

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

    • intersect

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

    • intersect_all

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

    • invertexgroup

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

    • metaimport

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

    • metamarch

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

    • metanext

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

    • metastart

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

    • metaweight

      Returns the metaweight of the geometry at position p.

    • minpos

      Finds the closest position on the surface of a geometry.

    • nearpoint

      Finds the closest point in a geometry.

    • nearpoints

      Finds the all the closest point in a geometry.

    • nedgesgroup

      Returns the number of edges in the group.

    • neighbour

      Returns the point index of the neighbour of the point.

    • neighbourcount

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

    • neighbours

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

    • npoints

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

    • npointsgroup

      Returns the number of points in the group.

    • nprimitives

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

    • nprimitivesgroup

      Returns the number of primitives in the group.

    • nvertices

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

    • nverticesgroup

      Returns the number of vertices in the group.

    • osd_facecount

    • osd_firstpatch

    • osd_limitsurface

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

    • osd_limitsurfacevertex

    • osd_lookupface

    • osd_lookuppatch

    • osd_patchcount

    • osd_patches

    • pointedge

      Finds and returns a half-edge with the given endpoints.

    • pointhedge

      Finds and returns a half-edge with a given source point or with given source and destination points.

    • pointhedgenext

      Returns the next half-edge with the same source as a given half-edge.

    • pointprims

      Returns the list of primitives containing a point.

    • pointvertex

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

    • pointvertices

      Returns the list of vertices connected to a point.

    • prim_normal

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

    • primfind

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

    • primhedge

      Returns one of the half-edges contained in a primitive.

    • primpoint

      Converts a primitive/vertex pair into a point number.

    • primpoints

      Returns the list of points on a primitive.

    • primvertex

      Converts a primitive/vertex pair into a linear vertex.

    • primvertexcount

      Returns number of vertices in a primitive in a geometry.

    • primvertices

      Returns the list of vertices on a primitive.

    • relbbox

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

    • relpointbbox

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

    • removepoint

      Removes a point from the geometry.

    • removeprim

      Removes a primitive from the geometry.

    • setedgegroup

      Sets edge group membership in a geometry.

    • setpointgroup

      Sets point group membership in a geometry.

    • setprimgroup

      Sets primitive group membership in a geometry.

    • setprimvertex

      Rewires a vertex in the geometry to a different point.

    • setvertexgroup

      Sets vertex group membership in a geometry.

    • setvertexpoint

      Rewires a vertex in the geometry to a different point.

    • tet_adjacent

      Returns primitive number of an adjacent tetrahedron.

    • tet_faceindex

      Returns vertex indices of each face of a tetrahedron.

    • uvdist

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

    • uvintersect

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

    • vertexhedge

      Returns the half-edge which has a vertex as source.

    • vertexindex

      Converts a primitive/vertex pair into a linear vertex.

    • vertexnext

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

    • vertexpoint

      Returns the point number of linear vertex in a geometry.

    • vertexprev

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

    • vertexprim

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

    • vertexprimindex

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

    • volume

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

    • volumegradient

      Calculates the volume primitive’s gradient.

    • volumeindex

      Gets the value of a specific voxel.

    • volumeindexorigin

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

    • volumeindextopos

      Converts a volume voxel index into a position.

    • volumeindexv

      Gets the vector value of a specific voxel.

    • volumepostoindex

      Converts a position into a volume voxel index.

    • volumeres

      Gets the resolution of a volume primitive.

    • volumesample

      Samples the volume primitive’s value.

    • volumesamplev

      Samples the volume primitive’s vector value.

    • volumevoxeldiameter

      Computes the approximate diameter of a voxel.

    • xyzdist

      Finds the distance of a point to a geometry.

    Image Processing

    • accessframe

    • alphaname

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

    • binput

      Returns bilinearly sampled input.

    • bumpname

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

    • chname

      Returns the channel name of the indexed plane.

    • cinput

      Returns point sampled input.

    • colorname

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

    • depthname

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

    • dsmpixel

      Reads the z-records stored in a pixel of a deep shadow map or deep camera map.

    • finput

      Returns fully filtered pixel input.

    • hasmetadata

      Queries if metadata exists on a composite operator.

    • hasplane

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

    • iaspect

      Returns the aspect ratio of the specified input.

    • ichname

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

    • iend

      Returns the last frame of the specified input.

    • iendtime

      Returns the end time of the specified input.

    • ihasplane

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

    • inumplanes

      Returns the number of planes in the given input.

    • iplaneindex

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

    • iplanename

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

    • iplanesize

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

    • irate

      Returns the frame rate of the specified input.

    • istart

      Returns the starting frame of the specified input.

    • istarttime

      Returns the start time of the specified input.

    • ixres

      Returns the X resolution of the specified input.

    • iyres

      Returns the Y resolution of the specified input.

    • lumname

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

    • maskname

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

    • metadata

      Returns a metadata value from a composite operator.

    • ninput

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

    • normalname

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

    • planeindex

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

    • planename

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

    • planesize

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

    • pointname

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

    • velocityname

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

    Math

    • Du

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

    • Dv

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

    • Dw

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

    • abs

      Returns the absolute value of the argument.

    • acos

      Returns the inverse cosine of the argument.

    • asin

      Returns the inverse sine of the argument.

    • atan

      Returns the inverse tangent of the argument.

    • atan2

      Returns the inverse tangent of y/x.

    • avg

      Returns the average value of the input(s)

    • blackbody

      Compute the color value of an incandescent black body.

    • cbrt

      Returns the cube root of the argument.

    • ceil

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

    • ckspline

      Computes a Catmull-Rom (Cardinal) spline between the key points specified.

    • clamp

      Returns value clamped between min and max.

    • clip

      Clip the line segment between p0 and p1.

    • cos

      Returns the cosine of the argument.

    • cosh

      Returns the hyperbolic cosine of the argument.

    • cracktransform

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

    • cross

      Returns the cross product between the two vectors.

    • cspline

      Computes a Catmull-Rom (Cardinal) spline between the key points specified.

    • determinant

      Computes the determinant of the matrix.

    • dihedral

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

    • distance

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

    • distance2

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

    • dot

      Returns the dot product between the arguments.

    • efit

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

    • eigenvalues

      Computes the eigenvalues of a matrix.

    • erf

      Gauss error function.

    • erf_inv

      Inverse Gauss error function.

    • erfc

      Gauss error function’s complement.

    • exp

      Returns the exponential function of the argument.

    • fit

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

    • fit01

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

    • fit10

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

    • fit11

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

    • floor

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

    • frac

      Returns the fractional component of the floating point number.

    • fresnel

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

    • frontface

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

    • ident

      Return an identity matrix.

    • instance

      Creates an instance transform matrix.

    • invert

      Inverts the matrix.

    • isfinite

      Checks whether a value is a normal finite number.

    • isnan

      Checks whether a value is not a number.

    • kspline

      Returns an interpolated value along a spline curve.

    • length

      Returns the length of the vector or vector4.

    • length2

      Returns the squared distance of the vector or vector4.

    • lerp

      Performs bilinear interpolation between the values.

    • lkspline

      Computes a linear spline between the key points.

    • log

      Returns the natural logarithm of the argument.

    • log10

      Returns the logarithm (base 10) of the argument.

    • lookat

      Computes a rotation matrix or angles to orient the z-axis along the vector (to-from) under the transformation.

    • lspline

      Computes a linear spline between the key points.

    • luminance

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

    • makebasis

      Creates an orthonormal basis given a z-axis vector.

    • maketransform

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

    • max

    • min

    • normalize

      Returns the normalized vector.

    • outerproduct

      Returns the outer product between the arguments.

    • ow_nspace

      Transforms a normal vector from Object to World space.

    • ow_vspace

      Transforms a direction vector from Object to World space.

    • planepointdistance

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

    • planesphereintersect

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

    • polardecomp

      Computes the polar decomposition of a matrix.

    • pow

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

    • predicate_incircle

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

    • predicate_insphere

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

    • predicate_orient2d

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

    • predicate_orient3d

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

    • product

      Returns the product of the vector’s components.

    • ptlined

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

    • qdistance

      Finds distance between two quaternions.

    • qinvert

      Inverts a quaternion rotation.

    • qmultiply

      Multiplies two quaternions and returns the result.

    • qrotate

      Rotates a vector by a quaternion.

    • quaternion

      Creates a vector4 representing a quaternion.

    • resample_linear

    • rint

      Rounds the number to the closest integer.

    • rotate

      Applies a rotation to the given matrix.

    • rotate_x_to

      Rotates a vector by a rotation that would bring the x-axis to a given direction.

    • scale

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

    • shl

      Bit-shifts an integer left.

    • shr

      Bit-shifts an integer right.

    • shrz

      Bit-shifts an integer right.

    • sign

      Returns the sign of the argument.

    • sin

      Returns the sine of the argument.

    • sinh

      Returns the hyperbolic sine of the argument.

    • slerp

      Quaternion blend between q1 and q2 based on the bias.

    • slideframe

      Finds the normal component of frame slid along a curve.

    • smooth

      Computes a number between zero and one.

    • smoothrotation

      Returns the closest equivalent Euler rotations to a reference rotation.

    • solvecubic

      Solves a cubic function returning the number of real roots.

    • solvepoly

      Finds the real roots of a polynomial.

    • solvequadratic

      Solves a quadratic function returning the number of real roots.

    • spline

      Returns an interpolated value along a polyline or spline curve.

    • sqrt

      Returns the square root of the argument.

    • sum

      Returns the sum of the vector’s components.

    • tan

      Returns the trigonometric tangent of the argument

    • tanh

      Returns the hyperbolic tangent of the argument

    • translate

      Translates the given matrix.

    • transpose

      Transposes the given matrix.

    • trunc

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

    Nodes

    • addvariablename

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

    • ch

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

    • ch3

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

    • ch4

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

    • chf

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

    • chi

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

    • chp

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

    • chramp

      Evaluates a ramp parameter and return its value.

    • chs

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

    • chsraw

      Returns the raw string channel (or parameter).

    • chv

      Evaluates a channel or parameter, and return its value.

    • isconnected

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

    • ninputs

      Returns the number of inputs.

    • opfullpath

      Returns the full path for the given relative path

    • opparentbonetransform

      Returns the parent bone transform associated with an OP.

    • opparenttransform

      Returns the parent transform associated with an OP.

    • opparmtransform

      Returns the parm transform associated with an OP.

    • oppreconstrainttransform

      Returns the preconstraint transform associated with an OP.

    • oppretransform

      Returns the pretransform associated with an OP.

    • optransform

      Returns the transform associated with an OP.

    Noise and Randomness

    • anoise

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

    • curlnoise

      Computes divergence free noise based on Perlin noise.

    • curlnoise2d

      Computes 2d divergence free noise based on Perlin noise.

    • curlxnoise

      Computes divergence free noise based on Simplex noise.

    • curlxnoise2d

      Computes 2d divergence free noise based on simplex noise.

    • flownoise

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

    • flowpnoise

      There are two forms of Perlin-style noise: a non-periodic noise which changes randomly throughout N-dimensional space, and a periodic form which repeats over a given range of space.

    • hscript_noise

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

    • hscript_rand

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

    • hscript_snoise

    • hscript_sturb

    • hscript_turb

    • noise

      There are two forms of Perlin-style noise: a non-periodic noise which changes randomly throughout N-dimensional space, and a periodic form which repeats over a given range of space.

    • noised

      Derivatives of Perlin Noise.

    • nrandom

      The nrandom() functions are non-deterministic random number generators for VEX.

    • onoise

      These functions are similar to wnoise and vnoise.

    • pnoise

      There are two forms of Perlin-style noise: a non-periodic noise which changes randomly throughout N-dimensional space, and a periodic form which repeats over a given range of space.

    • rand

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

    • random

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

    • random_fhash

      Hashes floating point numbers to integers.

    • random_ihash

      Hashes integer numbers to integers.

    • random_shash

      Hashes string to integers.

    • random_sobol

      Generate a uniformly distributed random number.

    • snoise

      These functions are similar to wnoise.

    • vnoise

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

    • wnoise

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

    • xnoise

      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.

    • xnoised

      Derivatives of Simplex Noise.

    Point Clouds and 3D Images

    • integrate3d

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

    • integrate3dClip

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

    • intersect3d

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

    • mattrib

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

    • mdensity

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

    • mspace

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

    • pcclose

      This function closes the handle associated with a pcopen function.

    • pcconvex

    • pcexport

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

    • pcfarthest

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

    • pcfilter

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

    • pcfind

      Returns a list of closest points from a file.

    • pcfind_radius

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

    • pcgenerate

      Generates a point cloud.

    • pcimport

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

    • pcimportbyidx3

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

    • pcimportbyidx4

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

    • pcimportbyidxf

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

    • pcimportbyidxi

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

    • pcimportbyidxp

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

    • pcimportbyidxs

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

    • pcimportbyidxv

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

    • pciterate

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

    • pcnumfound

      This node returns the number of points found by pcopen.

    • pcopen

      Returns a handle to a point cloud file.

    • pcopenlod

      Returns a handle to a point cloud file.

    • pcsampleleaf

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

    • pcsize

    • pcunshaded

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

    • pcwrite

      Writes data to a point cloud file.

    • pgfind

      Returns a list of closest points from a file.

    • photonmap

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

    • texture3d

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

    • texture3dBox

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

    Sampling

    • create_cdf

      Creates a CDF from an array of input PDF values.

    • create_pdf

      Creates a PDF from an array of input values.

    • limit_sample_space

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

    • newsampler

    • nextsample

    • sample_bsdf

      Samples a bsdf.

    • sample_cauchy

      Samples the Cauchy (Lorentz) distribution.

    • sample_cdf

      Samples a CDF based on a random variable.

    • sample_circle_arc

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

    • sample_circle_edge_uniform

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

    • sample_circle_slice

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

    • sample_circle_uniform

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

    • sample_direction_cone

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

    • sample_direction_uniform

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

    • sample_discrete

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

    • sample_exponential

      Samples the exponential distribution.

    • sample_geometry

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

    • sample_hemisphere

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

    • sample_hypersphere_cone

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

    • sample_hypersphere_uniform

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

    • sample_light

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

    • sample_lognormal

      Samples the log-normal distribution based on parameters of the underlying normal distribution.

    • sample_lognormal_by_median

      Samples the log-normal distribution based on median and standard deviation.

    • sample_normal

      Samples the normal (Gaussian) distribution.

    • sample_orientation_cone

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

    • sample_orientation_uniform

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

    • sample_photon

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

    • sample_sphere_cone

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

    • sample_sphere_uniform

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

    • sampledisk

      Warps uniform random samples to a disk.

    • solid_angle

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

    • split_bsdf

      Splits a bsdf into it’s component lobes.

    • variance

      Computes the mean value and variance for a value.

    Sensor Input

    Shading and Rendering

    • albedo

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

    • ambient

      Returns the color of ambient light in the scene.

    • area

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

    • ashikhmin

      Returns a specular BSDF using the Ashikhmin shading model

    • atten

      Computes attenuated falloff.

    • blinn

      Returns the illumination for specular highlights using the Blinn model.

    • blinnBRDF

    • bouncelabel

    • bouncemask

    • cone

    • cvex_bsdf

    • diffuse

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

    • diffuseBRDF

    • dimport

      Imports a variable from the displacement shader for the surface.

    • emission_bsdf

      Returns the emissive component of a bsdf.

    • eval_bsdf

      Evaluates a bsdf given two vectors.

    • fastshadow

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

    • filtershadow

      Sends a ray from the position P along direction D.

    • filterstep

      Returns the anti-aliased weight of the step function.

    • gather

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

    • getblurP

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

    • getbounces

    • getcomponents

    • getderiv

      Evaluates surface derivatives of an attribute.

    • getfogname

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

    • getglobalraylevel

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

    • getgroupid

      Returns group id containing current primitive.

    • getlight

      Returns a light struct for the specified light identifier.

    • getlightid

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

    • getlightname

      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.

    • getlights

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

    • getlightscope

      Returns a selection of lights that illuminate a given material.

    • getlocalcurvature

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

    • getmaterial

      Returns a material struct for the current surface.

    • getmaterialid

      Returns material id of shaded primitive.

    • getobjectid

      Returns the object id for the current shading context.

    • getobjectname

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

    • getphotonlight

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

    • getprimid

      Returns the number of the current primitive.

    • getptextureid

      Returns the ptexture face id for the current primitive.

    • getraylevel

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

    • getrayweight

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

    • getsamplestore

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

    • getscope

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

    • getsmoothP

      Returns modified surface position based on a smoothing function.

    • getuvtangents

      Evaluates UV tangents at a point on an arbitrary object.

    • gradient

      Returns the gradient of a field.

    • hair

    • haslight

      Returns whether a light illuminates the given material.

    • henyeygreenstein

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

    • illuminance

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

    • importance_light

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

    • interpolate

      Interpolates a value across the currently shaded micropolygon.

    • intersect_lights

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

    • irradiance

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

    • isfogray

      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.

    • isotropic

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

    • israytracing

      Indicates whether a shader is being executed for ray tracing.

    • isshadowray

      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.

    • istracing

      Returns 1 if the shader is invoked by ray-tracing and 0 for micro-polygon rendering.

    • isuvrendering

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

    • lightbounces

      Returns the bounce mask for a light struct.

    • lightid

      Returns the light id for a light struct.

    • limport

      Imports a variable from the light shader for the surface.

    • matchvex_blinn

    • matchvex_specular

    • nbouncetypes

    • normal_bsdf

      Returns the normal for the diffuse component of a bsdf.

    • occlusion

      Computes ambient occlusion.

    • pathtrace

    • phong

      Returns the illumination for specular highlights using different lighting models.

    • phongBRDF

    • phonglobe

    • rayhittest

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

    • rayimport

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

    • reflect

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

    • reflectlight

      Computes the amount of reflected light which hits the surface.

    • refract

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

    • refractlight

      Computes the illumination of surfaces refracted by the current surface.

    • renderstate

      Queries the renderer for a named property.

    • resolvemissedray

      Returns the background color for rays that exit the scene.

    • scatter

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

    • setcurrentlight

      Sets the current light

    • setsamplestore

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

    • shadow

      Calls shadow shaders for the current light source.

    • shadow_light

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

    • shimport

      Imports a variable from the shadow shader for the surface.

    • simport

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

    • specular

      Returns the illumination for specular highlights using different lighting models.

    • specularBRDF

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

    • sssapprox

      Creates an approximate SSS BSDF.

    • storelightexport

      Stores exported data for a light.

    • switch

      Use a different bsdf for direct or indirect lighting.

    • trace

      Sends a ray from P along the normalized vector D.

    • translucent

      Returns the lambertian translucence given the surface normal.

    • uvunwrap

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

    • wireblinn

    • wirediffuse

    • writepixel

      Writes color information to a pixel in the output image

    Strings

    • chr

      Converts an unicode codepoint to a UTF8 string.

    • concat

      Concatenate all the strings specified to form a single string.

    • endswith

      Indicates the string ends with the specified string.

    • isalpha

      Returns 1 if all the characters in the string are alphabetic

    • isdigit

      Returns 1 if all the characters in the string are numeric

    • itoa

      Converts an integer to a string.

    • join

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

    • lstrip

      Strips leading whitespace from a string.

    • match

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

    • opdigits

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

    • ord

      Converts an UTF8 string into a codepoint.

    • pluralize

      Converts an English noun to its plural.

    • re_find

      Finds the given regular expression in the string

    • re_findall

      Finds all instances of the given regular expression in the string

    • re_match

      Returns 1 if the entire input string matches the expression

    • re_replace

      Replaces instances of regex_find with regex_replace

    • re_split

      Splits the given string based on regex match.

    • relativepath

      Computes the relative path for two full paths.

    • rstrip

      Strips trailing whitespace from a string.

    • split

      Splits a string into tokens.

    • splitpath

      Splits a file path into the directory and name parts.

    • sprintf

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

    • startswith

      Returns 1 if the string starts with the specified string.

    • strip

      Strips leading and trailing whitespace from a string.

    • strlen

      Returns the length of the string.

    • titlecase

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

    • tolower

      Converts all charactors in string to lower case

    • toupper

      Convers all charactors in string to upper case

    string, array

    • find

      Finds an item in an array or string.

    Texturing

    • colormap

      Looks up a color from a disk image.

    • depthmap

      The depthmap functions work on an image which was rendered as a z-depth image from mantra.

    • environment

      Returns the color of the environment texture.

    • expand_udim

      Perform UDIM or UVTILE texture filename expansion.

    • gradient3d

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

    • ocean_sample

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

    • ptexture

      Computes a filtered sample from a ptex texture map.

    • rawcolormap

    • shadowmap

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

    • teximport

      Imports attributes from texture files.

    • texprintf

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

    • texture

      Computes a filtered sample of the texture map specified.

    Transforms and Space

    • ctransform

      Transforms between color spaces.

    • fromNDC

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

    • getspace

      See getspace

    • ntransform

      See ptransform.

    • ocio_import

      Imports attributes from OpenColorIO spaces.

    • ocio_spaces

      Returns the names of color spaces supported in Open Color IO

    • ocio_transform

      Transform colors using Open Color IO

    • ow_space

      Transforms a position value from Object to World space.

    • ptransform

      Transforms a vector from one space to another.

    • toNDC

      Transforms a position into normal device coordinates.

    • tw_nspace

      Transforms a normal vector from Texture to World space.

    • tw_space

      Transforms a position value from Texture to World space.

    • tw_vspace

      Transforms a direction vector from Texture to World space.

    • vtransform

      See ptransform.

    • wo_nspace

      Transforms a normal vector from World to Object space.

    • wo_space

      Transforms a position value from World to Object space.

    • wo_vspace

      Transforms a direction vector from World to Object space.

    • wt_nspace

      Transforms a normal vector from World to Texture space.

    • wt_space

      Transforms a position value from World to Texture space.

    • wt_vspace

      Transforms a direction vector from World to Texture space.

    Utility

    • assert_enabled

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

    • assign

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

    • error

      Reports a custom runtime VEX error.

    • forpoints

    • getcomp

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

    • isbound

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

    • isvarying

      Check whether a VEX variable is varying or uniform.

    • opend

      End a long operation.

    • opstart

      Start a long operation.

    • pack_inttosafefloat

      Reversibly packs an integer into a finite, non-denormal float.

    • print_once

      Prints string arguments exactly one time.

    • printf

      Prints values to the console which started the VEX program.

    • select

      Returns one of two parameters based on a conditional.

    • set

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

    • setcomp

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

    • sleep

      Yields processing for a certain number of milliseconds.

    • swizzle

      Rearranges components of a vector.

    • unpack_intfromsafefloat

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

    • warning

      Reports a custom runtime VEX warning.