4.2 Data types

There are different types of animation channels within Animator. Also some animation channels have a predefined value range. The numeric data which is stored in these channels has several different types.


Boolean

A boolean channel only stores two values, true or false (1 or 0), for each frame. An example of this is the visibility channel, which can only be on or off - this is a boolean channel. For Xpressionist it does not matter if a channel is a boolean or not since Xpressionist will do all internal calculation using double precision floating point values. If used in boolean operations floating point values will be interpreted like this: everything floating point value above 0.5 will be interpreted as 1, every floating point value below 0.5 will be interpreted 0.

Double precision floating point (double)

A single floating point channel stores one floating point value for each frame. Pitch_X, the X rotation channel of a group, is an example of a single floatpoint channel.

Vector (vec)

A vector channel stores three floating point values each frame. Position, consisting of an X, Y and Z value, is an example of a vector channel. Also color is a vector channel since it consists out of three values for R, G and B
or H, S and V. Read more about vectors here.

Vector with four components (vec4)

Many colors in Animator have four values since they also have a value for the alpha channel. So they are vector channels with four components R, G, B and A. Read more about vectors here.

String (string)

A string type contains a row of readable characters. The only operation defined for strings is addition. Adding two strings means concatenating them. Adding a string and a float will convert the float to a string and do the string-addition. Together with the $-operator you can create very flexible expressions.

Data types also have to be defined for compilable expressions (see also three rules for C++ compatible expression code):


8bit values in color vectors

Values in color channels are usually integer values between 0 and 255 (8bit). Xpressionist does not need an extra data type for 8bit channels. Floating point values above 0.5 will be rounded up to the next higher integer and floating point values below 0.5 will be truncated to the next lower integer. Values beyond 255 will be written as 255 to an 8bit channel and values below 0 will be written as 0 to a 8bit channel.

 

Xpressionist 3.5