Convert a matrix into 3D points


    Jun 16 2014 | 9:58 pm
    I am just starting out with Max Jitter. I am trying to convert a 1-plane matrix (jit.matrix) with gray-scale values into a point-cloud. I want to use the cell numbers as x and y values for drawing points, and the cell's value (0-255) as the z for the points in the cloud. I would like to avoid using any plugins and third party apps, because I want to learn to do this purely with Max Jitter. Any ideas?

    • Jun 17 2014 | 12:22 am
      look at jit.gl.multiple - it's perfect for this type of stuff. Essentially it'll let you create multiple objects, with variables based on matrix inputs.
      Open up its helpfile. You'll see a subpatcher that's called "p InitialGLParams". This has four matrix outputs going into jit.gl.multiple. See it?
      jit.gl.multiple has @glparams for position, rotatexyx, scale and texture. you want to play with one with a single input for "position"
    • Jun 17 2014 | 1:37 pm
      This patch does exactly that, in 2 ways. Is meant for making the kinect depth map into a pointcloud. You should be able to extract what you need from it.
    • Jun 18 2014 | 4:50 pm
      here's a very basic example of turning the output of bfg into a point-cloud using gl.mesh.
      the trick is to combine the output of jit.expr, which simply gives us our x and y values going from -1 to 1 (snorm) with the output of bfg, which gives us our z displacement.
    • Jun 18 2014 | 6:22 pm
      Thanks Rob Ramirez, that was precisely what I was looking for!