Forums > Jitter

Generate round blurred masks


Nat
April 9, 2013 | 2:56 pm

Hello all,

I would like to generate round ellipses in jitter with a blurred edge, similar to this:

http://photobatch.wdfiles.com/local–files/action-mask/mask_round_256x256.jpg

The goal would be to have several of these in my image that I could control dynamically (Size and location) the goal is to simulate follow spots on stage. What would be the best approach for this ? I did a quick hack of this with vizzie and a png but I’d like a more solid patch. What would be best between jit.mgraphics or jit.gl.sketch ?

Thanks !


April 9, 2013 | 6:08 pm

jit.gl.slab.gauss6x abstraction is your friend.
whether you use jit.mgraphics or jit.gl.sketch is entirely your preference (maybe depending on if you want to use pixels, or gl-world units):

– Pasted Max Patch, click to expand. –


Nat
April 9, 2013 | 7:11 pm

Thanks !
This seems to be exactly what I’m looking for.

If I wanted to have several of these circles in the same image and control the position and scale of those circle, I assume the best is to have several videoplanes and control the anchor and scale attributes of the videoplane object ?


April 9, 2013 | 7:17 pm

yeah, that would be my suggestion.
also check out jit.gl.multiple for this.

you have to be careful with the gauss-blur, as it can be quite expensive if not managed properly.
you may also want to lower the dims of your mgraphics matrix, and only output when changed, depending on your patch needs.



Nat
April 9, 2013 | 7:33 pm

Hmm the problem I see with this is that since the background of each white circle is black, if I have multiple videoplanes the background will obscure the other white spots..


April 9, 2013 | 9:23 pm

you must enable @blend_enable and set the @blend screen:

– Pasted Max Patch, click to expand. –


Nat
April 10, 2013 | 12:55 am

Thanks !


Viewing 7 posts - 1 through 7 (of 7 total)