max v2; #N vpatcher 239 45 937 667; #P origin 1 0; #P window setfont "Sans Serif" 9.; #P comment 3 30 159 196617 grab video from firewire camera; #P comment 119 567 181 196617 ¥press ESC to go fullscreen; #N vpatcher 407 296 1395 1025; #P window setfont "Sans Serif" 9.; #P flonum 757 440 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P flonum 720 440 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P window setfont "Sans Serif" 18.; #P window linecount 0; #P comment 55 55 145 196626 jit.gl.imageunit; #P window setfont "Sans Serif" 9.; #P comment 55 80 185 196617 Process video with Apple Image Units; #P user panel 50 50 400 50; #X brgb 255 255 255; #X frgb 0 0 0; #X border 0; #X rounded 0; #X shadow 0; #X done; #P newex 80 512 55 196617 delay 100; #P newex 181 530 74 196617 t getparamlist; #P flonum 321 271 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P message 321 293 78 196617 param Time \$1; #P window linecount 2; #P message 622 192 107 196617 getparamslidermin 0 \, getparamslidermax 0; #P window linecount 1; #P message 542 238 96 196617 getparamidentity 0; #P message 443 238 92 196617 getparamdefault 0; #P window linecount 2; #P message 535 192 81 196617 getparammin 0 \, getparammax 0; #P window linecount 1; #P message 443 195 81 196617 getparamtype 2; #P toggle 671 226 15 0; #P message 671 248 72 196617 paramsafe \$1; #P flonum 683 440 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P flonum 646 440 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P flonum 608 440 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P flonum 570 440 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P button 528 460 15 0; #P newex 528 482 158 196617 pack param 0 0. 0. 0. 0. 0. 0.; #P user ubumenu 549 419 166 196617 0 1 1 0; #X add Radius; #X add Intensity; #X prefix_set 0 0 0; #X pattrmode 1; #P newex 352 435 25 196617 iter; #P newex 352 457 75 196617 prepend append; #P newex 352 412 92 196617 t l clear; #P newex 206 436 25 196617 iter; #P newex 381 528 90 196617 prepend getparam; #P user ubumenu 381 506 138 196617 0 1 1 0; #X add Radius; #X add Intensity; #X prefix_set 0 0 0; #X pattrmode 1; #P newex 272 529 92 196617 prepend loadeffect; #P newex 206 458 75 196617 prepend append; #P user ubumenu 206 495 142 196617 0 1 1 0; #X add Addition; #X add "Affine Clamp"; #X add "Affine Tile"; #X add "Affine Transform"; #X add "Blend With Mask"; #X add Bloom; #X add "Bump Distortion"; #X add Checkerboard; #X add "Circle Splash Distortion"; #X add "Circular Screen"; #X add "Circular Wrap Distortion"; #X add "CMYK Halftone"; #X add "Color Blend Mode"; #X add "Color Burn Blend Mode"; #X add "Color Controls"; #X add "Color Cube"; #X add "Color Dodge Blend Mode"; #X add "Color Invert"; #X add "Color Map"; #X add "Color Matrix"; #X add "Color Monochrome"; #X add "Color Posterize"; #X add "Constant Color"; #X add "Copy Machine"; #X add Crop; #X add Crystallize; #X add "Darken Blend Mode"; #X add "Difference Blend Mode"; #X add "Disintegrate with Mask"; #X add "Displacement Distortion"; #X add Dissolve; #X add "Dot Screen"; #X add Edges; #X add "Edge Work"; #X add "Exclusion Blend Mode"; #X add "Exposure Adjust"; #X add "False Color"; #X add Flash; #X add "Gamma Adjust"; #X add "Gaussian Blur"; #X add "Gaussian Gradient"; #X add "Glass Distortion"; #X add "Glass Lozenge"; #X add Gloom; #X add "Hard Light Blend Mode"; #X add "Hatched Screen"; #X add "Height Field From Mask"; #X add "Hole Distortion"; #X add "Hue Adjust"; #X add "Hue Blend Mode"; #X add Kaleidoscope; #X add "Lanczos Scale Transform"; #X add "Lenticular Halo"; #X add "Lighten Blend Mode"; #X add "Linear Gradient"; #X add "Line Screen"; #X add "Luminosity Blend Mode"; #X add "Mask To Alpha"; #X add Maximum; #X add Median; #X add Minimum; #X add Mod; #X add "Motion Blur"; #X add "Multiply Blend Mode"; #X add Multiply; #X add "Noise Reduction"; #X add "Op Tile"; #X add "Overlay Blend Mode"; #X add "Page Curl"; #X add "Parallelogram Tile"; #X add "Perspective Tile"; #X add "Perspective Transform"; #X add "Pinch Distortion"; #X add Pixellate; #X add Pointillize; #X add "Radial Gradient"; #X add "Random Generator"; #X add Ripple; #X add "Saturation Blend Mode"; #X add "Screen Blend Mode"; #X add "Sepia Tone"; #X add "Shaded Material"; #X add "Sharpen Luminance"; #X add "Soft Light Blend Mode"; #X add "Source Atop"; #X add "Source In"; #X add "Source Out"; #X add "Source Over"; #X add "Spot Light"; #X add "Star Shine"; #X add Stripes; #X add Sunbeams; #X add Swipe; #X add "Torus Lens Distortion"; #X add "Triangle Tile"; #X add "Twirl Distortion"; #X add "Unsharp Mask"; #X add "Vortex Distortion"; #X add "White Point Adjust"; #X add "Zoom Blur"; #X prefix_set 0 0 0; #X pattrmode 1; #P newex 206 413 92 196617 t l clear; #P newex 206 390 303 196617 route effectlist paramlist; #P newex 464 417 31 196617 print; #P message 185 203 66 196617 geteffectlist; #P message 327 203 61 196617 getparam 0; #P message 256 203 67 196617 getparamlist; #P flonum 255 271 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P flonum 187 271 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P message 255 293 62 196617 param 1 \$1; #P message 187 293 62 196617 param 0 \$1; #P newex 163 345 274 196617 jit.gl.imageunit render_grid @colormode uyvy @verbose 1; #P comment 183 320 241 196617 parameters can be specified by name or number; #P inlet 163 325 15 0; #P inlet 387 325 15 0; #P outlet 163 367 15 0; #P connect 15 0 41 0; #P fasten 25 0 4 0 533 551 151 551 151 336 168 336; #P fasten 17 0 4 0 277 551 151 551 151 336 168 336; #P fasten 40 0 4 0 186 551 151 551 151 336 168 336; #P fasten 35 0 4 0 448 260 168 260; #P fasten 36 0 4 0 547 260 168 260; #P fasten 34 0 4 0 540 231 168 231; #P fasten 33 0 4 0 448 231 168 231; #P fasten 31 0 4 0 676 314 168 314; #P fasten 19 0 4 0 386 551 151 551 151 336 168 336; #P fasten 5 0 4 0 192 314 168 314; #P fasten 6 0 4 0 260 314 168 314; #P fasten 9 0 4 0 261 231 168 231; #P fasten 10 0 4 0 332 231 168 231; #P fasten 11 0 4 0 190 231 168 231; #P fasten 37 0 4 0 627 231 168 231; #P fasten 38 0 4 0 326 314 168 314; #P connect 2 0 4 0; #P connect 4 0 0 0; #P connect 41 0 40 0; #P connect 7 0 5 0; #P fasten 4 1 13 0 432 372 211 372; #P connect 13 0 14 0; #P connect 14 0 20 0; #P connect 20 0 16 0; #P connect 16 0 15 0; #P fasten 14 1 15 0 293 481 211 481; #P connect 8 0 6 0; #P fasten 15 1 17 0 277 525 277 525; #P connect 39 0 38 0; #P connect 13 1 21 0; #P connect 21 0 23 0; #P connect 23 0 22 0; #P fasten 21 1 18 0 439 480 386 480; #P fasten 22 0 18 0 357 495 386 495; #P connect 18 0 19 0; #P connect 1 0 4 1; #P fasten 13 2 12 0 503 412 469 412; #P fasten 46 0 26 0 762 457 533 457; #P fasten 45 0 26 0 725 457 533 457; #P fasten 29 0 26 0 651 457 533 457; #P fasten 27 0 26 0 575 457 533 457; #P fasten 28 0 26 0 613 457 533 457; #P fasten 30 0 26 0 688 457 533 457; #P connect 26 0 25 0; #P fasten 22 0 24 0 357 486 523 486 523 404 554 404; #P fasten 21 1 24 0 439 454 523 454 523 404 554 404; #P connect 24 0 25 1; #P fasten 27 0 25 2 575 468 575 468; #P fasten 28 0 25 3 613 468 596 468; #P fasten 29 0 25 4 651 470 617 470; #P fasten 30 0 25 5 688 473 638 473; #P fasten 45 0 25 6 725 476 659 476; #P connect 32 0 31 0; #P fasten 46 0 25 7 762 479 680 479; #P pop; #P newobj 599 520 61 196617 p imageunit; #P newex 113 508 78 196617 jit.gl.imageunit; #N vpreset 1; #X append 1 2 17 28 172 toggle int 1 \; 26 230 305 flonum float 0.42 \; 31 30 538 number int 64 \; 33 464 232 flonum float 45. \; 37 464 180 toggle int 0 \; 55 463 305 toggle int; #X append 1 2 0 \; 56 374 296 ubumenu int 2 \; 61 85 333 flonum float 0.2 \; 64 85 425 flonum float 0.45 \; 65 85 482 flonum float 1. \; 67 85 378 flonum float 0.65 \; 69 85 291; #X append 1 2 flonum float -0.2 \;; #P preset 367 29 47 27; #P message 246 111 40 196617 mode 1; #P flonum 291 85 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P message 291 110 39 196617 lum \$1; #P flonum 378 85 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P message 378 110 42 196617 fade \$1; #P flonum 482 85 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P flonum 425 85 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P message 482 110 58 196617 maxkey \$1; #P message 425 110 55 196617 minkey \$1; #P flonum 333 85 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P message 333 110 35 196617 tol \$1; #P newex 172 114 61 196617 jit.lumakey; #P message 456 484 121 196617 usetexture movietexture; #P message 456 458 65 196617 usetexture 0; #P user ubumenu 296 374 84 196617 0 1 1 0; #X add points; #X add lines; #X add line_strip; #X add line_loop; #X add triangles; #X add tri_strip; #X add tri_fan; #X add quads; #X add quad_strip; #X add polygon; #X add tri_grid; #X add quad_grid; #X prefix_set 0 0 0; #P toggle 305 463 15 0; #P message 305 482 85 196617 poly_mode \$1 \$1; #P window linecount 4; #P comment 4 63 159 196617 this patch shows creating a grid geometry \, and texturing and displacing the geometry with a movie.; #P comment 7 429 154 196617 the window is made in here. drag in window to rotate the rendered geometry. hit 'esc' to toggle fullscreen mode.; #P window linecount 1; #P comment 295 358 100 196617 other draw prims; #P comment 230 165 125 196617 send texture to jit_render; #P hidden message 271 464 24 196617 45.; #P newex 172 276 50 196617 t b; #P comment 4 116 164 196617 scale movie and map ARGBto RRGB; #P window linecount 2; #P comment 6 303 154 196617 send to plane 5 (z) of geometry matrix; #P window linecount 1; #P comment 6 254 154 196617 multiply by a scalar; #P comment 7 211 154 196617 convert to float32; #P comment 6 184 154 196617 calculate sum of rgb components; #P hidden message 423 230 29 196617 0.25; #P comment 343 231 100 196617 z displace scale; #P hidden message 576 30 20 196617 64; #P comment 445 30 100 196617 set geometry dims; #P hidden newex 624 71 50 196617 loadbang; #P toggle 180 464 15 0; #P message 180 483 50 196617 interp \$1; #N vpatcher 146 454 622 806; #P toggle 352 214 15 0; #P window setfont "Sans Serif" 9.; #P window linecount 1; #P message 352 233 75 196617 auto_rotate \$1; #P message 315 233 32 196617 reset; #P flonum 261 213 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P message 261 233 51 196617 radius \$1; #P flonum 194 213 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P message 194 233 60 196617 tracking \$1; #P newex 10 254 355 196617 jit.gl.handle render_grid @inherit_transform 1 @depth_enable 1 @tracking 8; #P outlet 10 284 15 0; #P newex 103 56 50 196617 select 27; #P newex 103 34 40 196617 key; #P newex 103 146 91 196617 prepend fullscreen; #P window linecount 2; #P newex 103 167 199 196617 jit.window render_grid @rect 10 50 200 200 @depthbuffer 1 @fsmenubar 0; #P comment 10 218 178 196617 inherit_transform is important here \, since we are controlling jit.gl.render; #P toggle 103 81 15 0; #P fasten 13 0 7 0 357 251 15 251; #P fasten 10 0 7 0 266 251 15 251; #P fasten 8 0 7 0 199 248 15 248; #P fasten 12 0 7 0 320 251 15 251; #P connect 7 0 6 0; #P connect 4 0 5 0; #P connect 5 0 0 0; #P connect 0 0 3 0; #P connect 3 0 2 0; #P connect 9 0 8 0; #P connect 11 0 10 0; #P connect 14 0 13 0; #P pop; #P newobj 7 483 115 196617 p window-mouse-rotate; #P message 232 483 70 196617 lens_angle \$1; #P flonum 232 464 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P newex 538 48 36 196617 t b i; #P number 538 30 35 9 0 0 64 3 0 0 0 221 221 221 222 222 222 0 0 0; #P message 564 82 60 196617 dim \$1 \$1; #P newex 172 182 275 196617 jit.scalebias 4 char 64 64 @mode 1 @scale 0.33; #P message 589 457 85 196617 planemap 2 3 2 4; #P user jit.pwindow 600 482 18 18 0 1 0 0 1 0; #P flonum 305 230 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P newex 172 252 275 196617 jit.op 1 float32 64 64 @op *; #P newex 362 163 144 196617 prepend texture movietexture; #P newex 172 305 275 196617 jit.pack 5 float32 64 64 @out_name geom; #P newex 172 209 275 196617 jit.matrix 1 float32 64 64 @thru 1 @interp 0; #P newex 173 138 275 196617 jit.matrix 4 char 64 64 @planemap 1 1 2 3 @interp 1; #P message 235 49 30 196617 open; #P message 305 49 27 196617 stop; #P message 271 49 33 196617 close; #P toggle 172 28 15 0; #P newex 172 48 55 196617 metro 20; #P newex 172 74 98 196617 jit.qt.grab 160 120; #P message 180 375 44 196617 tri_grid; #P newex 391 335 55 196617 t b b erase; #P window linecount 3; #P message 180 399 244 196617 lookat 0 0 0 \, camera 0. -0.5 1.5 \, color 1. 1. 1. 0.5 \, erase_color 0. 0. 0. 1. \, depth_enable 1 \, texture movietexture 64 64 \, usetexture movietexture; #P window linecount 1; #P message 589 417 85 196617 planemap 0 1 2 0; #P user jit.pwindow 588 436 18 18 0 1 0 0 1 0; #P window linecount 6; #P message 575 124 98 196617 plane 0 \, -0.5 -0.5 0.5 0.5 \, plane 1 \, -0.5 0.5 -0.5 0.5 \, plane 2 \, 0. 0. 0. 0. \, plane 3 \, 0. 1. 0. 1. \, plane 4 \, 0. 0. 1. 1.; #P window linecount 2; #P newex 575 232 98 196617 jit.matrix small 5 float32 2 2; #P window linecount 1; #P newex 575 208 98 196617 jit.fill small; #P window linecount 3; #P newex 575 368 99 196617 jit.matrix geom 5 float32 64 64 @interp 1; #P window linecount 1; #P newex 449 539 120 196617 jit.gl.render render_grid; #P window linecount 4; #P comment 479 368 97 196617 order of planes for geometry matrix: x \, y \, z \, s \, t \, a \, r \, g \, b \, nx \, ny \, nz; #P window linecount 1; #P comment 189 29 181 196617 ¥ open grab and click the preset box->; #P window linecount 7; #P comment 594 273 79 196617 a small 2x2x5 matrix is created "by hand" \, then interpolated to create geometry.; #P window linecount 1; #P comment 180 358 100 196617 default draw prim; #P window setfont "Sans Serif" 18.; #P comment 119 541 199 196626 Rutt Etra Prototype; #P connect 17 0 16 0; #P fasten 16 0 15 0 177 75 177 75; #P fasten 18 0 15 0 276 75 177 75; #P fasten 19 0 15 0 310 75 177 75; #P fasten 20 0 15 0 240 75 177 75; #P hidden fasten 63 0 59 0 487 131 238 131 238 109 177 109; #P hidden fasten 62 0 59 0 430 131 237 131 237 108 177 108; #P hidden fasten 66 0 59 0 383 131 236 131 236 109 177 109; #P hidden fasten 60 0 59 0 338 131 237 131 237 110 177 110; #P hidden fasten 68 0 59 0 296 130 236 130 236 109 177 109; #P hidden connect 70 0 59 0; #P connect 15 0 59 0; #P fasten 30 0 29 0 569 134 177 134; #P connect 21 0 29 0; #P fasten 30 0 22 0 569 204 177 204; #P connect 29 0 22 0; #P fasten 30 0 25 0 569 249 177 249; #P connect 22 0 25 0; #P connect 25 0 48 0; #P fasten 30 0 23 0 569 298 177 298; #P connect 48 0 23 0; #P hidden fasten 30 0 21 0 569 108 178 108; #P connect 59 0 21 0; #P hidden connect 38 0 14 0; #P hidden connect 38 0 12 0; #P connect 37 0 36 0; #P hidden connect 49 0 33 0; #P connect 33 0 34 0; #P hidden connect 38 0 70 0; #P hidden connect 38 0 49 0; #P connect 69 0 68 0; #P fasten 25 0 23 2 177 272 309 272; #P fasten 32 0 26 0 543 227 310 227; #P hidden connect 42 0 26 0; #P connect 55 0 54 0; #P connect 61 0 60 0; #P fasten 21 0 24 0 178 160 367 160; #P connect 67 0 66 0; #P fasten 23 0 13 0 177 327 396 327; #P hidden fasten 38 0 42 0 629 227 428 227; #P connect 64 0 62 0; #P fasten 26 0 25 1 310 248 442 248; #P connect 6 0 5 0; #P fasten 24 0 5 0 367 177 454 177; #P fasten 13 0 5 0 396 382 454 382; #P fasten 34 0 5 0 237 505 454 505; #P fasten 12 0 5 0 185 456 454 456; #P fasten 14 0 5 0 185 395 454 395; #P fasten 36 0 5 0 185 505 454 505; #P fasten 35 0 5 0 12 505 454 505; #P fasten 54 0 5 0 310 505 454 505; #P fasten 56 1 5 0 338 393 454 393; #P fasten 57 0 5 0 461 478 454 478; #P fasten 58 0 5 0 461 503 454 503; #P fasten 13 2 5 0 440 356 454 356; #P connect 65 0 63 0; #P hidden connect 40 0 31 0; #P connect 31 0 32 0; #P connect 32 1 30 0; #P hidden connect 38 0 9 0; #P connect 32 0 9 0; #P connect 9 0 7 0; #P connect 7 0 8 0; #P connect 8 0 6 0; #P fasten 13 1 6 0 418 360 580 360; #P fasten 30 0 6 0 569 345 580 345; #P hidden connect 38 0 40 0; #P hidden connect 38 0 11 0; #P fasten 6 0 10 0 580 435 594 435; #P connect 11 0 10 0; #P hidden connect 38 0 28 0; #P connect 28 0 27 0; #P fasten 6 0 27 0 580 475 606 475; #P pop;