OpenVDB 13.0.0

Loading...
Searching...
No Matches
AX Supported Functions
This page holds the full list of functions currently supported by AX. It is usually automatically updated from the most recent output of the vdb_ax binary's function option.

#
Functions

- abs
- acos
- acosh
- addtogroup
- adjoint
- argsort
- asin
- asinh
- atan
- atan2
- atanh
- atof
- atoi
- cbrt
- ceil
- clamp
- cofactor
- cos
- cosh
- cross
- curlsimplexnoise
- degrees
- deletepoint
- determinant
- diag
- dot
- euclideanmod
- exp
- exp2
- external
- externalv
- fabs
- fit
- floor
- floormod
- getcoordx
- getcoordy
- getcoordz
- getvoxelpws
- hash
- identity3
- identity4
- ingroup
- inverse
- isfinite
- isinf
- isnan
- length
- lengthsq
- lerp
- log
- log10
- log2
- max
- min
- normalize
- polardecompose
- postscale
- pow
- prescale
- pretransform
- print
- radians
- rand
- rand32
- removefromgroup
- round
- sign
- signbit
- simplexnoise
- sin
- sinh
- sort
- sqrt
- tan
- tanh
- trace
- transform
- transpose
- truncatemod

abs
  Computes the absolute value of an integer number.
  int64(int64 n);
  int32(int32 n);
  double(double n);
  float(float n);

acos
  Computes the principal value of the arc cosine of the input.
  double(double arg);
  float(float arg);

acosh
  Computes the inverse hyperbolic cosine of the input.
  double(double arg);
  float(float arg);

addtogroup
  Add the current point to the given group name, effectively setting its membership to true. If the group does not exist, it is implicitly created. This function has no effect if the point already belongs to the given group.
  void(string);

adjoint
  Returns the adjoint of a 3x3 matrix. That is, the transpose of its cofactor matrix.
  mat3d(mat3d input);
  mat3f(mat3f input);

argsort
  Returns a vector of the indexes that would sort the input vector.
  vec3i(vec3d v);
  vec3i(vec3f v);
  vec3i(vec3i v);
  vec4i(vec4d v);
  vec4i(vec4f v);
  vec4i(vec4i v);

asin
  Computes the principal value of the arc sine of the input.
  double(double arg);
  float(float arg);

asinh
  Computes the inverse hyperbolic sine of the input.
  double(double arg);
  float(float arg);

atan
  Computes the principal value of the arc tangent of the input.
  double(double arg);
  float(float arg);

atan2
  Computes the arc tangent of y/x using the signs of arguments to determine the correct quadrant.
  double(double y; double x);
  float(float y; float x);

atanh
  Computes the inverse hyperbolic tangent of the input.
  double(double arg);
  float(float arg);

atof
  Parses the string input, interpreting its content as a floating point number and returns its value as a double.
  double(i8* str);

atoi
  Parses the string input interpreting its content as an integral number, which is returned as a value of type int.
  int32(i8* str);

cbrt
  Computes the cubic root of the input.
  double(double arg);
  float(float arg);

ceil
  Computes the smallest integer value not less than arg.
  double(double n);
  float(float n);

clamp
  Clamps the first argument to the minimum second argument value and maximum third argument value
  double(double in; double min; double max);
  float(float in; float min; float max);
  int64(int64 in; int64 min; int64 max);
  int32(int32 in; int32 min; int32 max);

cofactor
  Returns the cofactor matrix of a 3x3 matrix. That is, the matrix of its cofactors.
  mat3d(mat3d input);
  mat3f(mat3f input);

cos
  Computes the cosine of arg (measured in radians).
  double(double n);
  float(float n);

cosh
  Computes the hyperbolic cosine of the input.
  double(double arg);
  float(float arg);

cross
  Returns the length of the given vector
  vec3d(vec3d a; vec3d b);
  vec3f(vec3f a; vec3f b);
  vec3i(vec3i a; vec3i b);

curlsimplexnoise
  Generates divergence-free 3D noise, computed using a curl function on Simplex Noise.
  vec3d(vec3d pos);
  vec3d(double pos; double; double);

degrees
  Converts the number of radians to degrees.
  double(double radians);
  float(float radians);

