js jit.gl.sketch to external texture

SuperSara's icon

Hello all,

I am creating a video patch that will begin as static, and slowly evolve into film grain layered over a video (going for a black and white film effect over live feed, with variable density on the amount of 'dust')

I have created a my dust/scratches patch using jit.gl.sketch within a javascript file. It works fine as a standalone, as it goes straight from the js file to the jit.window.

However, I would like to use this as a texture, and mix it in with few other patches, also using gl objects.

How would I convert this into a texture? I tried creating an external jit.gl.sketch object of the same name, and followed instructions on using jit.gl.node from another forum, but no go.

I have attached the patch/code. Any help troubleshooting this would be appreciated.

Thanks!

Sara

static.zip
zip
Tobias Rosenberger's icon
Max Patch
Copy patch and select New From Clipboard in Max.

your render context needs to be higher than your jit.gl.sketch:

SuperSara's icon

Thanks for the quick reply! Whatever is attached to the right inlet of the gl.pix object didn't load properly... it says (jit.playlist) over a box of slanted lines, and tells me it is a juibogus when I right-click on it.

I tried to re-create the patch with fresh objects, and it didn't work, but when I copy and paste yours and fix the names to match the bigger patch, using the same js file, it works like a charm.

I'm happy that it's working, but i'm wondering what that object was, and what operations it may have performed on the gl.pix?

Rob Ramirez's icon

jit.playlist is a max 7 object.