Forums > Jitter

Convert a matrix into 3D points

Jun 16 2014 | 2: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 16 2014 | 5:22 pm

look at – 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 See it? has @glparams for position, rotatexyx, scale and texture. you want to play with one with a single input for "position"

Jun 17 2014 | 6:37 am

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 | 9:50 am

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.

-- Pasted Max Patch, click to expand. --

Jun 18 2014 | 11:22 am

Thanks Rob Ramirez, that was precisely what I was looking for!

Viewing 5 posts - 1 through 5 (of 5 total)

Forums > Jitter