Forums > Jitter

erase_color to get black background in jit.window not working

April 30, 2007 | 11:20 am

Im using The @erase_color 0. 0. 0. 1. as an attribute for the jit.gl.render to get a black background in a jit.window. My problem is when there is any movemenet in the window the window does not refresh, it just duplicates the image for every frame of movement. If i take it out and use the default grey screen then everything works as normal. Is there a fix for this? Thanks.


April 30, 2007 | 11:55 am

It should works.
Post a little patch, it’s easier to reply.


April 30, 2007 | 1:49 pm

here it is…

max v2;
#N vpatcher 1 44 962 855;
#P origin 0 -14;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P message 100 631 91 196617 deletetexture grid;
#P button 441 100 15 0;
#P newex 319 674 62 196617 s to_render;
#N vpatcher 1003 579 1466 885;
#P outlet 60 243 15 0;
#P inlet 60 29 15 0;
#P window setfont "Sans Serif" 9.;
#P hidden message 239 93 50 196617 0.1;
#P flonum 239 115 50 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 239 137 50 196617 val $1;
#P comment 130 166 102 196617 < - process geometry;
#P comment 130 200 156 196617 < - rejoin with other stuff;
#P newex 60 86 29 196617 t l b;
#P newex 60 198 50 196617 zl join;
#P newex 60 60 50 196617 zl slice 2;
#P newex 112 137 105 196617 jit.op @op * @val 0.1;
#P newex 112 115 118 196617 jit.noise 3 float32 1024;
#P newex 60 164 62 196617 jit.op @op -;
#P comment 130 62 219 196617 < - slice message into geometry and other stuff;
#P connect 12 0 4 0;
#P connect 4 0 6 0;
#P connect 6 0 1 0;
#P connect 1 0 5 0;
#P connect 5 0 13 0;
#P fasten 4 1 5 1 105 86 346 86 346 186 105 186;
#P fasten 6 1 2 0 84 112 117 112;
#P connect 2 0 3 0;
#P connect 3 0 1 1;
#P fasten 9 0 3 1 244 159 219 159 219 135 212 135;
#P hidden connect 11 0 10 0;
#P connect 10 0 9 0;
#P pop 1;
#P newobj 319 652 61 196617 p add_noise;
#P newex 26 647 62 196617 r to_render;
#P newex 604 606 62 196617 s to_render;
#P user jit.fpsgui 8 697 60 196617 0;
#P toggle 322 451 15 0;
#P message 322 474 81 196617 matrixoutput $1;
#P window setfont "Sans Serif" 18.;
#P comment 15 25 104 196626 jit.gl.model;
#P window setfont "Sans Serif" 9.;
#P message 199 584 90 196617 drawgroup $1;
#P number 199 563 35 9 0 20 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 406 272 26 196617 0;
#P message 378 272 26 196617 t2;
#P message 350 272 26 196617 t1;
#P message 322 272 26 196617 grid;
#P newex 322 293 80 196617 prepend texture;
#P newex 548 481 50 196617 metro 42;
#P toggle 548 461 15 0;
#P window linecount 3;
#P newex 745 529 93 196617 jit.matrix 4 char 400 400 @planemap 1 1 2 3;
#P window linecount 1;
#P message 745 488 55 196617 read , bang;
#P newex 745 508 103 196617 jit.qt.movie 400 400;
#P newex 745 577 93 196617 prepend texture t2;
#P user jit.pwindow 707 528 34 34 0 1 0 0 1 0;
#P window linecount 3;
#P newex 604 529 93 196617 jit.matrix 4 char 640 640 @planemap 1 1 2 3;
#P window linecount 1;
#P message 604 488 55 196617 read , bang;
#P newex 604 508 103 196617 jit.qt.movie 640 640;
#P message 767 388 78 196617 texgroup 1 0;
#P message 685 388 78 196617 texgroup 1 t2;
#P message 603 388 78 196617 texgroup 1 t1;
#P message 767 411 78 196617 texgroup 2 0;
#P message 685 411 78 196617 texgroup 2 t2;
#P message 603 411 78 196617 texgroup 2 t1;
#P message 200 315 73 196617 make_normals;
#P hidden message 218 503 14 196617 1;
#P hidden message 238 187 14 196617 2;
#P hidden message 218 387 14 196617 1;
#P toggle 200 255 15 0;
#P message 200 278 88 196617 verbose $1;
#P message 229 114 99 196617 read mushrooms.obj;
#P message 323 354 62 196617 tex_map $1;
#P number 323 334 35 9 0 3 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P toggle 416 219 15 0;
#P message 416 240 90 196617 blend_enable $1;
#P toggle 200 386 15 0;
#P message 200 409 94 196617 smooth_shading $1;
#P message 198 206 90 196617 material_mode $1;
#P number 198 185 35 9 0 2 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P toggle 200 442 15 0;
#P message 200 465 81 196617 facet $1;
#P toggle 200 503 15 0;
#P message 200 525 90 196617 lighting_enable $1;
#P message 229 93 28 196617 read;
#P message 433 564 50 196617 reset;
#P message 803 643 68 196617 fullscreen $1;
#P toggle 764 642 15 0;
#P newex 764 622 50 196617 select 27;
#P newex 764 602 50 196617 key;
#P message 323 529 85 196617 poly_mode $1 $1;
#P newex 434 581 104 196617 jit.gl.handle mdl;
#P newex 461 123 105 196617 jit.qball @mode usurp;
#P newex 604 577 93 196617 prepend texture t1;
#P user jit.pwindow 566 528 34 34 0 1 0 0 1 0;
#P toggle 323 561 15 0;
#P message 323 582 44 196617 axes $1;
#P toggle 323 507 15 0;
#P hidden newex 528 224 50 196617 loadbang;
#P message 321 410 62 196617 cull_face $1;
#P number 321 390 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 506 74 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P toggle 322 222 15 0;
#P message 322 241 81 196617 depth_enable $1;
#P toggle 461 73 15 0;
#P newex 461 100 55 196617 metro 20;
#P message 29 611 162 196617 texture grid 64 64 , usetexture 0;
#P newex 461 147 55 196617 t b b erase;
#P newex 302 630 78 196617 jit.gl.model mdl;
#B color 5;
#P window linecount 4;
#P newex 136 648 74 196617 jit.gl.render mdl @erase_color 0. 0. 0. 0.;
#P newex 768 668 105 196617 jit.window mdl @depthbuffer 1 @rect 614 79 934 316 @floating 1;
#P connect 1 0 72 0;
#P hidden connect 12 0 4 0;
#P fasten 78 0 1 0 105 668 141 668;
#P fasten 4 0 1 0 34 635 141 635;
#P fasten 3 0 1 0 466 167 141 167;
#P fasten 3 2 1 0 510 172 141 172;
#P connect 74 0 1 0;
#P hidden connect 43 0 31 0;
#P connect 31 0 32 0;
#P connect 67 0 68 0;
#P connect 41 0 40 0;
#P hidden connect 42 0 34 0;
#P connect 34 0 33 0;
#P connect 30 0 29 0;
#P hidden connect 44 0 28 0;
#P connect 28 0 27 0;
#P hidden connect 12 0 42 0;
#P hidden connect 12 0 44 0;
#P hidden connect 12 0 43 0;
#P fasten 19 0 2 0 439 625 307 625;
#P fasten 68 0 2 0 204 607 307 607;
#P fasten 62 0 2 0 327 315 307 315;
#P hidden fasten 51 0 2 0 772 443 307 443;
#P hidden fasten 50 0 2 0 690 428 307 428;
#P hidden fasten 49 0 2 0 608 428 307 428;
#P fasten 45 0 2 0 205 336 307 336;
#P fasten 33 0 2 0 205 428 307 428;
#P fasten 40 0 2 0 205 298 307 298;
#P hidden fasten 39 0 2 0 234 90 307 90;
#P fasten 38 0 2 0 328 382 307 382;
#P fasten 29 0 2 0 205 484 307 484;
#P hidden fasten 26 0 2 0 234 113 307 113;
#P fasten 20 0 2 0 328 552 307 552;
#P fasten 14 0 2 0 328 607 307 607;
#P fasten 11 0 2 0 326 439 307 439;
#P fasten 7 0 2 0 327 261 307 261;
#P fasten 32 0 2 0 203 228 307 228;
#P hidden fasten 46 0 2 0 608 405 307 405;
#P hidden fasten 47 0 2 0 690 405 307 405;
#P hidden fasten 48 0 2 0 772 404 307 404;
#P fasten 27 0 2 0 205 544 307 544;
#P fasten 35 0 2 0 421 265 307 265;
#P fasten 70 0 2 0 327 497 307 497;
#P connect 2 0 75 0;
#P connect 75 0 76 0;
#P connect 10 0 11 0;
#P hidden connect 12 0 8 0;
#P connect 8 0 7 0;
#P fasten 66 0 62 0 411 290 327 290;
#P fasten 65 0 62 0 383 290 327 290;
#P fasten 64 0 62 0 355 290 327 290;
#P fasten 63 0 62 0 327 290 327 290;
#P connect 71 0 70 0;
#P connect 37 0 38 0;
#P connect 13 0 20 0;
#P connect 15 0 14 0;
#P connect 36 0 35 0;
#P connect 25 0 19 0;
#P connect 6 0 5 0;
#P connect 77 0 18 0;
#P connect 5 0 18 0;
#P connect 18 0 3 0;
#P connect 9 0 5 1;
#P connect 60 0 61 0;
#P fasten 52 0 16 0 609 527 572 527;
#P fasten 61 0 52 0 553 505 609 505;
#P connect 53 0 52 0;
#P connect 52 0 54 0;
#P connect 54 0 17 0;
#P fasten 17 0 73 0 609 600 609 600;
#P fasten 56 0 73 0 750 600 609 600;
#P fasten 57 0 55 0 750 528 713 528;
#P connect 58 0 57 0;
#P fasten 61 0 57 0 553 505 750 505;
#P connect 57 0 59 0;
#P connect 59 0 56 0;
#P connect 21 0 22 0;
#P connect 22 0 23 0;
#P connect 24 0 0 0;
#P connect 23 0 24 0;
#P pop;


