[SESI logo]

VEX Language Reference - Version 7.0

Side Effects Software Inc. 2004

Changes since Houdini 5.0

These are highlights of major changes since the 5.0 release of houdini.

  • CPP Changes
  • New Variables
  • Function Additions/Modifications
  • 3D Texture Changes

  • CPP Changes

  • The CPP parser used for vcc, dialog script parsing, etc. has been modified to have a strcmp operator. This can be used to compare string values using the same semantics as the C/C++ function of the same name. For example: #if defined(FOO) || strcmp("dothis", "dothis") #include "dothis.h" #endif
  • The CPP parser used for vcc, dialog script parsing, etc. has been modified to have an access operator. This can be used to determine if a file exists and can be read, similar to the C/C++ UNIX system call of the same name. For example: #if defined(FOO) && access("$HFS/includer") #include "$HFS/includer" #endif

  • New Global Variable

  • There is a new global variable available in the Surface, Displacement and Fog shading contexts. The Pz variable represents the z-coordinate of the P variable. Its primary use is in rendering deep rasters.

  • Function Additions/Modifications

  • There are four new versions of the periodic Perlin noise functions. All four encapsulate the periodicity values into a single vector or vector4.

  • float pnoise(vector pos, p)
  • vector pnoise(vector pos, p)
  • float pnoise(vector4 pos, p)
  • vector pnoise(vector4 pos, p)
  • There is a new noise function vnoise() which is similar to the wnoise() functions but has more controls and gives back more information.

  • void vnoise(float pos, jitter; int &seed; float &f1, &f2; float &p1, &p2, [period])
  • void vnoise(float pos_x, pos_y, jitter_x, jitter_y; int &seed; float &f1, &f2; float &p1_x, &p1_y, &p2_x, &p2_y, [period])
  • void vnoise(vector pos, jitter; int &seed; float &f1, &f2; vector &p1, &p2, [period])
  • void vnoise(vector4 pos, jitter; int &seed; float &f1, &f2; vector4 &p1, &p2, [period])
  • The functions take a jitter parameter which determines how randomly the points are placed in space. As well, it will return the actual locations in space of the two closest points.

  • There are two new versions of the pow function:

  • vector pow(vector, float)
  • vector4 pow(vector4, float)
  • There are new versions of the length/distance functions:

  • float length(vector4)
  • float length2(vector4)
  • float distance(vector4, vector4)
  • float distance2(vector4, vector4)
  • The atoi() and atof() functions were added to convert strings to integers and floats.


  • 3D Texture Changes

  • Some VEX functions to access 3D textures were re-named. Integration of textures is no longer overloaded using texture3d, but instead is integrate3d. The integration clipping function texture3dIso has been renamed integrate3dClip. To make your VEX code compilable with either 5.0 or 5.1, insert the following code at the beginning of the file: #if __vex_major == 5 && __vex_minor < 1 #define integrate3d texture3d #define integrate3dClip texture3dIso #endif and replace all integration calls with integrate3d and all texture3dIso calls with integrate3dClip.

  • Texture filtering can now be done on 3D texture maps. This is done in the same fashion as 2D texture calls, by passing optional arguments.

  • There is now more control over quality of the integration functions. Please see help for integrate3d and integrate3dClip for further details.

  • There is a new function, gradient3d(), which can be used to compute the gradient field of a single channel density field.

  • The "minlimit" control for integration is now silently ignored.



  • Copyright © 1999-2004 Side Effects Software Inc.
    477 Richmond Street West, Toronto, Ontario, Canada M5V 3E7