Professional Documents
Culture Documents
title=VEX_Attribute_Glossary
Contents
1 What is VEX?
2 Global Variables
3 Common Geometry Attributes
4 Specifying VEX Data Types
5 Channel Shortcut Syntax
6 DOP Particle Attributes
7 DOP Grains Attributes
8 DOP Packed RBD Attributes
9 DOP RBD Constraint Attributes
10 DOP FLIP Attributes
11 DOP Vellum Point Attributes
12 DOP Vellum Constraint Attributes
13 KineFX Attributes
14 Viewport Display Attributes
15 Copying and Instancing Attributes
16 Accessing Other Inputs
17 For Loop Metadata
What is VEX?
It is a software interpreted language (execute instructions directly and freely, without previously compiling a
program into machine-language instructions.) so provides the flexibility of scripting. However, it also has an
implicitly SIMD evaluation approach.
SIMD is short for Single Instruction/Multiple Data[1], meaning that your code (instruction) is executed over
multiple data (vertices, points, primitives, pixels, voxels, etc).
VEX is the workhorse for geometry, volume and simulation processing in addition to shading and
compositing.[2]
Global Variables
A list of variables available in wrangles. The type indicator isn't necessary, but included as a reminder.[3]
1 of 10 17-09-2022, 23:31
VEX Attribute Glossary - kunz https://wiki.johnkunz.com/index.php?title=VEX_Attribute_Glossary
f@SimTime //The simulation time in seconds ($ST), only present in DOP contexts.
f@TimeInc //The timestep currently being used for simulation or playback.
// Int
@id // A unique number that remains the same throughout a simulation.
// Float
@pscale // Particle radius size. Uniform scale. Set display particles as 'Discs' to visualize.
@width // Thickness of curves. Enable 'Shade Open Curves In Viewport' on the object node to visualize.
@Alpha // Alpha transparency override. The viewport uses this to set the alpha of OpenGL geometry.
@Pw // Spline weight.
// Vector3
@P // Point position. Used this to lay out points in 3D space.
@Cd // Diffuse color override. The viewport uses this to color OpenGL geometry.
@N // Surface or curve normal. Houdini will compute the normal if this attribute does not exist.
@scale // Vector scale. Allows directional scaling or stretching (in one direction).
@rest // Used by procedural patterns and textures to stick on deforming and animated surfaces.
@up // Up vector. The up direction for local space, typically (0, 1, 0).
@uv // UV texture coordinates for this point/vertex.
@v // Point velocity. The direction and speed of movement in units per second.
// Vector4
@orient // The local orientation of the point (represented as a quaternion).
@rot // Additional rotation to be applied after orient, N, and up attributes.
// String
@name // A unique name identifying which primitives belong to which piece. Also used to label volumes.
@instance // Path of an object node to be instanced at render time.
2 of 10 17-09-2022, 23:31
VEX Attribute Glossary - kunz https://wiki.johnkunz.com/index.php?title=VEX_Attribute_Glossary
The following characters are used to cast to the corresponding data type.
ch('flt1'); // Float
chf('flt2'); // Float
chi('int'); // Integer
chv('vecparm'); // Vector 3
chp('quat'); // Vector 4 / Quaternion
ch3('m3'); // 3x3 Matrix
ch4('m4'); // 4x4 Matrix
chs('str'); // String
chramp('r', x); // Spline Ramp
vector(chramp('c', x)); // RGB Ramp
i@hittotal // The cumulative total of all hits for the particle (only incremented once per timestep).
i@has_pprevious // This is set to 1 if v@pprevious contains valid values.
v@pprevious // Stores the position of the particle on the previous frame. Used for collision detection.
i@hitnum // The number of times the particle collided in the last POP Collision Detect.
s@hitpath // The path to the object that was hit. A path to a file on disk or an op: path.
i@hitprim // The primitive hit. Could be -1 if it the collision detector couldn’t figure out which prim.
v@hituv // The parametric UV space on the primitive.
v@hitpos // Where the hit actually occurred. Useful if the colliding object was moving.
3 of 10 17-09-2022, 23:31
VEX Attribute Glossary - kunz https://wiki.johnkunz.com/index.php?title=VEX_Attribute_Glossary
p@orient // Orientation of the particle. Used for figuring out 'local' forces.
v@w // Angular speed of the particle. A vector giving the rotation axis.
v@torque // The equivalent of force for spins. No inertial tensor (the equivalent of mass) is supported.
v@targetw // The goal spin direction and speed for this particle.
f@spinresist// How important it is to match the targetw.
f@spinmin // Minimum speed in radians per second that a particle can spin.
f@spinmax // Maximum speed in radians per second that a particle can spin.
f@restlength// Particles connected by polylines will be forced to maintain this distance (prim attribute).
f@constraintweight // Scale, on a per-particle basis of the constraint force.
f@constraintstiffness // This controls the stiffness on a per-particle basis.
f@strain // This primitive attribute records how much the constraint is stretched.
f@strength // If f@strain exceeds this primitive attribute, the constraint will be removed.
4 of 10 17-09-2022, 23:31
VEX Attribute Glossary - kunz https://wiki.johnkunz.com/index.php?title=VEX_Attribute_Glossary
s@activationignore // Won't be activated by collisions with any objects that match this pattern.
s@collisiongroup // Specifies the name of a collision group that this object belongs to.
s@collisionignore // The object will not collide against any objects that match this pattern.
f@min_activation_impulse// Minimum impulse that will cause the object to switch from inactive to active.
f@speedmin // Minimum speed, in units per second, that a particle can move.
f@speedmax // Maximum speed, in units per second, that a particle can move.
f@spinmin // Minimum speed in radians per second that a particle can spin.
f@spinmax // Maximum speed in radians per second that a particle can spin.
f@accelmax // Limits the change in the object’s speed that is caused by enforcing constraints.
f@angaccelmax // Limits the change in the object’s angular speed that is caused by enforcing constraints.
5 of 10 17-09-2022, 23:31
VEX Attribute Glossary - kunz https://wiki.johnkunz.com/index.php?title=VEX_Attribute_Glossary
i@bullet_autofit_valid // Stores whether the solver has already computed collision shape attributes.
i@bullet_sleeping // Tracks whether the object has been put to sleep by the solver.
f@deactivation_time // Amount of time the speed has been below the Linear Threshold or Angular Threshold.
i@found_overlap // Used by the solver to determine whether it has performed the overlap test.
i@id // A unique identifier for the object.
i@nextid // Stores the i@id the solver will assign to the next new object.
6 of 10 17-09-2022, 23:31
VEX Attribute Glossary - kunz https://wiki.johnkunz.com/index.php?title=VEX_Attribute_Glossary
// Collisions
f@pscale // Used to determine the thickness of cloth or radius of each particle.
f@overlap_self // Stores how much of the original pscale is overlapped.
f@overlap_external // Stores how much of the original pscale is overlapped.
i@layer // Indicates belonging to different layers of cloth. Higher numbers refer to higher layers.
i@disableself // A value of 0 means this point will use self collisions.
i@disableexternal // A value of 0 means this point will use external collisions.
s@collisionignore // Stores a pattern for the objects and collision groups to not collide with.
s@collisiongroup // Gives the collision group that this point belongs to.
7 of 10 17-09-2022, 23:31
VEX Attribute Glossary - kunz https://wiki.johnkunz.com/index.php?title=VEX_Attribute_Glossary
p@orientlast // For 2nd order integration, the orientation from two frames earlier.
p@wprevious // For 1st order integration, the previous frames angular velocity (beginning of timestep).
p@wlast // For 2nd order integration, the angular velocity from two frames earlier.
f@dP // Constraint displacements. Likely of last iteration.
f@dPw // Constraint weights. Likely of last iteration.
s@patchname // Identifies each generated patch in a simulation so it can be updated/replaced.
// When a point is part of a Pressure constraint, these attrs hold values computed during constraint update.
v@pressuregradient // a vector pointing outwards along the direction of greatest volume gain.
i[]@volumepts // contains array of the points needed to compute the volume attribute.
i@volume // compare against the Pressure constraint’s restlength value.
f@stiffness // The stiffness of the constraint, which controls how strongly the constraint pulls.
f@restlength
f@restlengthorig
f@dampingratio // Damping reduces jitter by bleeding energy when evaluating the constraint. Too much damping can prevent the cons
f@stress // Estimate of work done by the constraint (updated by Vellum solver).
s@constraint_tag // The name of the node which created the constraint.
KineFX Attributes
A KineFX hierarchy or skeleton is represented by a collection of points connected by polygon lines. The
parent-child relationship between joints in a hierarchy is determined by vertex order.
8 of 10 17-09-2022, 23:31
VEX Attribute Glossary - kunz https://wiki.johnkunz.com/index.php?title=VEX_Attribute_Glossary
// 'opinput:X' is the most legible and always works (the first input is input 0).
point('opinput:0', 'P', i@ptnum)
point('opinput:1', 'P', i@ptnum)
9 of 10 17-09-2022, 23:31
VEX Attribute Glossary - kunz https://wiki.johnkunz.com/index.php?title=VEX_Attribute_Glossary
// The integer input number (the first input is 0). Some functions don't support this but it's easy to type.
point(0, 'P', i@ptnum)
point(1, 'P', i@ptnum)
point(2, 'P', i@ptnum)
point(3, 'P', i@ptnum)
// @OpInputX works as well, but be careful as it isn't 0 based, instead it starts at 1 which is confusing
point(@OpInput1, 'P', i@ptnum)
point(@OpInput2, 'P', i@ptnum)
point(@OpInput3, 'P', i@ptnum)
point(@OpInput4, 'P', i@ptnum)
// v@opinputX_* reads an attribute from the same element on the numbered input (first input is input 0).
v@opinput0_P
v@opinput1_P
v@opinput2_P
v@opinput3_P
1. BasicsOfSIMDProgramming
2. Houdini Threading Presentation, Slide 7
3. sidefx.com/docs/houdini/vex/snippets.html
4. sidefx.com/docs/houdini/model/attributes.html
5. sidefx.com/docs/houdini/copy/instanceattrs.html
10 of 10 17-09-2022, 23:31