Forums > Jitter

dynamic 3d text transparent to see videoplane behind (Jitter)

April 1, 2012 | 7:23 pm

Hello hello,

I have been searching high and low for a solution. I have a feeling it is super easy and I have over looked it…
I have some dynamic 3d text that falls from the top of the screen to the bottom…. however, I would like it so that the screen is white (or black) and that when the letters appear, they are transparent and I can see a hidden layer which is a still image. Something like the letters are a peep-hole to the image…
I tried alpha-blend and lumaalpha – to no avail. any guidance would be super appreciated! I have attached my patch so far…

April 2, 2012 | 1:04 pm

I see no patch.

However one way to do this would be to run the text through or and then run that captured matrix through jit.chromakey. Otherwise I’d recommend just piping the rendered text through a with the Alphablend shader.

April 2, 2012 | 4:03 pm

Hello, thanks so much for your advice! I lost hope last night and tried to abandon the idea only to start from scratch using jit.lcd… however, I’d love to use the patch w/ 3-d text. I tried to incorporate the & jit.chromakey (only on the first letter) …. if you could take a look – it would be super appreciated! thanks again for your time and knowledge.


  1. 13zz.maxpat
April 2, 2012 | 7:15 pm

here are two techniques for doing this.
the basic idea for both is to capture you to a texture using with @erase_color 0 0 0 0 (so the alpha channel is correct).

then you use the alpha channel from the text3d texture as the alpha channel for the layer you wish to reveal.

the first technique uses matrix readback from the the gl.texture.
the second technique uses to swap the planes. the gl.pix version will be more efficient.

— Pasted Max Patch, click to expand. —
April 3, 2012 | 6:34 pm

A nice patch, thanks Robert ! I just tried but as soon as get in fullscreen the bottom one (the matrix readback) disappears ? Do you have any idea why ? I’m on a Mac Pro with a ATI Radeon HD 4870 512 MB if that’s of any help.

Thanks !

April 3, 2012 | 9:07 pm

because the dimension of texture adapts to the dimension of the window size, so it’s no longer the default dim of 320×240. so when you send the output of the object (also defaults to dim of 320×240) to the right inlet of jit.pack, the dimension no longer matches the matrix in the left input (which is now whatever you window size is).

you can fix by setting @adapt 0 and explicitly setting the @dim attribute on either the jit.matrix or the
or, a much better solution, use the version that doesn’t require a matrix readback.

April 4, 2012 | 2:35 am

Thanks so much! This was really helpful and now I understand just a little more! Due to the time constraint I had – I went with another patch I worked on ;)
Thanks again!

  1. yy21.maxpat
Viewing 7 posts - 1 through 7 (of 7 total)

Forums > Jitter