newbi question – xfading between nurbs

Aug 15, 2007 at 5:59pm

newbi question – xfading between nurbs

If I want to fade between 2 jit.gl.nurbs using jit.xfade (having
matrixoutput to 1 on both) should I use 2 jit.gl.gridshapes? I have been
trying to modify the tutorial no 37 but arent having any luck…. Robert

#33269
Aug 15, 2007 at 7:57pm

It’s pretty straight forward. If you got that tutorial, this is easy.
I thought it may have problems with different dims and orders, but
that’s fine. If you attach a patch, we can see where you may have
went wrong.

Email with questions,
Keith

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 273 348 101 196617 jit.op @op + @val 0.;
#P flonum 308 262 35 9 0. 1. 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 308 283 48 196617 xfade $1;
#P number 787 34 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 787 55 54 196617 dim $1 $1;
#P button 726 51 15 0;
#P newex 726 78 108 196617 jit.noise 3 float32 4 4;
#P newex 726 107 89 196617 prepend ctlmatrix;
#P newex 273 320 49 196617 jit.xfade;
#P newex 458 259 156 196617 jit.gl.nurbs foo @matrixoutput 1;
#B color 5;
#P toggle 536 590 15 0;
#P message 536 608 55 196617 floating $1;
#P toggle 368 498 15 0;
#P flonum 302 532 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 264 532 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 224 532 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 193 558 103 196617 pak color 0.5 0.5 0.5;
#P flonum 857 483 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 819 483 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 779 483 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 754 510 85 196617 pak scale 1. 1. 1.;
#P newex 307 581 42 196617 s nurby;
#P flonum 876 531 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 838 531 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 798 531 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P toggle 496 534 15 0;
#P message 496 557 94 196617 smooth_shading $1;
#P toggle 595 534 15 0;
#P message 595 557 90 196617 lighting_enable $1;
#P toggle 141 538 15 0;
#P message 141 559 44 196617 axes $1;
#P toggle 389 534 15 0;
#P toggle 348 534 15 0;
#P newex 307 558 92 196617 pak poly_mode 0 0;
#P hidden newex 536 491 50 196617 loadbang;
#P toggle 408 534 15 0;
#P message 408 557 81 196617 depth_enable $1;
#P hidden message 536 513 14 196617 1;
#P newex 770 555 95 196617 pak position 0. 0. 0.;
#P toggle 454 589 15 0;
#P newex 415 588 35 196617 sel 27;
#P message 454 607 68 196617 fullscreen $1;
#P newex 372 631 145 196617 jit.window foo @depthbuffer 1;
#P newex 370 588 40 196617 key;
#P number 178 87 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 178 115 63 196617 order $1 $1;
#P number 119 87 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 119 115 54 196617 dim $1 $1;
#P newex 288 171 42 196617 r nurby;
#P user jit.fpsgui 73 193 60 196617 0;
#P window linecount 3;
#P comment 507 35 131 196617 1st and second ctlmatrices bang here;
#P number 662 38 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P message 662 59 54 196617 dim $1 $1;
#P button 601 55 15 0;
#P newex 601 82 108 196617 jit.noise 3 float32 4 4;
#P newex 29 136 43 196617 jit.qball;
#P number 74 87 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P toggle 29 87 15 0;
#P newex 29 113 55 196617 metro 20;
#P newex 29 167 55 196617 t b erase b;
#P newex 210 228 156 196617 jit.gl.nurbs foo @matrixoutput 1;
#B color 5;
#P newex 29 388 80 196617 jit.gl.render foo;
#P newex 601 111 89 196617 prepend ctlmatrix;
#P comment 389 498 100 196617 draw as mesh;
#P connect 6 0 5 0;
#P connect 5 0 8 0;
#P connect 8 0 4 0;
#P connect 4 0 2 0;
#P fasten 4 1 2 0 56 195 34 195;
#P fasten 63 0 2 0 278 370 34 370;
#P connect 4 2 14 0;
#P connect 7 0 5 1;
#P connect 17 0 16 0;
#P connect 34 0 33 0;
#P connect 19 0 18 0;
#P hidden fasten 1 0 3 0 606 140 215 140;
#P fasten 15 0 3 0 293 208 215 208;
#P fasten 16 0 3 0 124 179 215 179;
#P fasten 18 0 3 0 183 179 215 179;
#P connect 48 0 47 1;
#P fasten 49 0 47 2 269 552 260 552;
#P connect 3 0 55 0;
#P connect 61 0 55 0;
#P connect 55 0 63 0;
#P fasten 50 0 47 3 307 552 291 552;
#P fasten 47 0 42 0 198 578 312 578;
#P fasten 27 0 42 0 413 576 312 576;
#P fasten 30 0 42 0 312 578 312 578;
#P fasten 37 0 42 0 501 576 312 576;
#P fasten 35 0 42 0 600 576 312 576;
#P fasten 33 0 42 0 146 578 312 578;
#P fasten 25 0 42 0 775 576 312 576;
#P fasten 43 0 42 0 759 576 312 576;
#P connect 62 0 61 0;
#P connect 54 0 55 1;
#P fasten 51 0 31 0 373 523 353 523;
#P connect 31 0 30 1;
#P fasten 52 0 21 0 541 626 377 626;
#P fasten 22 0 21 0 459 626 377 626;
#P fasten 51 0 32 0 373 523 394 523;
#P connect 32 0 30 2;
#P hidden fasten 26 0 28 0 541 531 413 531;
#P connect 28 0 27 0;
#P fasten 20 0 23 0 375 607 412 607 412 586 420 586;
#P fasten 23 0 24 0 420 606 451 606 451 586 459 586;
#P connect 24 0 22 0;
#P connect 56 0 54 0;
#P hidden fasten 26 0 38 0 541 531 501 531;
#P connect 38 0 37 0;
#P hidden connect 29 0 26 0;
#P connect 53 0 52 0;
#P hidden fasten 26 0 36 0 541 531 600 531;
#P connect 36 0 35 0;
#P fasten 11 0 9 0 667 78 606 78;
#P connect 10 0 9 0;
#P connect 9 0 1 0;
#P connect 12 0 11 0;
#P connect 58 0 57 0;
#P fasten 59 0 57 0 792 74 731 74;
#P connect 57 0 56 0;
#P connect 44 0 43 1;
#P connect 60 0 59 0;
#P connect 39 0 25 1;
#P fasten 45 0 43 2 824 504 809 504;
#P fasten 40 0 25 2 843 550 831 550;
#P fasten 46 0 43 3 862 504 834 504;
#P fasten 41 0 25 3 881 550 859 550;