April 30, 2007 | 2:29 pm

actually, your erase color is 0. 0. 0. 0., . change it to
@erase_color 0. 0. 0. 1. and this should work.

On Apr 30, 2007, at 9:49 AM, Kit Webster wrote:

>
> here it is…
>
> max v2;
> #N vpatcher 1 44 962 855;
> #P origin 0 -14;
> #P window setfont "Sans Serif" 9.;
> #P window linecount 1;
> #P message 100 631 91 196617 deletetexture grid;
> #P button 441 100 15 0;
> #P newex 319 674 62 196617 s to_render;
> #N vpatcher 1003 579 1466 885;
> #P outlet 60 243 15 0;
> #P inlet 60 29 15 0;
> #P window setfont "Sans Serif" 9.;
> #P hidden message 239 93 50 196617 0.1;
> #P flonum 239 115 50 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P message 239 137 50 196617 val $1;
> #P comment 130 166 102 196617 < - process geometry;
> #P comment 130 200 156 196617 < - rejoin with other stuff;
> #P newex 60 86 29 196617 t l b;
> #P newex 60 198 50 196617 zl join;
> #P newex 60 60 50 196617 zl slice 2;
> #P newex 112 137 105 196617 jit.op @op * @val 0.1;
> #P newex 112 115 118 196617 jit.noise 3 float32 1024;
> #P newex 60 164 62 196617 jit.op @op -;
> #P comment 130 62 219 196617 < - slice message into geometry and
> other stuff;
> #P connect 12 0 4 0;
> #P connect 4 0 6 0;
> #P connect 6 0 1 0;
> #P connect 1 0 5 0;
> #P connect 5 0 13 0;
> #P fasten 4 1 5 1 105 86 346 86 346 186 105 186;
> #P fasten 6 1 2 0 84 112 117 112;
> #P connect 2 0 3 0;
> #P connect 3 0 1 1;
> #P fasten 9 0 3 1 244 159 219 159 219 135 212 135;
> #P hidden connect 11 0 10 0;
> #P connect 10 0 9 0;
> #P pop 1;
> #P newobj 319 652 61 196617 p add_noise;
> #P newex 26 647 62 196617 r to_render;
> #P newex 604 606 62 196617 s to_render;
> #P user jit.fpsgui 8 697 60 196617 0;
> #P toggle 322 451 15 0;
> #P message 322 474 81 196617 matrixoutput $1;
> #P window setfont "Sans Serif" 18.;
> #P comment 15 25 104 196626 jit.gl.model;
> #P window setfont "Sans Serif" 9.;
> #P message 199 584 90 196617 drawgroup $1;
> #P number 199 563 35 9 0 20 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P message 406 272 26 196617 0;
> #P message 378 272 26 196617 t2;
> #P message 350 272 26 196617 t1;
> #P message 322 272 26 196617 grid;
> #P newex 322 293 80 196617 prepend texture;
> #P newex 548 481 50 196617 metro 42;
> #P toggle 548 461 15 0;
> #P window linecount 3;
> #P newex 745 529 93 196617 jit.matrix 4 char 400 400 @planemap 1 1
> 2 3;
> #P window linecount 1;
> #P message 745 488 55 196617 read , bang;
> #P newex 745 508 103 196617 jit.qt.movie 400 400;
> #P newex 745 577 93 196617 prepend texture t2;
> #P user jit.pwindow 707 528 34 34 0 1 0 0 1 0;
> #P window linecount 3;
> #P newex 604 529 93 196617 jit.matrix 4 char 640 640 @planemap 1 1
> 2 3;
> #P window linecount 1;
> #P message 604 488 55 196617 read , bang;
> #P newex 604 508 103 196617 jit.qt.movie 640 640;
> #P message 767 388 78 196617 texgroup 1 0;
> #P message 685 388 78 196617 texgroup 1 t2;
> #P message 603 388 78 196617 texgroup 1 t1;
> #P message 767 411 78 196617 texgroup 2 0;
> #P message 685 411 78 196617 texgroup 2 t2;
> #P message 603 411 78 196617 texgroup 2 t1;
> #P message 200 315 73 196617 make_normals;
> #P hidden message 218 503 14 196617 1;
> #P hidden message 238 187 14 196617 2;
> #P hidden message 218 387 14 196617 1;
> #P toggle 200 255 15 0;
> #P message 200 278 88 196617 verbose $1;
> #P message 229 114 99 196617 read mushrooms.obj;
> #P message 323 354 62 196617 tex_map $1;
> #P number 323 334 35 9 0 3 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P toggle 416 219 15 0;
> #P message 416 240 90 196617 blend_enable $1;
> #P toggle 200 386 15 0;
> #P message 200 409 94 196617 smooth_shading $1;
> #P message 198 206 90 196617 material_mode $1;
> #P number 198 185 35 9 0 2 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P toggle 200 442 15 0;
> #P message 200 465 81 196617 facet $1;
> #P toggle 200 503 15 0;
> #P message 200 525 90 196617 lighting_enable $1;
> #P message 229 93 28 196617 read;
> #P message 433 564 50 196617 reset;
> #P message 803 643 68 196617 fullscreen $1;
> #P toggle 764 642 15 0;
> #P newex 764 622 50 196617 select 27;
> #P newex 764 602 50 196617 key;
> #P message 323 529 85 196617 poly_mode $1 $1;
> #P newex 434 581 104 196617 jit.gl.handle mdl;
> #P newex 461 123 105 196617 jit.qball @mode usurp;
> #P newex 604 577 93 196617 prepend texture t1;
> #P user jit.pwindow 566 528 34 34 0 1 0 0 1 0;
> #P toggle 323 561 15 0;
> #P message 323 582 44 196617 axes $1;
> #P toggle 323 507 15 0;
> #P hidden newex 528 224 50 196617 loadbang;
> #P message 321 410 62 196617 cull_face $1;
> #P number 321 390 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P number 506 74 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P toggle 322 222 15 0;
> #P message 322 241 81 196617 depth_enable $1;
> #P toggle 461 73 15 0;
> #P newex 461 100 55 196617 metro 20;
> #P message 29 611 162 196617 texture grid 64 64 , usetexture 0;
> #P newex 461 147 55 196617 t b b erase;
> #P newex 302 630 78 196617 jit.gl.model mdl;
> #B color 5;
> #P window linecount 4;
> #P newex 136 648 74 196617 jit.gl.render mdl @erase_color 0. 0. 0. 0.;
> #P newex 768 668 105 196617 jit.window mdl @depthbuffer 1 @rect 614
> 79 934 316 @floating 1;
> #P connect 1 0 72 0;
> #P hidden connect 12 0 4 0;
> #P fasten 78 0 1 0 105 668 141 668;
> #P fasten 4 0 1 0 34 635 141 635;
> #P fasten 3 0 1 0 466 167 141 167;
> #P fasten 3 2 1 0 510 172 141 172;
> #P connect 74 0 1 0;
> #P hidden connect 43 0 31 0;
> #P connect 31 0 32 0;
> #P connect 67 0 68 0;
> #P connect 41 0 40 0;
> #P hidden connect 42 0 34 0;
> #P connect 34 0 33 0;
> #P connect 30 0 29 0;
> #P hidden connect 44 0 28 0;
> #P connect 28 0 27 0;
> #P hidden connect 12 0 42 0;
> #P hidden connect 12 0 44 0;
> #P hidden connect 12 0 43 0;
> #P fasten 19 0 2 0 439 625 307 625;
> #P fasten 68 0 2 0 204 607 307 607;
> #P fasten 62 0 2 0 327 315 307 315;
> #P hidden fasten 51 0 2 0 772 443 307 443;
> #P hidden fasten 50 0 2 0 690 428 307 428;
> #P hidden fasten 49 0 2 0 608 428 307 428;
> #P fasten 45 0 2 0 205 336 307 336;
> #P fasten 33 0 2 0 205 428 307 428;
> #P fasten 40 0 2 0 205 298 307 298;
> #P hidden fasten 39 0 2 0 234 90 307 90;
> #P fasten 38 0 2 0 328 382 307 382;
> #P fasten 29 0 2 0 205 484 307 484;
> #P hidden fasten 26 0 2 0 234 113 307 113;
> #P fasten 20 0 2 0 328 552 307 552;
> #P fasten 14 0 2 0 328 607 307 607;
> #P fasten 11 0 2 0 326 439 307 439;
> #P fasten 7 0 2 0 327 261 307 261;
> #P fasten 32 0 2 0 203 228 307 228;
> #P hidden fasten 46 0 2 0 608 405 307 405;
> #P hidden fasten 47 0 2 0 690 405 307 405;
> #P hidden fasten 48 0 2 0 772 404 307 404;
> #P fasten 27 0 2 0 205 544 307 544;
> #P fasten 35 0 2 0 421 265 307 265;
> #P fasten 70 0 2 0 327 497 307 497;
> #P connect 2 0 75 0;
> #P connect 75 0 76 0;
> #P connect 10 0 11 0;
> #P hidden connect 12 0 8 0;
> #P connect 8 0 7 0;
> #P fasten 66 0 62 0 411 290 327 290;
> #P fasten 65 0 62 0 383 290 327 290;
> #P fasten 64 0 62 0 355 290 327 290;
> #P fasten 63 0 62 0 327 290 327 290;
> #P connect 71 0 70 0;
> #P connect 37 0 38 0;
> #P connect 13 0 20 0;
> #P connect 15 0 14 0;
> #P connect 36 0 35 0;
> #P connect 25 0 19 0;
> #P connect 6 0 5 0;
> #P connect 77 0 18 0;
> #P connect 5 0 18 0;
> #P connect 18 0 3 0;
> #P connect 9 0 5 1;
> #P connect 60 0 61 0;
> #P fasten 52 0 16 0 609 527 572 527;
> #P fasten 61 0 52 0 553 505 609 505;
> #P connect 53 0 52 0;
> #P connect 52 0 54 0;
> #P connect 54 0 17 0;
> #P fasten 17 0 73 0 609 600 609 600;
> #P fasten 56 0 73 0 750 600 609 600;
> #P fasten 57 0 55 0 750 528 713 528;
> #P connect 58 0 57 0;
> #P fasten 61 0 57 0 553 505 750 505;
> #P connect 57 0 59 0;
> #P connect 59 0 56 0;
> #P connect 21 0 22 0;
> #P connect 22 0 23 0;
> #P connect 24 0 0 0;
> #P connect 23 0 24 0;
> #P pop;
>
>


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