deletepoint
  Delete the current point from the point set. Note that this does not stop AX execution - any additional AX commands will be executed on the point and it will remain accessible until the end of execution.
  void();

determinant
  Returns the determinant of a matrix.
  double(mat3d mat);
  float(mat3f mat);
  double(mat4d mat);
  float(mat4f mat);

diag
  Create a diagonal matrix from a vector, or return the diagonal components of a matrix as a vector.
  vec3d(mat3d vec);
  vec3f(mat3f vec);
  vec4d(mat4d vec);
  vec4f(mat4f vec);
  mat3d(vec3d mat);
  mat3f(vec3f mat);
  mat4d(vec4d mat);
  mat4f(vec4f mat);

dot
  Computes the dot product of two vectors.
  double(vec3d a; vec3d b);
  float(vec3f a; vec3f b);
  int32(vec3i a; vec3i b);

euclideanmod
  Euclidean modulo, where by the result of the division operator on (dividend / divisor) is floored or ceiled depending on its sign, guaranteeing that the return value is always positive. The remainder is thus calculated with D - d * (d < 0 ? ceil(D/d) : floor(D/d)). This is NOT equal to ab in AX. See truncatemod(), floormod().
  double(double dividend; double divisor);
  float(float dividend; float divisor);
  int64(int64 dividend; int64 divisor);
  int32(int32 dividend; int32 divisor);