On 8/15/07, robbie b wrote:
> If I want to fade between 2 jit.gl.nurbs using jit.xfade (having
> matrixoutput to 1 on both) should I use 2 jit.gl.gridshapes? I have been
> trying to modify the tutorial no 37 but arent having any luck…. Robert
>
>
>

#110617
Aug 20, 2007 at 12:47am

Thanks Keith-

I did have a quick question: how come the pak object for the left xfade
nurb, through [s nurby], controls both nurb positions? Shouldnt the [pak
position] object attached to the right nurb be in control of that nurb when
xfade receives a [xfade 1] message? EG below:

#P window setfont “Sans Serif” 24.;
#P window linecount 1;
#P comment 874 541 52 196632 ??;
#P button 756 260 15 0;
#P window setfont “Sans Serif” 9.;
#P newex 580 302 44 196617 r nurdy;
#P button 473 263 15 0;
#P newex 473 282 110 196617 jit.noise 3 float32 9 9;
#P newex 473 325 156 196617 jit.gl.nurbs foo @matrixoutput 1;
#B color 5;
#P newex 473 302 89 196617 prepend ctlmatrix;
#P newex 755 322 44 196617 s nurdy;
#P flonum 861 259 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 823 259 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 783 259 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 755 283 116 196617 pak position 0. -0.73 0.;
#P newex 306 423 101 196617 jit.op @op + @val 0.;
#P flonum 324 352 35 9 0. 1. 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 324 373 48 196617 xfade $1;
#P newex 306 403 49 196617 jit.xfade;
#P toggle 596 650 15 0;
#P message 596 668 55 196617 floating $1;
#P flonum 362 592 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 284 592 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 253 618 103 196617 pak color 0.5 0.5 0.5;
#P flonum 788 527 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 750 527 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 710 527 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 685 554 85 196617 pak scale 1. 1. 1.;
#P newex 367 641 42 196617 s nurby;
#P flonum 936 591 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 898 591 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 858 591 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P toggle 556 594 15 0;
#P message 556 617 94 196617 smooth_shading $1;
#P toggle 655 594 15 0;
#P message 655 617 90 196617 lighting_enable $1;
#P hidden newex 596 551 50 196617 loadbang;
#P toggle 468 594 15 0;
#P message 468 617 81 196617 depth_enable $1;
#P hidden message 596 573 14 196617 1;
#P newex 830 615 133 196617 pak position -0.55 -0.55 0.;
#P toggle 514 649 15 0;
#P newex 475 648 35 196617 sel 27;
#P message 514 667 68 196617 fullscreen $1;
#P newex 432 691 145 196617 jit.window foo @depthbuffer 1;
#P newex 430 648 40 196617 key;
#P newex 414 303 42 196617 r nurby;
#P button 306 264 15 0;
#P newex 306 283 108 196617 jit.noise 3 float32 4 4;
#P newex 88 209 43 196617 jit.qball;
#P number 133 165 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P toggle 88 165 15 0;
#P newex 88 191 55 196617 metro 20;
#P newex 88 229 113 196617 t b erase b b b;
#P newex 306 326 156 196617 jit.gl.nurbs foo @matrixoutput 1;
#B color 5;
#P newex 88 453 80 196617 jit.gl.render foo;
#P newex 306 303 89 196617 prepend ctlmatrix;
#P window setfont “Sans Serif” 24.;
#P comment 756 212 26 196632 ?;
#P connect 6 0 5 0;
#P connect 5 0 8 0;
#P connect 8 0 4 0;
#P fasten 43 0 2 0 311 445 93 445;
#P connect 4 0 2 0;
#P fasten 4 1 2 0 118 255 93 255;
#P connect 7 0 5 1;
#P connect 35 0 34 1;
#P fasten 4 2 10 0 143 257 311 257;
#P connect 10 0 9 0;
#P connect 9 0 1 0;
#P fasten 11 0 3 0 419 323 311 323;
#P connect 1 0 3 0;
#P connect 3 0 40 0;
#P fasten 41 0 40 0 329 399 311 399;
#P connect 40 0 43 0;
#P fasten 36 0 34 2 329 612 320 612;
#P connect 42 0 41 0;
#P fasten 50 0 40 1 478 398 350 398;
#P fasten 37 0 34 3 367 612 351 612;
#P fasten 34 0 29 0 258 638 372 638;
#P fasten 19 0 29 0 473 636 372 636;
#P fasten 24 0 29 0 561 636 372 636;
#P fasten 22 0 29 0 660 636 372 636;
#P fasten 30 0 29 0 690 636 372 636;
#P fasten 17 0 29 0 835 636 372 636;
#P fasten 38 0 13 0 601 686 437 686;
#P fasten 14 0 13 0 519 686 437 686;
#P hidden fasten 18 0 20 0 601 591 473 591;
#P connect 20 0 19 0;
#P connect 4 3 52 0;
#P connect 52 0 51 0;
#P connect 51 0 49 0;
#P connect 49 0 50 0;
#P fasten 53 0 50 0 585 322 478 322;
#P fasten 12 0 15 0 435 667 472 667 472 646 480 646;
#P fasten 15 0 16 0 480 666 511 666 511 646 519 646;
#P connect 16 0 14 0;
#P hidden fasten 18 0 25 0 601 591 561 591;
#P connect 25 0 24 0;
#P hidden connect 21 0 18 0;
#P connect 39 0 38 0;
#P hidden fasten 18 0 23 0 601 591 660 591;
#P connect 23 0 22 0;
#P connect 31 0 30 1;
#P fasten 32 0 30 2 755 548 740 548;
#P connect 54 0 44 0;
#P connect 44 0 48 0;
#P fasten 4 4 54 0 193 253 761 253;
#P fasten 33 0 30 3 793 548 765 548;
#P connect 45 0 44 1;
#P fasten 46 0 44 2 828 278 830 278;
#P fasten 47 0 44 3 866 278 865 278;
#P connect 26 0 17 1;
#P fasten 27 0 17 2 903 610 917 610;
#P fasten 28 0 17 3 941 610 958 610;
#P window clipboard copycount 56;

