Create a pixel/CRT effect?

Rodrigo's icon

I'm working on creating a UI object for an Erae Touch as I'm finding it much easier to create/slice/move what I want to draw to the LED matrix the device has in jitter and then downsampling to the pixel resolution (42 x 24) at the final step.

This works great for sending to the device (early example/test of what I'm working on) but I want something better for the UI I've set up.

I'm essentially just drawing it to a downsampled jit.pwindow like so:

But I'd like to somewhat mirror what you see on the device itself, which I crudely tried doing by creating a grid/mask as a vector image and then summing them, but it doesn't really line up right (or look good).

I had a look through the forum and examples and didn't see anything like this, but is it possible (without great difficulty...) to create a similar effect where each "pixel" of the 42x24 matrix becomes a masked off circle to create the visual effect of an LED matrix?

Pedro Santos's icon

Hi, Rodrigo. My suggestion is jit gl. multiple. Does this help?

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

Bill 2's icon

It helps me, Pedro! What a fun patch to play with. :-)

Rodrigo's icon

That is super cool @Pedro!

I've tweaked/adapted it some for my purposes:

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

The @scale settings required don't seem to make much sense to me, but this is perfect!

Rodrigo's icon

Oh, I just realized that I was adding a pointer thing using jit.lcd, which I can't (as far as I can tell) implement when working in this method.

I know there's jit.gl.handle, but I don't actually want to change or rotate the world at all, but rather draw a white circle/puck to indicate where my mouse is.

edit:
Nevermind, another jit.gl.gridshape and some scaling does the trick:

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

Matteo Marson's icon

Hey Rodrigo,

if I understood correctly what you need, you could also avoid 3d objects entirely and go with jit.gl.pix/jit.gen

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

Rodrigo's icon

That's a real tight/elegant solution