Useful VEX commands glossary: (to be continuously updated)
- concat(string 1, string 2,..): concatenate all strings
- findattribval(input, attribclass, attrib name, value)
Ex:
v@P = lerp(v@P, point(1, ‘P’, findattribval(1, ‘point’, ‘id’, i@id)), chf(‘blend’)); - void getbbox(0, &min, &max)
getbbox_center
… - getpointbbox: only computes bounding box of points
getpointbbox_center
… - idtopoint(input, id): find a point by its id attrib
- len: returns length of an array
- length: returns magnitude of a vector
- neighborcount: returns the number of points connected to a point
- opid
- opinput
Ex:
@test = @opinput1_attribname -> grab attrib from input 1 - opdigits: returns the int value of the last sequence of digits of a string
- opfullpath: returns the full path of a relative path
- pcopen: returns a point cloud file, often used with pcunshaded or pciterate
pciterate: iterate over all points found in pcopen query
pcimport(handle, attrib name, variable): import channel data from point cloud inside pciterate or pcunshaded to a variable - quaternion(angle, rotation axis): creates a vector4 representing a quarternion, remember to convert angles to radians
- qrotate(quarternion, vector): rotates a vector by a quaternion
- relbbox(geometry, point position): returns the position of the point reletive to the bbox of the geometry
- sprintf (format, arguments….): formats like printf but returns a string result, check its flags on Houdini doc, the many % signs, the many arguments
- uvsample(input, attrib_name, uv_name, uv coord): returns the value of an attribute based on UV coordinate