On this page

Synopsis

vexexec [-j nthreads] [-p nproc] [-t] [-v list] [-V verbose] <program.vex> <program arguments> ... 

Description

vexexec executes a cvex shader on the command line. It can be used to debug simple VEX code without needing to start Houdini or another heavyweight context, for example by using the printf function.

The -j option specifies the number of CPU threads to run.

The -p option specifies the VEX array size on which the shader will execute (by default, the shader will be executed as a scalar program - a default of 1). Larger values of -p can be used to test how the program behaves or performs with a larger array size, which will be more indicative of how shaders are executed in Houdini and mantra. For example, the VOP SOP will have an array size equal to the number of points in the geometry.

The -t option turns on timing of the VEX execution.

The -v option specifies a comma separated list of additional inputs to bind.

The -V option specifies verbosity when running VEX. The argument to the -V option can consist of a combination of:

  • 0:

    Set verbose level to 0.

  • 1:

    Set verbose level to 1.

  • 2:

    Set verbose level to 2.

  • c:

    Enable coloring of log messages (default).

  • C:

    Disable coloring of log messages.

  • t:

    Enable time stamps on log messages (default).

  • T:

    Disable time stamps on log messages.

  • p:

    Enable VEX profiling.

  • P:

    Enable VEX profiling and NAN detection.

For example:

  • -V 2PC:

    Set verbosity to 2, perform VEX profiling and NAN detection and disable log message coloring.

Bindings

There are a few predefined shader parameter bindings supported by vexexec that can be used to manage the context of the shader. You can add new bindings with the -v command-line option.

int proc = 0;

The current processor number.

int ival = 0;

The offset into the current batch of data.

float fval = 0;

A varying value initialized to random floats in /ref/utils/0,1.

vector vval = 0;

A varying value initialized to random floats in /ref/utils/0,1.

vector4 pval = 0;

A varying value initialized to random floats in /ref/utils/0,1.

These values are queried by cvex after the shader executes:

export float result = 0;

A floating point result.

Examples

cvex simple(int proc = 0; export float result = 0)
{
    result = proc * proc;
    printf("proc = %g, proc^2 = %g\n", proc, result);
}

Save to simple.vfl and execute the following commands:

vcc simple.vfl
vexexec -p3 simple.vex

Output:

proc = 0, proc^2 = 0

proc = 1, proc^2 = 1

proc = 2, proc^2 = 4

Stand-alone utilities

  • abcconvert

    Convert between Alembic formats.

  • abcecho

    Print information about an Alembic file.

  • abcinfo

    Print information about an Alembic file.

  • chchan

    Copies channel collection to/from action channel format.

  • chcp

    Copies channel collection file to another format.

  • chinfo

    Prints information about a channel collection file.

  • claudio

    Copies CHOP data (clip) to/from audio formats.

  • clchan

    Copies CHOP data (clip) to/from action channel format.

  • clchn

    Copies CHOP data (clip) to/from channel collection format.

  • clcp

    Copies CHOP data (clip) to another format.

  • clinfo

    Prints information about a CHOP data (clip) file.

  • dsmconvert

  • dsmmerge

  • dsparse

    Parses and displays dialog scripts.

  • gabc

    Convert between Alembic and Houdini geometry.

  • gconvert

    Convert between Houdini polygon formats.

  • gdxf

    Converts DXF polygons to/from Houdini format.

  • geps

    Converts EPS files to Houdini polygon format.

  • giges

  • ginfo

    Prints polygon file statistics.

  • glightwave

    Converts LightWave files to/from Houdini format.

  • gplay

    Geometry viewer.

  • gptex

    Makes a ptexture image file from a geometry file.

  • greduce

    Reduces polygons in a file.

  • gwavefront

    Converts .obj files to/from Houdini format.

  • hbrickmap

    Converts an i3d file or volume primitive geo/bgeo file into a Pixar brickmap file.

  • hcollapse

    Collapses a directory structure.

  • hcpio

  • hexpand

    Expands hip files into a directory structure.

  • hrender

  • hsc

  • hscript

    Command line HScript interpreter.

  • i3dconvert

  • iautocrop

    Crops images based on pixel values.

  • icineon

    Convert images from 10-bit Cineon format to an 8 bit format.

  • icomposite

  • iconvert

    Converts image formats.

  • icp

    Isolate a region of an image in a new image.

  • iflip - Flip Image

  • ihot

    Scans an image for video-unsafe colors.

  • iinfo

    Outputs information about an image.

  • ilut

    Generates a lookup table (LUT) from standard channel formats or another LUT.

  • ilutcomp

    Generates a single lookup table (LUT) from from two LUTs.

  • ilutinfo

    Prints information about a lookup table (LUT) file.

  • imdisplay

    Sends an image to an mdisplay window.

  • iprint

    Prints the RGBA values for an image as text.

  • iquantize

    Reduces the number of colors in an image.

  • isixpack

    Generates an environment/reflection map from six images representing the six sides of a cube, or a cross image.

  • itilestitch

    Assemble a series of image files with crop windows into a single image.

  • izg

    Converts Z-depth images to 8-bit grayscale images.

  • izmatte

    Composites RGB and Z-depth images.

  • mcacclaim

    Converts an Acclaim motion file to a Houdini script and channel file(s).

  • mcbiovision

    Converts a BioVision motion file to a Houdini script and channel file(s).

  • mcmotanal

    Converts a Motion Analysis TRC motion file to a Houdini script and channel file(s).

  • mcp

    Convert an image sequence to a movie file.

  • minfo

    Prints information about movie files.

  • siminfo

    Prints simulation cache file statistics.

  • spy

    Shell utility for navigating the UNIX filesystem.

  • vexcache

    Query or modify the VEX compile cache.

  • vexexec

    Execute a cvex shader.