fading between jit.gl objects that don't accept [matrixout 1]????


    Sep 19 2007 | 5:40 pm
    I am looking for a way to change one opengl scene to another but can't
    find a way of removing opengl content to make way for anything new. For
    example, I can easily xfade out old stuff with those gl objects that
    accept a [matrixout 1] message, but for those that don't, like
    jit.gl.gridshape or jit.gl.mesh, there doesn't seem to be a way.
    Any ideas? Many thanks, Robbie.

    • Sep 19 2007 | 5:46 pm
      with @blend_enable 1, fade the alpha color of the departing object to 0.
      On Sep 19, 2007, at 1:40 PM, Robbie Byron wrote:
      > I am looking for a way to change one opengl scene to another but
      > can't find a way of removing opengl content to make way for
      > anything new. For example, I can easily xfade out old stuff with
      > those gl objects that accept a [matrixout 1] message, but for those
      > that don't, like jit.gl.gridshape or jit.gl.mesh, there doesn't
      > seem to be a way.
      >
      > Any ideas? Many thanks, Robbie.
      >
    • Sep 19 2007 | 6:03 pm
      On Sep 19, 2007, at 10:46 AM, joshua goldberg wrote:
      > with @blend_enable 1, fade the alpha color of the departing object
      > to 0.
      Caveat: This is sensitive to @depth_enable which is on by default...
      Otherwise render to texture and crossfade two videoplanes, which is
      tricky, but there are some examples on the list that may be of
      assistance.
      -Joshua
    • Oct 20 2007 | 5:15 pm
      I am trying to fade out jit.gl.nurbs, without using the
      matrixoutput/xfade option. As far as I can tell, the below patch should
      fade out the nurbs when the alpha color message is brought to 0.... but
      it doesn't.....
      Any ideas why? And if not, does anyone have any other ideas how to fade
      out a jit.gl.nurbs scene from the renderer? Thanks! Robbie
      #P window setfont "Sans Serif" 9.;
      #P flonum 238 544 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      #P toggle 193 601 15 0;
      #P window linecount 1;
      #P message 193 619 55 196617 floating $1;
      #P flonum 373 431 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      #P flonum 324 592 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      #P flonum 275 571 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      #P newex 253 618 117 196617 pak color 0.31 0.5 0.54;
      #P flonum 501 519 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      #P flonum 463 519 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      #P flonum 423 519 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      #P newex 398 546 85 196617 pak scale 1. 1. 1.;
      #P newex 367 641 50 196617 s nurby1;
      #P flonum 520 567 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      #P flonum 482 567 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      #P flonum 442 567 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      #P newex 414 591 95 196617 pak position 0. 0. 0.;
      #P toggle 111 600 15 0;
      #P newex 72 599 35 196617 sel 27;
      #P message 111 618 68 196617 fullscreen $1;
      #P newex 29 642 194 196617 jit.window foo @depthbuffer 1 @interp 1;
      #P newex 27 599 40 196617 key;
      #P number 533 269 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      #P message 533 287 63 196617 order $1 $1;
      #P number 478 269 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      #P message 478 287 54 196617 dim $1 $1;
      #P newex 427 286 50 196617 r nurby1;
      #P number 395 222 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      #P message 395 243 54 196617 dim $1 $1;
      #P button 334 239 15 0;
      #P newex 334 266 110 196617 jit.noise 3 float32 8 8;
      #P newex 257 169 43 196617 jit.qball;
      #P number 302 131 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      #P toggle 257 123 15 0;
      #P newex 257 149 55 196617 metro 20;
      #P newex 257 189 66 196617 t b erase b b;
      #P window linecount 2;
      #P newex 334 313 236 196617 jit.gl.nurbs foo @smooth_shading 1
      @blend_enable 1 @depth_enable 1 @lighting_enable 1;
      #P window linecount 1;
      #P newex 257 358 80 196617 jit.gl.render foo;
      #P newex 334 286 89 196617 prepend ctlmatrix;
      #P window linecount 4;
      #P comment 418 433 100 196617 if this (the alpha channel) is 0. shoudlnt
      the nurb disappear?;
      #P user panel 363 420 171 72;
      #X brgb 191 191 191;
      #X frgb 0 0 0;
      #X border 1;
      #X rounded 0;
      #X shadow 0;
      #X done;
      #P fasten 21 0 20 0 116 637 34 637;
      #P fasten 37 0 20 0 198 637 34 637;
      #P fasten 19 0 22 0 32 618 69 618 69 597 77 597;
      #P fasten 22 0 23 0 77 617 108 617 108 597 116 597;
      #P connect 23 0 21 0;
      #P connect 38 0 37 0;
      #P connect 39 0 33 0;
      #P connect 7 0 6 0;
      #P connect 6 0 9 0;
      #P connect 9 0 5 0;
      #P connect 5 0 3 0;
      #P fasten 5 1 3 0 280 221 262 221;
      #P fasten 4 0 3 0 339 350 262 350;
      #P connect 34 0 33 1;
      #P connect 8 0 6 1;
      #P fasten 35 0 33 2 329 612 328 612;
      #P fasten 5 2 11 0 298 222 339 222;
      #P connect 11 0 10 0;
      #P fasten 12 0 10 0 400 262 339 262;
      #P connect 10 0 2 0;
      #P connect 2 0 4 0;
      #P fasten 14 0 4 0 432 306 339 306;
      #P fasten 17 0 4 0 538 309 339 309;
      #P fasten 15 0 4 0 483 309 339 309;
      #P fasten 36 0 33 3 378 612 363 612;
      #P fasten 33 0 28 0 258 638 372 638;
      #P fasten 29 0 28 0 403 636 372 636;
      #P fasten 24 0 28 0 419 636 372 636;
      #P connect 13 0 12 0;
      #P connect 30 0 29 1;
      #P connect 25 0 24 1;
      #P fasten 31 0 29 2 468 540 453 540;
      #P fasten 26 0 24 2 487 586 475 586;
      #P fasten 32 0 29 3 506 540 478 540;
      #P connect 16 0 15 0;
      #P fasten 27 0 24 3 525 586 503 586;
      #P connect 18 0 17 0;
      #P window clipboard copycount 40;
      >
      >
    • Oct 20 2007 | 6:01 pm
      Your pack color is wrong add one more 0. inside pack as shown inside
      the corrected patch
      max v2;
    • Oct 20 2007 | 6:04 pm
      There problem is with pak. It should be "pak color 1. 1. 1. 1." which
      will give 5 inlets. The first inlet will change "color," 2-4 will be
      R, G, B values, and the last will be alpha. As of right now, you're
      not sending any alpha values. (Patch below)
      Keith
      On 10/20/07, Robbie Byron wrote:
      > I am trying to fade out jit.gl.nurbs, without using the
      > matrixoutput/xfade option. As far as I can tell, the below patch should
      > fade out the nurbs when the alpha color message is brought to 0.... but
      > it doesn't.....
      >
      > Any ideas why? And if not, does anyone have any other ideas how to fade
      > out a jit.gl.nurbs scene from the renderer? Thanks! Robbie
      >
      > #P window setfont "Sans Serif" 9.;
      > #P flonum 238 544 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P toggle 193 601 15 0;
      > #P window linecount 1;
      > #P message 193 619 55 196617 floating $1;
      > #P flonum 373 431 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P flonum 324 592 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P flonum 275 571 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P newex 253 618 117 196617 pak color 0.31 0.5 0.54;
      > #P flonum 501 519 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P flonum 463 519 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P flonum 423 519 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P newex 398 546 85 196617 pak scale 1. 1. 1.;
      > #P newex 367 641 50 196617 s nurby1;
      > #P flonum 520 567 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P flonum 482 567 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P flonum 442 567 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P newex 414 591 95 196617 pak position 0. 0. 0.;
      > #P toggle 111 600 15 0;
      > #P newex 72 599 35 196617 sel 27;
      > #P message 111 618 68 196617 fullscreen $1;
      > #P newex 29 642 194 196617 jit.window foo @depthbuffer 1 @interp 1;
      > #P newex 27 599 40 196617 key;
      > #P number 533 269 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P message 533 287 63 196617 order $1 $1;
      > #P number 478 269 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P message 478 287 54 196617 dim $1 $1;
      > #P newex 427 286 50 196617 r nurby1;
      > #P number 395 222 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P message 395 243 54 196617 dim $1 $1;
      > #P button 334 239 15 0;
      > #P newex 334 266 110 196617 jit.noise 3 float32 8 8;
      > #P newex 257 169 43 196617 jit.qball;
      > #P number 302 131 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P toggle 257 123 15 0;
      > #P newex 257 149 55 196617 metro 20;
      > #P newex 257 189 66 196617 t b erase b b;
      > #P window linecount 2;
      > #P newex 334 313 236 196617 jit.gl.nurbs foo @smooth_shading 1
      > @blend_enable 1 @depth_enable 1 @lighting_enable 1;
      > #P window linecount 1;
      > #P newex 257 358 80 196617 jit.gl.render foo;
      > #P newex 334 286 89 196617 prepend ctlmatrix;
      > #P window linecount 4;
      > #P comment 418 433 100 196617 if this (the alpha channel) is 0. shoudlnt
      > the nurb disappear?;
      > #P user panel 363 420 171 72;
      > #X brgb 191 191 191;
      > #X frgb 0 0 0;
      > #X border 1;
      > #X rounded 0;
      > #X shadow 0;
      > #X done;
      > #P fasten 21 0 20 0 116 637 34 637;
      > #P fasten 37 0 20 0 198 637 34 637;
      > #P fasten 19 0 22 0 32 618 69 618 69 597 77 597;
      > #P fasten 22 0 23 0 77 617 108 617 108 597 116 597;
      > #P connect 23 0 21 0;
      > #P connect 38 0 37 0;
      > #P connect 39 0 33 0;
      > #P connect 7 0 6 0;
      > #P connect 6 0 9 0;
      > #P connect 9 0 5 0;
      > #P connect 5 0 3 0;
      > #P fasten 5 1 3 0 280 221 262 221;
      > #P fasten 4 0 3 0 339 350 262 350;
      > #P connect 34 0 33 1;
      > #P connect 8 0 6 1;
      > #P fasten 35 0 33 2 329 612 328 612;
      > #P fasten 5 2 11 0 298 222 339 222;
      > #P connect 11 0 10 0;
      > #P fasten 12 0 10 0 400 262 339 262;
      > #P connect 10 0 2 0;
      > #P connect 2 0 4 0;
      > #P fasten 14 0 4 0 432 306 339 306;
      > #P fasten 17 0 4 0 538 309 339 309;
      > #P fasten 15 0 4 0 483 309 339 309;
      > #P fasten 36 0 33 3 378 612 363 612;
      > #P fasten 33 0 28 0 258 638 372 638;
      > #P fasten 29 0 28 0 403 636 372 636;
      > #P fasten 24 0 28 0 419 636 372 636;
      > #P connect 13 0 12 0;
      > #P connect 30 0 29 1;
      > #P connect 25 0 24 1;
      > #P fasten 31 0 29 2 468 540 453 540;
      > #P fasten 26 0 24 2 487 586 475 586;
      > #P fasten 32 0 29 3 506 540 478 540;
      > #P connect 16 0 15 0;
      > #P fasten 27 0 24 3 525 586 503 586;
      > #P connect 18 0 17 0;
      > #P window clipboard copycount 40;
      > >
      > >
      >
    • Nov 14 2007 | 8:14 pm
      hi
      If your using a jit.gl.sketch instead of nurbs this way of fading does not seem to work i.e. fading the sketch out. How do you make gl shapes that have been drawn into a sketch fade out?
      a+
      gar
    • Nov 14 2007 | 10:40 pm
      enable blend_enable on the gl.sketch and use the message glcolor r g b a before drawing your shapes