On 8/15/07, keith manlove wrote:
>
> It’s pretty straight forward. If you got that tutorial, this is easy.
> I thought it may have problems with different dims and orders, but
> that’s fine. If you attach a patch, we can see where you may have
> went wrong.
>
> Email with questions,
> Keith
>
> #P window setfont “Sans Serif” 9.;
> #P window linecount 1;
> #P newex 273 348 101 196617 jit.op @op + @val 0.;
> #P flonum 308 262 35 9 0. 1. 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P message 308 283 48 196617 xfade $1;
> #P number 787 34 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P message 787 55 54 196617 dim $1 $1;
> #P button 726 51 15 0;
> #P newex 726 78 108 196617 jit.noise 3 float32 4 4;
> #P newex 726 107 89 196617 prepend ctlmatrix;
> #P newex 273 320 49 196617 jit.xfade;
> #P newex 458 259 156 196617 jit.gl.nurbs foo @matrixoutput 1;
> #B color 5;
> #P toggle 536 590 15 0;
> #P message 536 608 55 196617 floating $1;
> #P toggle 368 498 15 0;
> #P flonum 302 532 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 264 532 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 224 532 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 193 558 103 196617 pak color 0.5 0.5 0.5;
> #P flonum 857 483 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 819 483 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 779 483 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 754 510 85 196617 pak scale 1. 1. 1.;
> #P newex 307 581 42 196617 s nurby;
> #P flonum 876 531 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 838 531 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 798 531 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P toggle 496 534 15 0;
> #P message 496 557 94 196617 smooth_shading $1;
> #P toggle 595 534 15 0;
> #P message 595 557 90 196617 lighting_enable $1;
> #P toggle 141 538 15 0;
> #P message 141 559 44 196617 axes $1;
> #P toggle 389 534 15 0;
> #P toggle 348 534 15 0;
> #P newex 307 558 92 196617 pak poly_mode 0 0;
> #P hidden newex 536 491 50 196617 loadbang;
> #P toggle 408 534 15 0;
> #P message 408 557 81 196617 depth_enable $1;
> #P hidden message 536 513 14 196617 1;
> #P newex 770 555 95 196617 pak position 0. 0. 0.;
> #P toggle 454 589 15 0;
> #P newex 415 588 35 196617 sel 27;
> #P message 454 607 68 196617 fullscreen $1;
> #P newex 372 631 145 196617 jit.window foo @depthbuffer 1;
> #P newex 370 588 40 196617 key;
> #P number 178 87 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P message 178 115 63 196617 order $1 $1;
> #P number 119 87 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P message 119 115 54 196617 dim $1 $1;
> #P newex 288 171 42 196617 r nurby;
> #P user jit.fpsgui 73 193 60 196617 0;
> #P window linecount 3;
> #P comment 507 35 131 196617 1st and second ctlmatrices bang here;
> #P number 662 38 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P window linecount 1;
> #P message 662 59 54 196617 dim $1 $1;
> #P button 601 55 15 0;
> #P newex 601 82 108 196617 jit.noise 3 float32 4 4;
> #P newex 29 136 43 196617 jit.qball;
> #P number 74 87 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P toggle 29 87 15 0;
> #P newex 29 113 55 196617 metro 20;
> #P newex 29 167 55 196617 t b erase b;
> #P newex 210 228 156 196617 jit.gl.nurbs foo @matrixoutput 1;
> #B color 5;
> #P newex 29 388 80 196617 jit.gl.render foo;
> #P newex 601 111 89 196617 prepend ctlmatrix;
> #P comment 389 498 100 196617 draw as mesh;
> #P connect 6 0 5 0;
> #P connect 5 0 8 0;
> #P connect 8 0 4 0;
> #P connect 4 0 2 0;
> #P fasten 4 1 2 0 56 195 34 195;
> #P fasten 63 0 2 0 278 370 34 370;
> #P connect 4 2 14 0;
> #P connect 7 0 5 1;
> #P connect 17 0 16 0;
> #P connect 34 0 33 0;
> #P connect 19 0 18 0;
> #P hidden fasten 1 0 3 0 606 140 215 140;
> #P fasten 15 0 3 0 293 208 215 208;
> #P fasten 16 0 3 0 124 179 215 179;
> #P fasten 18 0 3 0 183 179 215 179;
> #P connect 48 0 47 1;
> #P fasten 49 0 47 2 269 552 260 552;
> #P connect 3 0 55 0;
> #P connect 61 0 55 0;
> #P connect 55 0 63 0;
> #P fasten 50 0 47 3 307 552 291 552;
> #P fasten 47 0 42 0 198 578 312 578;
> #P fasten 27 0 42 0 413 576 312 576;
> #P fasten 30 0 42 0 312 578 312 578;
> #P fasten 37 0 42 0 501 576 312 576;
> #P fasten 35 0 42 0 600 576 312 576;
> #P fasten 33 0 42 0 146 578 312 578;
> #P fasten 25 0 42 0 775 576 312 576;
> #P fasten 43 0 42 0 759 576 312 576;
> #P connect 62 0 61 0;
> #P connect 54 0 55 1;
> #P fasten 51 0 31 0 373 523 353 523;
> #P connect 31 0 30 1;
> #P fasten 52 0 21 0 541 626 377 626;
> #P fasten 22 0 21 0 459 626 377 626;
> #P fasten 51 0 32 0 373 523 394 523;
> #P connect 32 0 30 2;
> #P hidden fasten 26 0 28 0 541 531 413 531;
> #P connect 28 0 27 0;
> #P fasten 20 0 23 0 375 607 412 607 412 586 420 586;
> #P fasten 23 0 24 0 420 606 451 606 451 586 459 586;
> #P connect 24 0 22 0;
> #P connect 56 0 54 0;
> #P hidden fasten 26 0 38 0 541 531 501 531;
> #P connect 38 0 37 0;
> #P hidden connect 29 0 26 0;
> #P connect 53 0 52 0;
> #P hidden fasten 26 0 36 0 541 531 600 531;
> #P connect 36 0 35 0;
> #P fasten 11 0 9 0 667 78 606 78;
> #P connect 10 0 9 0;
> #P connect 9 0 1 0;
> #P connect 12 0 11 0;
> #P connect 58 0 57 0;
> #P fasten 59 0 57 0 792 74 731 74;
> #P connect 57 0 56 0;
> #P connect 44 0 43 1;
> #P connect 60 0 59 0;
> #P connect 39 0 25 1;
> #P fasten 45 0 43 2 824 504 809 504;
> #P fasten 40 0 25 2 843 550 831 550;
> #P fasten 46 0 43 3 862 504 834 504;
> #P fasten 41 0 25 3 881 550 859 550;
>
> On 8/15/07, robbie b wrote:
> > If I want to fade between 2 jit.gl.nurbs using jit.xfade (having
> > matrixoutput to 1 on both) should I use 2 jit.gl.gridshapes? I have been
> > trying to modify the tutorial no 37 but arent having any luck…. Robert
> >
> >
> >
>

#110618

You must be logged in to reply to this topic.