howto create mask

Apr 5, 2008 at 12:31pm

howto create mask

Hello

How to create video circular mask like diaphragm in superposition with video when sound is low high?

#36744
Apr 5, 2008 at 3:38pm

You’re really asking several questions:

1. How to create a real-time mask
2. How create a geometric shape to use for the mask
3. How to get video to respond to audio

For 1., try looking at jit.lcd-layer.pat in the examples folder.

For 2., there are various options, but look into the LCD object or simply creating a JPG you use as the mask

For 3., lots of options. A quick/dirty approach is to use [meter~] chained to [zmap] then chained to whatever video parameter you want to modify.

#126310
Apr 5, 2008 at 3:59pm

hello

The idea is to create mask whitch two possibilities to enlarge or not maybe jpeg’s idea is good idea if it’s used with zoom for simulate diaphragm

#126311
Apr 5, 2008 at 5:09pm

here’s an example

max v2;
#N vpatcher 59 114 1182 672;
#P user jit.pwindow 248 336 82 62 0 0 0 0 1 0;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 249 224 48 196617 loadbang;
#P newex 249 311 176 196617 jit.matrix 1 char 320 240 @interp 1;
#P newex 249 290 137 196617 jit.matrix mask1 1 char 4 4;
#P newex 249 268 78 196617 jit.fill mask1 0;
#P message 249 248 199 196617 0 0 0 0 0 255 255 0 0 255 255 0 0 0 0 0;
#P user jit.pwindow 685 414 154 118 0 1 0 0 1 0;
#P toggle 731 191 15 0;
#P window setfont “Sans Serif” 18.;
#P message 731 211 89 196626 mode $1;
#P newex 686 378 124 196626 jit.alphablend;
#P message 122 51 138 196626 read bball.mov;
#P button 43 38 31 0;
#P newex 43 92 315 196626 jit.qt.movie 320 240 @autostart 0;
#P newex 67 130 44 196626 t l b;
#P newex 67 357 112 196626 jit.op @op *;
#P user jit.pwindow 66 396 154 118 0 1 0 0 1 0;
#P button 174 183 31 0;
#P fasten 6 0 4 0 127 85 48 85;
#P connect 5 0 4 0;
#P connect 4 0 3 0;
#P connect 3 0 2 0;
#P connect 2 0 1 0;
#P fasten 14 0 2 1 254 335 174 335;
#P fasten 3 1 0 0 106 176 179 176;
#P connect 15 0 11 0;
#P connect 11 0 12 0;
#P connect 12 0 13 0;
#P fasten 0 0 14 0 179 310 254 310;
#P connect 13 0 14 0;
#P connect 14 0 16 0;
#P fasten 3 0 7 0 72 218 691 218;
#P connect 8 0 7 0;
#P connect 7 0 10 0;
#P connect 9 0 8 0;
#P fasten 14 0 7 1 254 334 805 334;
#P pop;

#126312
Apr 5, 2008 at 5:24pm

hello

If you want mobile mask cicular it’s possible with jit fill mask?

#126313
Apr 6, 2008 at 4:48pm

if i would like image with alpha transparence like circle of two pixels transformed like 600*600pixels how must to do? And the border of mask is black.

#126314

You must be logged in to reply to this topic.