Overview
CVEX is an TD/Artist VEX/VOP front end built in to specific render time procedurals by the developer of that render procedural. CVEX is an actual program written in VEX or built with VOP networks usually by the TD/Artist that gets called by a run-time procedural written in c++ by a developer utilizing the HDK. Geometry gets built and passed out of the procedural to the cvex program which processes the geometry then returns the result back to the procedural.
Some nodes let you customize their behavior by writing snippets of VEX to manipulate data, giving great flexibility. These VEX programs run in a generic “CVEX” context.
For example, rather than provide hundreds of parameters on the fur nodes to provide complete control over texture maps, noise, etc., the fur nodes let you use CVEX shaders to customize the node behavior using VEX code. The fur node initializes parameter values in the context and then the CVEX program can manipulate them. The fur node reads back the modified values and uses them to generate curves.
Unlike other VEX contexts which provide global variables and special functions related to the purpose of the context (such as channel query functions in the chop context), the CVEX context is designed for hosting generic, low-level programs, so it provides only the generic functions common to all contexts, and no special pre-defined global variables.
Available functions
To get a list of all functions available in the CVEX context, open a Houdini Command Line Tools shell and type
vcc -X cvex
CVEX VOPs
You can create CVEX shaders by writing VEX code directly, or by creating a VOP CVEX Shader shader node and creating a VOP network inside.
The CVEX shader type has no output node. CVEX VOP networks work by manipulating parameters. Create a Parameter node and set its Export parameter to Always, then connect VOPs to its input to export a value. To take the initial value of a parameter, manipulate it, and then export the changed value, use two Parameter nodes: one at the start of the chain with Export set to Never, and one at the end of the chain with Export set to Always.
HDK nodes
The Houdini extension development kit (HDK) contains sample code for creating nodes that can call CVEX programs.