XML Feeds

.

[jitter] motion blur angle

Brecht Brecht at autofasurer.net
Sat Feb 16 13:07:50 MST 2008


(apologies for possible cross-posting, mail didn't seem to come through)

Hiya!

The patch below calculates distance between previous and new position of an object, and simulates motion blur accordingly. 
Now, as you will see, this doesn't work well in all directions. Is there perhaps some smart method to correct this? 

grtz. 
Brecht. 

max v2;
#N vpatcher 546 139 1320 758;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#N vpatcher 700 449 1300 849;
#P outlet 29 135 15 0;
#P window setfont "Sans Serif" 9.;
#P newex 29 115 61 196617 pak pos 0 0;
#P newex 79 94 37 196617 + 256;
#P newex 31 72 58 196617 unpack 0 0;
#P inlet 31 35 15 0;
#P newex 31 52 52 196617 route pos;
#P connect 4 0 5 0;
#P connect 1 0 0 0;
#P connect 0 0 2 0;
#P fasten 2 0 4 1 36 102 59 102;
#P connect 2 1 3 0;
#P connect 3 0 4 2;
#P pop;
#P newobj 189 383 53 196617 p position;
#P newex 121 342 86 196617 loadmess getpos;
#P newex 464 77 60 196617 loadmess 0;
#P message 1 150 80 196617 usetexture blur;
#N vpreset 1;
#X append 1 1 26 166 464 flonum float 4. \; 24 120 398 flonum float 0.3 \; 23 120 362 flonum float 0.3 \;;
#P preset 464 98 17 17;
#P newex 49 188 41 196617 s pulse;
#P newex 262 98 41 196617 r pulse;
#N vpatcher 536 242 805 396;
#P outlet 121 112 15 0;
#P outlet 9 112 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 121 90 110 196617 expr ($i1-100.)/100.;
#P newex 74 67 64 196617 random 200;
#P newex 9 90 110 196617 expr ($i1-100.)/100.;
#P window linecount 0;
#P newex 9 67 64 196617 random 200;
#P newex 9 46 52 196617 select 32;
#P newex 9 25 40 196617 key;
#P connect 0 0 1 0;
#P connect 1 0 2 0;
#P connect 2 0 3 0;
#P connect 3 0 6 0;
#P fasten 1 0 4 0 14 65 79 65;
#P fasten 4 0 5 0 79 87 126 87;
#P connect 5 0 7 0;
#P pop;
#P newobj 274 117 66 196617 p randompos;
#P newex 212 210 49 196617 pak 0. 0.;
#N vpatcher 416 284 570 502;
#N comlet motion blur amount;
#P inlet 88 128 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 0;
#P newex 24 105 55 196617 slide 5. 5.;
#P newex 24 149 93 196617 scale 0. 0.05 0. 2.;
#P outlet 24 172 15 0;
#P window linecount 1;
#P newex 23 85 27 196617 - 0.;
#P newex 4 40 29 196617 t b f;
#P newex 40 64 31 196617 float;
#P inlet 4 22 15 0;
#P newex 24 128 37 196617 abs 0.;
#P connect 1 0 3 0;
#P connect 3 1 4 0;
#P connect 4 0 7 0;
#P connect 7 0 0 0;
#P connect 0 0 6 0;
#P connect 6 0 5 0;
#P fasten 3 0 2 0 9 60 45 60;
#P connect 2 0 4 1;
#P fasten 3 1 2 1 28 60 66 60;
#P connect 8 0 6 4;
#P pop;
#P newobj 419 187 55 196617 p distance;
#N vpatcher 20 74 620 474;
#N comlet resistance;
#P inlet 133 207 15 0;
#N comlet speed;
#P inlet 116 138 15 0;
#N comlet goal;
#P inlet 79 99 15 0;
#N comlet output;
#P outlet 23 99 15 0;
#N comlet initial value / bang -> next step;
#P inlet 21 29 15 0;
#P window setfont "Sans Serif" 9.;
#P flonum 135 179 31 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 125 249 31 196617 float;
#P newex 79 228 41 196617 * 0.93;
#P newex 79 201 27 196617 + 0.;
#P flonum 79 179 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 79 159 41 196617 * 0.05;
#P flonum 79 138 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P button 125 99 15 0;
#P newex 79 119 27 196617 - 0.;
#P button 24 119 15 0;
#P flonum 39 99 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 15 160 31 196617 \$1 1;
#P flonum 15 74 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 15 140 34 196617 + 0.;
#P newex 21 50 43 196617 bline 0.;
#P fasten 0 0 2 0 26 71 20 71;
#P connect 2 0 1 0;
#P fasten 5 0 1 0 29 136 20 136;
#P connect 1 0 3 0;
#P fasten 3 0 0 0 20 177 11 177 11 47 26 47;
#P connect 15 0 0 0;
#P fasten 2 0 16 0 20 93 28 93;
#P fasten 4 0 5 0 44 116 29 116;
#P fasten 12 0 4 0 84 247 76 247 76 96 44 96;
#P connect 4 0 1 1;
#P fasten 7 0 6 0 130 116 84 116;
#P connect 17 0 6 0;
#P connect 6 0 8 0;
#P connect 8 0 9 0;
#P connect 9 0 10 0;
#P connect 10 0 11 0;
#P connect 11 0 12 0;
#P fasten 2 0 6 1 20 93 101 93;
#P fasten 14 0 11 1 140 198 101 198;
#P fasten 18 0 9 1 121 156 115 156;
#P fasten 19 0 12 1 138 225 115 225;
#P fasten 2 0 7 0 20 91 130 91;
#P connect 7 0 13 0;
#P fasten 13 0 14 0 130 268 168 268 168 175 140 175;
#P fasten 12 0 13 1 84 247 151 247;
#P pop;
#P newobj 318 141 48 196617 p bounce;
#P newex 318 161 40 196617 t b f f;
#P newex 271 208 102 196617 loadmess sphere 0.1;
#P flonum 464 166 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 65 322 197 196617 jit.gl.slab source @file cf.gaussian.2p.jxs;
#P flonum 398 120 35 9 0.01 0.99 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 362 120 35 9 0.01 0.99 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#N vpatcher 20 74 620 474;
#N comlet resistance;
#P inlet 133 207 15 0;
#N comlet speed;
#P inlet 116 138 15 0;
#N comlet goal;
#P inlet 79 99 15 0;
#N comlet output;
#P outlet 23 99 15 0;
#N comlet initial value / bang -> next step;
#P inlet 21 29 15 0;
#P window setfont "Sans Serif" 9.;
#P flonum 135 179 31 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 125 249 31 196617 float;
#P newex 79 228 41 196617 * 0.93;
#P newex 79 201 27 196617 + 0.;
#P flonum 79 179 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 79 159 41 196617 * 0.05;
#P flonum 79 138 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P button 125 99 15 0;
#P newex 79 119 27 196617 - 0.;
#P button 24 119 15 0;
#P flonum 39 99 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 15 160 31 196617 \$1 1;
#P flonum 15 74 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 15 140 34 196617 + 0.;
#P newex 21 50 43 196617 bline 0.;
#P fasten 0 0 2 0 26 71 20 71;
#P connect 2 0 1 0;
#P fasten 5 0 1 0 29 136 20 136;
#P connect 1 0 3 0;
#P connect 15 0 0 0;
#P fasten 3 0 0 0 20 177 11 177 11 47 26 47;
#P fasten 2 0 16 0 20 93 28 93;
#P fasten 4 0 5 0 44 116 29 116;
#P fasten 12 0 4 0 84 247 76 247 76 96 44 96;
#P connect 4 0 1 1;
#P fasten 7 0 6 0 130 116 84 116;
#P connect 17 0 6 0;
#P connect 6 0 8 0;
#P connect 8 0 9 0;
#P connect 9 0 10 0;
#P connect 10 0 11 0;
#P connect 11 0 12 0;
#P fasten 2 0 6 1 20 93 101 93;
#P fasten 14 0 11 1 140 198 101 198;
#P fasten 18 0 9 1 121 156 115 156;
#P fasten 19 0 12 1 138 225 115 225;
#P fasten 2 0 7 0 20 91 130 91;
#P connect 7 0 13 0;
#P fasten 13 0 14 0 130 268 168 268 168 175 140 175;
#P fasten 12 0 13 1 84 247 151 247;
#P pop;
#P newobj 262 141 48 196617 p bounce;
#P newex 65 298 197 196617 jit.gl.slab source @file cf.gaussian.2p.jxs;
#P message 54 253 149 196617 sendshader param width \$1 \$2;
#P newex 65 274 197 196617 jit.gl.slab source @file cf.gaussian.2p.jxs;
#N vpatcher 451 295 605 513;
#N comlet motion blur amount;
#P inlet 88 128 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 0;
#P newex 24 105 55 196617 slide 5. 5.;
#P newex 24 149 93 196617 scale 0. 0.05 0. 2.;
#P outlet 24 172 15 0;
#P window linecount 1;
#P newex 23 85 27 196617 - 0.;
#P newex 4 40 29 196617 t b f;
#P newex 40 64 31 196617 float;
#P inlet 4 22 15 0;
#P newex 24 128 37 196617 abs 0.;
#P connect 1 0 3 0;
#P connect 3 1 4 0;
#P connect 4 0 7 0;
#P connect 7 0 0 0;
#P connect 0 0 6 0;
#P connect 6 0 5 0;
#P fasten 3 0 2 0 9 60 45 60;
#P connect 2 0 4 1;
#P fasten 3 1 2 1 28 60 66 60;
#P connect 8 0 6 4;
#P pop;
#P newobj 363 187 55 196617 p distance;
#P newex 262 161 40 196617 t b f f;
#P newex 8 168 45 196617 jit.qball;
#P newex 65 404 145 196617 jit.window source @floating 1;
#P toggle 84 111 15 0;
#P newex 8 187 40 196617 t b b b;
#P newex 84 130 52 196617 metro 20;
#P newex 8 230 199 196617 jit.gl.render source @erase_color 0 0 0 1;
#P newex 263 229 161 196617 jit.gl.sketch source @automatic 1;
#P newex 65 363 134 196617 jit.window dest @floating 1;
#P newex 65 342 55 196617 jit.matrix;
#P newex 204 252 157 196617 jit.gl.texture source @name blur;
#P message 17 211 91 196617 to_texture \, erase;
#P newex 263 187 99 196617 pak position 0. 0. 0.;
#P comment 501 166 61 196617 blur amount;
#P comment 361 104 72 196617 springy thingy;
#P comment 1 135 23 196617 $2;
#P comment 101 111 20 196617 $1;
#P comment 171 119 95 196617 space: new position;
#P fasten 12 0 16 0 89 166 13 166;
#P connect 16 0 13 0;
#P fasten 6 0 11 0 22 228 13 228;
#P connect 13 0 11 0;
#P fasten 36 0 11 0 6 227 13 227;
#P fasten 13 2 6 0 43 208 22 208;
#P fasten 13 2 34 0 43 208 92 208 92 186 54 186;
#P fasten 31 0 20 0 217 249 59 249;
#P fasten 7 0 19 0 209 271 70 271;
#P fasten 20 0 19 0 59 271 70 271;
#P connect 19 0 21 0;
#P fasten 20 0 21 0 59 295 70 295;
#P connect 21 0 25 0;
#P fasten 20 0 25 0 59 319 70 319;
#P connect 25 0 8 0;
#P fasten 38 0 9 0 126 361 70 361;
#P connect 8 0 9 0;
#P fasten 39 0 15 0 194 402 70 402;
#P connect 14 0 12 0;
#P connect 9 1 39 0;
#P fasten 13 1 7 0 28 208 209 208;
#P fasten 18 0 31 0 368 206 217 206;
#P fasten 30 0 31 1 424 206 256 206;
#P connect 33 0 22 0;
#P connect 22 0 17 0;
#P fasten 27 0 10 0 276 227 268 227;
#P connect 5 0 10 0;
#P connect 32 0 22 1;
#P fasten 23 0 22 2 367 138 291 138;
#P fasten 17 1 5 1 282 182 297 182;
#P fasten 24 0 22 3 403 138 303 138;
#P fasten 33 0 29 0 267 138 323 138;
#P connect 29 0 28 0;
#P fasten 28 1 5 2 338 182 326 182;
#P connect 32 1 29 1;
#P fasten 23 0 29 2 367 138 347 138;
#P fasten 24 0 29 3 403 138 359 138;
#P fasten 35 0 23 0 469 118 367 118;
#P fasten 17 2 18 0 297 182 368 182;
#P fasten 35 0 24 0 469 118 403 118;
#P fasten 26 0 18 1 469 184 413 184;
#P fasten 28 2 30 0 353 182 424 182;
#P connect 37 0 35 0;
#P connect 35 0 26 0;
#P connect 26 0 30 1;
#P pop;



More information about the jitter mailing list