Jit.gl.multiple

Apr 8, 2008 at 12:01pm

Jit.gl.multiple

Im trying to read in a jit.gl.model in through jit.gl.multiple
to get many instances of the model but I cant seem to get it to work…..still only getting one image of my model in the window…any ideas?

#P window setfont “Fixedwidth Serif” 10.;
#P window linecount 1;
#P message 774 352 103 9240586 material_mode $1;
#P number 774 330 35 10 0 2 3 141 0 0 0 221 221 221 222 222 222 0 0 0;
#P toggle 970 187 15 0;
#P message 970 208 110 9240586 smooth_shading $1;
#P message 774 478 116 9240586 read humanhead.obj;
#P message 1001 278 80 9240586 texgroup 1 0;
#P message 983 257 98 9240586 texgroup 1 grid;
#P message 812 258 14 9240586 0;
#P message 775 258 32 9240586 grid;
#P newex 775 279 98 9240586 prepend texture;
#P message 895 279 68 9240586 tex_map $1;
#P number 895 259 35 10 0 3 3 141 0 0 0 221 221 221 222 222 222 0 0 0;
#P toggle 843 190 15 0;
#P message 843 210 113 9240586 lighting_enable $1;
#P toggle 758 189 15 0;
#P message 758 210 68 9240586 verbose $1;
#P message 775 394 50 9240586 reset;
#P window linecount 2;
#P newex 775 417 110 9240586 jit.gl.handle ml @auto_rotate 1;
#B color 5;
#P window linecount 1;
#P newex 756 550 104 9240586 jit.gl.model foo;
#B color 5;
#P window setfont “Sans Serif” 9.;
#P comment 520 309 114 9109513 (similar to jit.gl.sketch);
#P comment 520 293 244 9109513 targetname ;
#P newex 361 334 54 9109513 s multiple;
#P toggle 361 293 15 0;
#P message 361 315 76 9109513 targetmode $1;
#P newex 348 113 41 9109513 r draw;
#P newex 78 188 41 9109513 s draw;
#P newex 246 136 56 9109513 r loadbang;
#P newex 705 500 56 9109513 s loadbang;
#N vpatcher 330 205 864 387;
#P window setfont “Sans Serif” 9.;
#P window linecount 0;
#P newex 252 47 56 9109513 r loadbang;
#P button 252 68 15 0;
#P window linecount 1;
#P newex 50 87 77 9109513 jit.matrix rots;
#P newex 252 130 77 9109513 jit.matrix rots;
#P newex 252 108 256 9109513 jit.expr @expr “180*snorm[0]” “180*snorm[1]” “0″;
#P newex 252 87 130 9109513 jit.matrix 3 float32 15 15;
#P newex 142 87 34 9109513 / 50.;
#N counter 2 0 10000;
#X flags 0 0;
#P newobj 142 47 95 9109513 counter 2 0 10000;
#P newex 50 110 102 9109513 jit.op @op * @val 1.;
#P inlet 50 21 15 0;
#P inlet 166 67 15 0;
#P outlet 50 132 15 0;
#P connect 2 0 9 0;
#P connect 9 0 3 0;
#P connect 3 0 0 0;
#P fasten 2 0 4 0 55 43 147 43;
#P connect 4 0 5 0;
#P connect 5 0 3 1;
#P connect 1 0 5 1;
#P connect 11 0 10 0;
#P connect 10 0 6 0;
#P connect 6 0 7 0;
#P connect 7 0 8 0;
#P pop;
#P newobj 348 177 37 9109513 p Spin;
#P newex 625 248 54 9109513 s multiple;
#P flonum 581 203 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 543 203 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 503 203 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 503 225 85 9109513 pak scale 1. 1. 1.;
#P flonum 703 203 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 665 203 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 625 203 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 625 225 95 9109513 pak position 0. 0. 0.;
#P newex 472 259 32 9109513 print;
#P newex 160 155 54 9109513 r multiple;
#N vpatcher 20 74 623 276;
#P window setfont “Sans Serif” 9.;
#P newex 286 72 130 9109513 jit.matrix 4 float32 50 50;
#P newex 286 115 117 9109513 jit.matrix 4 char 50 50;
#P newex 286 94 266 9109513 jit.expr @expr “0.5″ “norm[0]” “norm[1]” “1-norm[0]“;
#P newex 286 136 233 9109513 jit.gl.texture foo @name t4 @texgen environment;
#P button 50 50 15 0;
#P newex 50 72 109 9109513 jit.noise 4 char 50 50;
#P newex 50 94 233 9109513 jit.gl.texture foo @name t3 @texgen environment;
#P inlet 50 30 15 0;
#P connect 0 0 3 0;
#P connect 3 0 2 0;
#P connect 2 0 1 0;
#P fasten 3 0 7 0 55 68 291 68;
#P connect 7 0 5 0;
#P connect 5 0 6 0;
#P connect 6 0 4 0;
#P pop;
#P newobj 650 500 51 9109513 p TexGen;
#P flonum 375 157 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#N vpatcher 375 354 1147 800;
#P window setfont “Sans Serif” 9.;
#P window linecount 0;
#P message 493 301 80 9109513 setall 0 1 , bang;
#P newex 493 324 117 9109513 jit.matrix 2 char 15 15;
#P newex 146 274 293 9109513 jit.expr @expr “0.5*norm[0]” “0.5*norm[1]” “0.5*norm[0]“;
#P newex 146 248 130 9109513 jit.matrix 3 float32 15 15;
#P newex 84 188 256 9109513 jit.expr @expr “180*snorm[0]” “180*snorm[1]” “0″;
#P newex 84 167 130 9109513 jit.matrix 3 float32 15 15;
#P window linecount 2;
#P newex 17 98 227 9109513 jit.expr @expr “snorm[0]*2″ “snorm[1]*2″ “cos(snorm[0]*TWOPI)*sin(snorm[1]*TWOPI)”;
#P window linecount 1;
#P newex 17 74 130 9109513 jit.matrix 3 float32 15 15;
#P inlet 91 36 15 0;
#P outlet 493 346 15 0;
#P outlet 146 296 15 0;
#P outlet 84 210 15 0;
#P outlet 17 132 15 0;
#P connect 4 0 5 0;
#P connect 5 0 6 0;
#P connect 6 0 0 0;
#P connect 4 0 7 0;
#P connect 7 0 8 0;
#P connect 8 0 1 0;
#P connect 4 0 9 0;
#P connect 9 0 10 0;
#P connect 10 0 2 0;
#P connect 4 0 12 0;
#P connect 12 0 11 0;
#P connect 11 0 3 0;
#P pop;
#P newobj 246 177 79 9109513 p GenGLParams;
#P newex 631 471 48 9109513 loadbang;
#P message 172 190 65 9109513 getglparams;
#P user jit.fpsgui 58 210 60 9109513 0;
#P message 52 506 34 9109513 reset;
#P newex 52 525 255 9109513 jit.gl.handle foo @inherit_transform 1 @auto_rotate 1;
#P toggle 476 525 15 0;
#P message 476 543 55 9109513 floating $1;
#P hidden newex 678 66 64 9109513 prepend help;
#P hidden newex 678 92 45 9109513 pcontrol;
#P toggle 403 525 15 0;
#P newex 364 524 35 9109513 sel 27;
#P message 403 543 68 9109513 fullscreen $1;
#P newex 321 567 188 9109513 jit.window foo @depthbuffer 1 @sync 0;
#P newex 319 524 40 9109513 key;
#P number 75 106 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P toggle 34 106 15 0;
#P newex 34 128 51 9109513 qmetro 2;
#P newex 34 150 58 9109513 t b b erase;
#P newex 34 567 271 9109513 jit.gl.render foo @erase_color 1. 1. 1. 1. @camera 0 0 -6;
#P button 631 499 15 0;
#P button 246 157 15 0;
#P window linecount 2;
#P newex 246 225 227 9109513 jit.gl.multiple foo 4 @targetname me @glparams position rotatexyz scale texture @texture t3 t4;
#B color 5;
#P window linecount 1;
#P comment 372 140 47 9109513 spin rate;
#P comment 382 293 125 9109513 < = toggle draw/draw_raw;
#P connect 8 0 7 0;
#P connect 7 0 6 0;
#P fasten 19 0 5 0 57 554 39 554;
#P fasten 6 2 5 0 87 173 39 173;
#P connect 6 0 5 0;
#P connect 20 0 19 0;
#P connect 6 1 21 0;
#P connect 9 0 7 1;
#P fasten 6 1 41 0 63 182 83 182;
#P connect 40 0 3 0;
#P connect 3 0 24 0;
#P connect 24 0 2 0;
#P fasten 27 0 2 0 165 221 251 221;
#P fasten 22 0 2 0 177 221 251 221;
#P fasten 24 1 2 1 274 218 323 218;
#P fasten 38 0 2 1 353 218 323 218;
#P fasten 17 0 11 0 481 562 326 562;
#P fasten 12 0 11 0 408 562 326 562;
#P connect 42 0 38 0;
#P connect 44 0 43 0;
#P connect 43 0 45 0;
#P fasten 10 0 13 0 324 543 361 543 361 522 369 522;
#P connect 25 0 38 1;
#P fasten 24 2 2 2 297 212 395 212;
#P fasten 13 0 14 0 369 542 400 542 400 522 408 522;
#P connect 14 0 12 0;
#P fasten 24 3 2 3 320 206 467 206;
#P connect 2 1 28 0;
#P connect 18 0 17 0;
#P fasten 34 0 33 1 508 221 533 221;
#P fasten 35 0 33 2 548 221 558 221;
#P fasten 36 0 33 3 586 221 583 221;
#P connect 29 0 37 0;
#P fasten 33 0 37 0 508 245 630 245;
#P connect 23 0 4 0;
#P fasten 23 0 26 0 636 494 655 494;
#P fasten 30 0 29 1 630 221 658 221;
#P hidden connect 16 0 15 0;
#P fasten 31 0 29 2 670 221 686 221;
#P fasten 23 0 39 0 636 494 710 494;
#P fasten 32 0 29 3 708 221 714 221;
#P fasten 62 0 48 0 779 530 761 530;
#P connect 51 0 48 0;
#P fasten 49 0 48 0 780 453 761 453;
#P fasten 57 0 48 0 780 305 761 305;
#P fasten 56 0 48 0 900 308 761 308;
#P fasten 53 0 48 0 848 232 761 232;
#P fasten 63 0 48 0 975 238 761 238;
#P fasten 60 0 48 0 988 311 761 311;
#P fasten 61 0 48 0 1006 314 761 314;
#P fasten 66 0 48 0 779 376 761 376;
#P fasten 4 0 48 0 636 532 761 532;
#P connect 52 0 51 0;
#P connect 65 0 66 0;
#P connect 59 0 57 0;
#P connect 58 0 57 0;
#P connect 50 0 49 0;
#P connect 54 0 53 0;
#P connect 55 0 56 0;
#P connect 64 0 63 0;
#P window clipboard copycount 67;

