So let's revise. Do you still remember what the plane count is and what dim means? It's probably a bit strange, but in Max, we talk about resolution as the dimensions of the matrix, and color channels as planes. Since a jit.matrix
object is reserved memory space, we also have to tell Max what the format should be. So now, let's generate some matrices with different formats, dimensions, and plane counts to get more comfortable with the whole system, as shown in the following screenshot:
In the previous screenshot, you can see how we first make a matrix with 4 planes, ARGB (Alpha, Red, Green, and Blue), in the character format, with a resolution of 1*1 cells or pixels. We use the [swatch]
object to set the values of our single pixel and then convert the matrix to a 4-plane, float 32, 3 x 3 pixel matrix. After that, we use [jit.unpack]
to access the individual planes, look at the values via [jit.cellblock]
, and use [jit.spill]
to get a list of values from...