compositing matrices per pixel

barry threw's icon

Hello all,

I have several matrices, and would like to composite them per pixel.

I.E. Say I have 10 matricies, and one control matrix of values 1-10.
If the value of a control pixel is 1, it pulls that pixel from source
matrix #1.

Is there an easy way to do this via standard jitter, would the best
way be javascript, or is the easiest way to mask all of the 10 source
matrices and then composite them, or some shit I haven't thought of?

Thanks,

b

Barry Threw
Media Art and Technology

San Francisco, CA    Work: 857-544-3967
Email: bthrew@gmail.com
IM: captogreadmore (AIM)
http:/www.barrythrew.com

Andrew Benson's icon

Hi Barry,
I hacked together the following example as one way of doing it. I had
another thing worked out using a series of jit.peek~ and jit.poke~
referencing a 3D matrix, but I figured this would make more sense.

Welcome to the vortex...

Best,
Andrew B.

Andrew Benson's icon

Oh crap, forgot to attach...

Max Patch
Copy patch and select New From Clipboard in Max.


Andrew Benson's icon

ah heck, here's the really geeky version too...

Max Patch
Copy patch and select New From Clipboard in Max.

nesa's icon

I used to do it this way, but then jkc showed me the light: glue
matrices in one wide matrix and use jit.repos.
I have an old example of this, but won't be able to post it until
later tonight.

Max Patch
Copy patch and select New From Clipboard in Max.

>

nesa's icon

And here's the example, the main stuff is in 'parts' subpatch.
The 'control' matrix comes into right inlet of jit.repos. The
'control' matrix is created in main patch, by simplifying input from
qt.movie.
Each color (red,green,blue,yellow) represents one layer. Instead of
color matrices, 4 jit.qt.movies can be used as layers, creating a
sort of collage...

-nesa

Max Patch
Copy patch and select New From Clipboard in Max.