#36792
Apr 8, 2008 at 3:32pm

you need to name your model according to the targetname you plan to use in your jit.gl.mutiple :

[jit.gl.model foo @name bob]
[jit.gl.multiple foo @targetname bob]

#126465
Apr 8, 2008 at 3:37pm

You have to properly name your object for jit.gl.multilpe to attach to it
wes

#P window setfont “Fixedwidth Serif” 10.;
#P window linecount 1;
#P message 738 412 103 1441802 material_mode $1;
#P number 738 390 35 10 0 2 3 22 0 0 0 221 221 221 222 222 222 0 0 0;
#P toggle 934 247 15 0;
#P message 934 268 110 1441802 smooth_shading $1;
#P message 738 538 94 1441802 read apple.obj;
#P message 965 338 80 1441802 texgroup 1 0;
#P message 947 317 98 1441802 texgroup 1 grid;
#P message 776 318 14 1441802 0;
#P message 739 318 32 1441802 grid;
#P newex 739 339 98 1441802 prepend texture;
#P message 859 339 68 1441802 tex_map $1;
#P number 859 319 35 10 0 3 3 22 0 0 0 221 221 221 222 222 222 0 0 0;
#P toggle 807 250 15 0;
#P message 807 270 113 1441802 lighting_enable $1;
#P toggle 722 249 15 0;
#P message 722 270 68 1441802 verbose $1;
#P message 739 454 50 1441802 reset;
#P window linecount 2;
#P newex 739 477 110 1441802 jit.gl.handle ml @auto_rotate 1;
#B color 5;
#P window linecount 1;
#P newex 720 610 238 1441802 jit.gl.model foo @name me @automatic 0;
#B color 5;
#P window setfont “Sans Serif” 9.;
#P comment 484 369 114 196617 (similar to jit.gl.sketch);
#P comment 484 353 244 196617 targetname ;
#P newex 325 394 54 196617 s multiple;
#P toggle 325 353 15 0;
#P message 325 375 76 196617 targetmode $1;
#P newex 312 173 41 196617 r draw;
#P newex 42 248 41 196617 s draw;
#P newex 210 196 56 196617 r loadbang;
#P newex 669 560 56 196617 s loadbang;
#N vpatcher 330 205 864 387;
#P window setfont “Sans Serif” 9.;
#P window linecount 0;
#P newex 252 47 56 196617 r loadbang;
#P button 252 68 15 0;
#P window linecount 1;
#P newex 50 87 77 196617 jit.matrix rots;
#P newex 252 130 77 196617 jit.matrix rots;
#P newex 252 108 256 196617 jit.expr @expr “180*snorm[0]” “180*snorm[1]” “0″;
#P newex 252 87 130 196617 jit.matrix 3 float32 15 15;
#P newex 142 87 34 196617 / 50.;
#N counter 2 0 10000;
#X flags 0 0;
#P newobj 142 47 95 196617 counter 2 0 10000;
#P newex 50 110 102 196617 jit.op @op * @val 1.;
#P inlet 50 21 15 0;
#P inlet 166 67 15 0;
#P outlet 50 132 15 0;
#P connect 2 0 9 0;
#P connect 9 0 3 0;
#P connect 3 0 0 0;
#P fasten 2 0 4 0 55 43 147 43;
#P connect 4 0 5 0;
#P connect 5 0 3 1;
#P connect 1 0 5 1;
#P connect 11 0 10 0;
#P connect 10 0 6 0;
#P connect 6 0 7 0;
#P connect 7 0 8 0;
#P pop;
#P newobj 312 237 37 196617 p Spin;
#P newex 589 308 54 196617 s multiple;
#P flonum 545 263 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 507 263 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 467 263 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 467 285 85 196617 pak scale 1. 1. 1.;
#P flonum 667 263 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 629 263 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 589 263 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 589 285 95 196617 pak position 0. 0. 0.;
#P newex 436 319 32 196617 print;
#P newex 124 215 54 196617 r multiple;
#N vpatcher 20 74 623 276;
#P window setfont “Sans Serif” 9.;
#P newex 286 72 130 196617 jit.matrix 4 float32 50 50;
#P newex 286 115 117 196617 jit.matrix 4 char 50 50;
#P newex 286 94 266 196617 jit.expr @expr “0.5″ “norm[0]” “norm[1]” “1-norm[0]“;
#P newex 286 136 233 196617 jit.gl.texture foo @name t4 @texgen environment;
#P button 50 50 15 0;
#P newex 50 72 109 196617 jit.noise 4 char 50 50;
#P newex 50 94 233 196617 jit.gl.texture foo @name t3 @texgen environment;
#P inlet 50 30 15 0;
#P connect 0 0 3 0;
#P connect 3 0 2 0;
#P connect 2 0 1 0;
#P fasten 3 0 7 0 55 68 291 68;
#P connect 7 0 5 0;
#P connect 5 0 6 0;
#P connect 6 0 4 0;
#P pop;
#P newobj 614 560 51 196617 p TexGen;
#P flonum 339 217 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#N vpatcher 375 354 1147 800;
#P window setfont “Sans Serif” 9.;
#P message 493 301 80 196617 setall 0 1 , bang;
#P newex 493 324 117 196617 jit.matrix 2 char 15 15;
#P newex 146 274 293 196617 jit.expr @expr “0.5*norm[0]” “0.5*norm[1]“
“0.5*norm[0]“;
#P newex 146 248 130 196617 jit.matrix 3 float32 15 15;
#P newex 84 188 256 196617 jit.expr @expr “180*snorm[0]” “180*snorm[1]” “0″;
#P newex 84 167 130 196617 jit.matrix 3 float32 15 15;
#P window linecount 2;
#P newex 17 98 227 196617 jit.expr @expr “snorm[0]*2″ “snorm[1]*2″
“cos(snorm[0]*TWOPI)*sin(snorm[1]*TWOPI)”;
#P window linecount 1;
#P newex 17 74 130 196617 jit.matrix 3 float32 15 15;
#P inlet 91 36 15 0;
#P outlet 493 346 15 0;
#P outlet 146 296 15 0;
#P outlet 84 210 15 0;
#P outlet 17 132 15 0;
#P connect 4 0 5 0;
#P connect 5 0 6 0;
#P connect 6 0 0 0;
#P connect 4 0 7 0;
#P connect 7 0 8 0;
#P connect 8 0 1 0;
#P connect 4 0 9 0;
#P connect 9 0 10 0;
#P connect 10 0 2 0;
#P connect 4 0 12 0;
#P connect 12 0 11 0;
#P connect 11 0 3 0;
#P pop 1;
#P newobj 210 237 79 196617 p GenGLParams;
#P newex 595 531 48 196617 loadbang;
#P message 136 250 65 196617 getglparams;
#P user jit.fpsgui 22 270 60 196617 0;
#P message 16 566 34 196617 reset;
#P newex 16 585 255 196617 jit.gl.handle foo @inherit_transform 1
@auto_rotate 1;
#P toggle 440 585 15 0;
#P message 440 603 55 196617 floating $1;
#P hidden newex 642 126 64 196617 prepend help;
#P hidden newex 642 152 45 196617 pcontrol;
#P toggle 367 585 15 0;
#P newex 328 584 35 196617 sel 27;
#P message 367 603 68 196617 fullscreen $1;
#P newex 285 627 188 196617 jit.window foo @depthbuffer 1 @sync 0;
#P newex 283 584 40 196617 key;
#P number 39 166 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P toggle -2 166 15 0;
#P newex -2 188 57 196617 qmetro 33;
#P newex -2 210 58 196617 t b b erase;
#P newex -2 627 271 196617 jit.gl.render foo @erase_color 1. 1. 1. 1.
@camera 0 0 -6;
#P button 595 559 15 0;
#P button 210 217 15 0;
#P window linecount 2;
#P newex 210 285 227 196617 jit.gl.multiple foo 4 @targetname me
@glparams position rotatexyz scale texture @texture t3 t4;
#B color 5;
#P window linecount 1;
#P comment 336 200 47 196617 spin rate;
#P comment 346 353 125 196617 < = toggle draw/draw_raw;
#P fasten 4 0 48 0 600 592 725 592;
#P fasten 66 0 48 0 743 436 725 436;
#P fasten 61 0 48 0 970 374 725 374;
#P fasten 60 0 48 0 952 371 725 371;
#P fasten 63 0 48 0 939 298 725 298;
#P fasten 53 0 48 0 812 292 725 292;
#P fasten 56 0 48 0 864 368 725 368;
#P fasten 57 0 48 0 744 365 725 365;
#P fasten 49 0 48 0 744 513 725 513;
#P connect 51 0 48 0;
#P fasten 62 0 48 0 743 590 725 590;
#P fasten 24 3 2 3 284 266 431 266;
#P fasten 24 2 2 2 261 272 359 272;
#P fasten 24 1 2 1 238 278 287 278;
#P connect 24 0 2 0;
#P connect 8 0 7 0;
#P connect 7 0 6 0;
#P connect 9 0 7 1;
#P connect 64 0 63 0;
#P connect 55 0 56 0;
#P connect 54 0 53 0;
#P connect 50 0 49 0;
#P connect 58 0 57 0;
#P connect 59 0 57 0;
#P connect 65 0 66 0;
#P connect 52 0 51 0;
#P fasten 32 0 29 3 672 281 678 281;
#P connect 23 0 4 0;
#P fasten 23 0 26 0 600 554 619 554;
#P fasten 23 0 39 0 600 554 674 554;
#P fasten 31 0 29 2 634 281 650 281;
#P hidden connect 16 0 15 0;
#P fasten 30 0 29 1 594 281 622 281;
#P fasten 33 0 37 0 472 305 594 305;
#P connect 29 0 37 0;
#P fasten 36 0 33 3 550 281 547 281;
#P fasten 35 0 33 2 512 281 522 281;
#P fasten 34 0 33 1 472 281 497 281;
#P connect 18 0 17 0;
#P connect 2 1 28 0;
#P connect 14 0 12 0;
#P fasten 13 0 14 0 333 602 364 602 364 582 372 582;
#P connect 25 0 38 1;
#P fasten 10 0 13 0 288 603 325 603 325 582 333 582;
#P connect 43 0 45 0;
#P connect 44 0 43 0;
#P connect 42 0 38 0;
#P fasten 12 0 11 0 372 622 290 622;
#P fasten 17 0 11 0 445 622 290 622;
#P fasten 38 0 2 1 317 278 287 278;
#P fasten 22 0 2 0 141 281 215 281;
#P fasten 27 0 2 0 129 281 215 281;
#P connect 3 0 24 0;
#P connect 40 0 3 0;
#P connect 6 1 21 0;
#P fasten 6 1 41 0 27 242 47 242;
#P connect 20 0 19 0;
#P connect 6 0 5 0;
#P fasten 6 2 5 0 51 233 3 233;
#P fasten 19 0 5 0 21 614 3 614;
#P window clipboard copycount 67;

#126466
Apr 8, 2008 at 4:22pm

Thanks a million, got that working, its so cool

Thank you

#126467

You must be logged in to reply to this topic.