Jit.gl.node to jit.gl.mesh?

Marta's icon

Hello everyone! I need help regarding jit.gl node within a mesh.
I have to manage to insert a video of a sky under the points (birds) in the mesh but I'm having many difficulties and it's not working.
What am I doing wrong?

Thank you for your help!

flock_boids_tut2.maxpat
Max Patch

The part of the flocking patch is a work of Amazing Max Stuff.
https://www.youtube.com/@AmazingMaxStuff

Rob Ramirez's icon

Hi Marta. What you want to do is quite simple. You don't need nodes or crossfaders, you just need a jit.gl.layer object with the @layer attribute set to something like -1, which tells it to draw behind any other objects with a default layer of 0.

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

If there is a reason you want to capture your particles to a texture, e.g. for further processing, then you can use the jit.gl.node, but you must enable capture-to-texture (@capture 1) and you likely want to set @erase_color 0 0 0 0 to allow for easy blending with your video layer. In this case you would simply send the texture output of node to another jit.gl.layer, and it will blend automatically with the video layer.

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

Marta's icon

Thank you so much! :)