exp
  Computes e (Euler's number, 2.7182818...) raised to the given power arg.
  double(double n);
  float(float n);

exp2
  Computes 2 raised to the given power arg.
  double(double n);
  float(float n);

external
  Find a custom user parameter with a given name of type 'float' in the Custom data provided to the AX compiler. If the data can not be found, or is not of the expected type 0.0f is returned.
  float(string str);

externalv
  Find a custom user parameter with a given name of type 'vector float' in the Custom data provided to the AX compiler. If the data can not be found, or is not of the expected type { 0.0f, 0.0f, 0.0f } is returned.
  vec3f(string str);

fabs
  Computes the absolute value of a floating point value arg.
  double(double n);
  float(float n);

fit
  Fit the first argument to the output range by first clamping the value between the second and third input range arguments and then remapping the result to the output range fourth and fifth arguments
  double(double value; double omin; double omax; double nmin; double nmax);
  float(float value; float omin; float omax; float nmin; float nmax);
  double(int64 value; int64 omin; int64 omax; int64 nmin; int64 nmax);
  double(int32 value; int32 omin; int32 omax; int32 nmin; int32 nmax);

floor
  Computes the largest integer value not greater than arg.
  double(double n);
  float(float n);

floormod
  Floored modulo, where the result of the division operator on (dividend / divisor) is floored. The remainder is thus calculated with D - d * floor(D/d). This is the implemented modulo % operator of AX. This is equal to the python % implementation. See trucnatemod(), euclideanmod().
  double(double dividend; double divisor);
  float(float dividend; float divisor);
  int64(int64 dividend; int64 divisor);
  int32(int32 dividend; int32 divisor);

getcoordx
  Returns the current voxel's X index value in index space as an integer.
  int32();

getcoordy
  Returns the current voxel's Y index value in index space as an integer.
  int32();

getcoordz
  Returns the current voxel's Z index value in index space as an integer.
  int32();

getvoxelpws
  Returns the current voxel's position in world space as a vector float.
  vec3f();

hash
  Return a hash of the provided string.
  int64(string str);

identity3
  Returns the 3x3 identity matrix
  mat3f();

identity4
  Returns the 4x4 identity matrix
  mat4f();

ingroup
  Return whether or not the current point is a member of the given group name. This returns false if the group does not exist.
  bool(string);

inverse
  Return the inverse of a 3x3 matrix.If the matrix is singular, returns the input matrix.
  mat3d(mat3d input);
  mat3f(mat3f input);

isfinite
  Returns whether the value is finite i.e. not infinite or NaN. For matrix and vector types will return false if any element is not finite.
  bool(vec2d);
  bool(vec2f);
  bool(vec3d);
  bool(vec3f);
  bool(vec4d);
  bool(vec4f);
  bool(mat3f);
  bool(mat3d);
  bool(mat4f);
  bool(mat4d);
  bool(double arg);
  bool(float arg);

isinf
  Returns whether the value is inf. For matrix and vector types will return true if any element is inf.
  bool(vec2d);
  bool(vec2f);
  bool(vec3d);
  bool(vec3f);
  bool(vec4d);
  bool(vec4f);
  bool(mat3f);
  bool(mat3d);
  bool(mat4f);
  bool(mat4d);
  bool(double arg);
  bool(float arg);

isnan
  Returns whether the value is NaN (not-a-number).
  bool(vec2d);
  bool(vec2f);
  bool(vec3d);
  bool(vec3f);
  bool(vec4d);
  bool(vec4f);
  bool(mat3f);
  bool(mat3d);
  bool(mat4f);
  bool(mat4d);
  bool(double arg);
  bool(float arg);

length
  Returns the length of the given vector
  double(vec2d v);
  float(vec2f v);
  double(vec2i v);
  double(vec3d v);
  float(vec3f v);
  double(vec3i v);
  double(vec4d v);
  float(vec4f v);
  double(vec4i v);

lengthsq
  Returns the squared length of the given vector
  double(vec2d v);
  float(vec2f v);
  int32(vec2i v);
  double(vec3d v);
  float(vec3f v);
  int32(vec3i v);
  double(vec4d v);
  float(vec4f v);
  int32(vec4i v);

lerp
  Performs bilinear interpolation between the values. If the amount is outside the range 0 to 1, the values will be extrapolated linearly. If amount is 0, the first value is returned. If it is 1, the second value is returned. This implementation is guaranteed to be monotonic.
  double(double a; double b; double amount);
  float(float a; float b; float amount);

log
  Computes the natural (base e) logarithm of arg.
  double(double n);
  float(float n);

log10
  Computes the common (base-10) logarithm of arg.
  double(double n);
  float(float n);

log2
  Computes the binary (base-2) logarithm of arg.
  double(double n);
  float(float n);

max
  Returns the larger of the given values.
  double(double a; double b);
  float(float a; float b);
  int64(int64 a; int64 b);
  int32(int32 a; int32 b);

min
  Returns the smaller of the given values.
  double(double a; double b);
  float(float a; float b);
  int64(int64 a; int64 b);
  int32(int32 a; int32 b);

normalize
  Returns the normalized result of the given vector.
  vec3d(vec3d v);
  vec3f(vec3f v);
  vec3d(vec3i v);
  vec4d(vec4d v);
  vec4f(vec4f v);
  vec4d(vec4i v);

polardecompose
  Decompose an invertible 3x3 matrix into its orthogonal (unitary) matrix and symmetric matrix components. If the determinant of the unitary matrix is 1 it is a rotation, otherwise if it is -1 there is some part reflection.
  bool(mat3d input; mat3d unitary; mat3d symmetric);
  bool(mat3f input; mat3f unitary; mat3f symmetric);

postscale
  Post-scale a given matrix by the provided vector.
  void(mat4d transform; vec3d vec);
  void(mat4f transform; vec3f vec);

pow
  Computes the value of the first argument raised to the power of the second argument.
  double(double base; double exp);
  float(float base; float exp);
  double(double base; int32 exp);

prescale
  Pre-scale a given matrix by the provided vector.
  void(mat4d transform; vec3d vec);
  void(mat4f transform; vec3f vec);

pretransform
  Return the transformed vector by transpose of this matrix. This function is equivalent to pre-multiplying the matrix.
  vec3d(mat3d vec; vec3d mat);
  vec3f(mat3f vec; vec3f mat);
  vec3d(mat4d vec; vec3d mat);
  vec3f(mat4f vec; vec3f mat);
  vec4d(mat4d vec; vec4d mat);
  vec4f(mat4f vec; vec4f mat);

print
  Prints the input to the standard output stream. Warning: This will be run for every element.
  void(double n);
  void(float n);
  void(int64 n);
  void(int32 n);
  void(string n);
  void(vec2i n);
  void(vec2f n);
  void(vec2d n);
  void(vec3i n);
  void(vec3f n);
  void(vec3d n);
  void(vec4i n);
  void(vec4f n);
  void(vec4d n);
  void(mat3f n);
  void(mat3d n);
  void(mat4f n);
  void(mat4d n);

radians
  Converts the number of degrees to radians.
  double(double degrees);
  float(float degrees);

rand
  Creates a random number based on the provided seed. The number will be in the range of 0 to 1. The same number is produced for the same seed. Note that if rand is called without a seed the previous state of the random number generator is advanced for the currently processing element. This state is determined by the last call to rand() with a given seed. If rand is not called with a seed, the generator advances continuously across different elements which can produce non-deterministic results. It is important that rand is always called with a seed at least once for deterministic results.
  double();
  double(double seed);
  double(int64 seed);

rand32
  Creates a random number based on the provided 32 bit seed. The number will be in the range of 0 to
  1. The same number is produced for the same seed. NOTE: This function does not share the same random number generator as rand(). rand32() may provide a higher throughput on some architectures, but will produce different results to rand(). NOTE: If rand32 is called without a seed the previous state of the random number generator is advanced for the currently processing element. This state is determined by the last call to rand32() with a given seed. If rand32 is not called with a seed, the generator advances continuously across different elements which can produce non-deterministic results. It is important that rand32 is always called with a seed at least once for deterministic results.
     double();
     double(double seed);
     double(int32 seed);

removefromgroup
  Remove the current point from the given group name, effectively setting its membership to false. This function has no effect if the group does not exist.
  void(string);

round
  Computes the nearest integer value to arg (in floating-point format), rounding halfway cases away from zero.
  double(double n);
  float(float n);

sign
  Implements signum, determining if the input is negative, zero or positive. Returns -1 for a negative number, 0 for the number zero, and +1 for a positive number. Note that this function does not check the sign of floating point +/-0.0 values. See signbit().
  int32(double n);
  int32(float n);
  int32(int64 n);
  int32(int32 n);

signbit
  Determines if the given floating point number input is negative. Returns true if arg is negative, false otherwise. Will return true for -0.0, false for +0.0
  bool(double n);
  bool(float n);

simplexnoise
  Compute simplex noise at coordinates x, y and z. Coordinates which are not provided will be set to 0.
  double(double x);
  double(double x; double y);
  double(double x; double y; double z);
  double(vec3d pos);

sin
  Computes the sine of arg (measured in radians).
  double(double n);
  float(float n);

sinh
  Computes the hyperbolic sine of the input.
  double(double arg);
  float(float arg);

sort
  Returns the sorted result of the given vector.
  vec3d(vec3d v);
  vec3f(vec3f v);
  vec3i(vec3i v);
  vec4d(vec4d v);
  vec4f(vec4f v);
  vec4i(vec4i v);

sqrt
  Computes the square root of arg.
  double(double n);
  float(float n);

tan
  Computes the tangent of arg (measured in radians).
  double(double n);
  float(float n);

tanh
  Computes the hyperbolic tangent of the input.
  double(double arg);
  float(float arg);

trace
  Return the trace of a matrix, the sum of the diagonal elements.
  double(mat3d mat);
  float(mat3f mat);
  double(mat4d mat);
  float(mat4f mat);

transform
  Return the transformed vector by the provided matrix. This function is equivalent to post-multiplying the matrix, i.e. vec * mult.
  vec3d(vec3d vec; mat3d mat);
  vec3f(vec3f vec; mat3f mat);
  vec3d(vec3d vec; mat4d mat);
  vec3f(vec3f vec; mat4f mat);
  vec4d(vec4d vec; mat4d mat);
  vec4f(vec4f vec; mat4f mat);

transpose
  Returns the transpose of a matrix
  mat3d(mat3d mat);
  mat3f(mat3f mat);
  mat4d(mat4d mat);
  mat4f(mat4f mat);

truncatemod
  Truncated modulo, where the result of the division operator on (dividend / divisor) is truncated. The remainder is thus calculated with D - d * trunc(D/d). This is equal to the C/C++ % implementation. This is NOT equal to ab in AX. See floormod(), euclideanmod().
  double(double dividend; double divisor);
  float(float dividend; float divisor);
  int64(int64 dividend; int64 divisor);
  int32(int32 dividend; int32 divisor);