morphing text in openGL

May 26, 2006 at 6:43pm

morphing text in openGL

#26170
May 26, 2006 at 7:23pm

Hello,
Try changing your drawing primitive. Since the matrix output of
jit.gl.text3d is one-dimensional, the tri_grid primitive will not work
very well. Try out others, such as triangles,quads, or tri_strip, and
see what works for you.

Another thing that is causing trouble is that different letters will use
different sized matrix outputs. This will lead to strange discrepancies
in the second letter shape, as the jit.xfade object will scale and
interpolate the second input.

Cheers,
Andrew B.

#77826
May 27, 2006 at 5:16am

#77827
Sep 13, 2007 at 8:40pm

this works for letters, but words are another thing…

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P message 323 130 32 196617 Hello;
#P message 404 130 14 196617 c;
#P comment 113 304 94 196617 morph it;
#P user jit.fpsgui 255 386 60 196617 3;
#P newex 373 98 48 196617 loadbang;
#P newex 569 438 27 196617 + 1;
#P newex 609 439 27 196617 + 1;
#P user jit.fpsgui 178 360 60 196617 3;
#P newex 608 460 29 196617 t 0 i;
#P newex 569 510 64 196617 prepend dim;
#P newex 584 484 64 196617 prepend dim;
#P newex 174 299 27 196617 t l b;
#P newex 216 304 100 196617 jit.matrix 8 float32;
#P newex 172 324 53 196617 jit.concat;
#P newex 571 460 29 196617 t 0 i;
#P newex 570 402 47 196617 gate 2 1;
#P newex 314 427 60 196617 loadmess 5;
#P newex 570 383 27 196617 + 1;
#P newex 570 363 27 196617 > 0;
#P newex 348 287 27 196617 t l b;
#P number 615 350 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 494 320 58 196617 unpack 0 0;
#P newex 494 301 53 196617 route dim;
#P newex 494 278 70 196617 jit.matrixinfo;
#P newex 571 342 27 196617 -;
#P newex 570 320 58 196617 unpack 0 0;
#P newex 390 292 100 196617 jit.matrix 8 float32;
#P newex 570 301 53 196617 route dim;
#P newex 570 278 70 196617 jit.matrixinfo;
#P newex 346 312 53 196617 jit.concat;
#P user jit.fpsgui 337 360 60 196617 3;
#P user jit.fpsgui 303 205 60 196617 3;
#P user jit.fpsgui 542 207 60 196617 3;
#P user ubumenu 314 447 68 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 prefix_set 0 0 0;
#P comment 383 449 94 196617 choose a primitive.;
#P flonum 539 64 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 501 64 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 465 84 107 196617 pak scale 1. 1. 1.;
#P flonum 465 64 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 246 50 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 208 50 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 172 70 107 196617 pak scale 1. 1. 1.;
#P flonum 172 50 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 377 132 14 196617 b;
#P newex 376 165 67 196617 prepend text;
#P newex 376 189 228 196617 jit.gl.text3D showme @matrixoutput 1 @depth 0;
#P flonum 76 302 35 9 0. 1. 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 76 327 48 196617 xfade $1;
#P newex 260 359 52 196617 jit.xfade;
#P message 295 115 14 196617 a;
#P newex 266 156 67 196617 prepend text;
#P newex 134 187 228 196617 jit.gl.text3d showme @matrixoutput 1 @depth 0;
#P user jit.fpsgui 76 99 60 196617 1;
#P number 19 22 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P toggle 1 23 15 0;
#P newex 277 470 99 196617 jit.gl.render showme;
#N vpatcher 29 88 504 367;
#P origin 44 0;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 188 78 31 196617 == 0;
#P window linecount 0;
#P message 177 97 87 196617 ; jitter cursor $1;
#P newex 86 33 48 196617 loadbang;
#P newex 87 53 80 196617 patcherargs ms;
#P outlet 36 172 15 0;
#P newex 70 126 236 196617 jit.window showme @fsmenubar 0 @depthbuffer 1;
#P toggle 166 68 15 0;
#P newex 113 82 35 196617 sel 27;
#P newex 68 82 40 196617 key;
#P newex 68 104 91 196617 prepend fullscreen;
#P newex 0 97 43 196617 jit.qball;
#P newex 0 74 55 196617 metro 20;
#P newex 0 128 66 196617 t b b b erase;
#P inlet 0 52 15 0;
#P inlet 45 53 15 0;
#P outlet 0 172 15 0;
#P outlet 18 172 15 0;
#P connect 3 0 5 0;
#P connect 5 0 6 0;
#P connect 6 0 4 0;
#P connect 4 0 1 0;
#P fasten 4 3 1 0 59 158 5 158;
#P connect 4 1 0 0;
#P connect 4 2 12 0;
#P connect 2 0 5 1;
#P fasten 13 1 5 1 162 71 50 71;
#P fasten 10 0 7 0 171 102 73 102;
#P connect 7 0 11 0;
#P connect 14 0 13 0;
#P fasten 8 0 9 0 73 101 110 101 110 80 118 80;
#P fasten 9 0 10 0 118 100 149 100 149 80 171 80;
#P connect 16 0 15 0;
#P connect 10 0 16 0;
#P pop;
#P newobj 1 61 131 196617 p @ms 20;
#P connect 2 0 0 0;
#P fasten 0 1 4 0 66 83 81 83;
#P connect 10 0 9 0;
#P fasten 3 0 0 1 24 53 127 53;
#P connect 15 0 5 0;
#P connect 6 0 5 0;
#P connect 45 0 43 0;
#P connect 5 0 45 0;
#P connect 43 0 49 0;
#P fasten 14 0 15 1 177 67 209 67;
#P connect 44 0 43 1;
#P connect 46 0 44 0;
#P connect 45 1 44 0;
#P fasten 16 0 15 2 213 67 241 67;
#P connect 8 0 53 0;
#P connect 43 0 8 0;
#P connect 9 0 8 0;
#P connect 56 0 6 0;
#P connect 7 0 6 0;
#P fasten 17 0 15 3 251 67 273 67;
#P connect 8 0 1 0;
#P connect 23 1 1 0;
#P connect 0 0 1 0;
#P connect 52 0 7 0;
#P connect 27 0 8 1;
#P connect 5 0 25 0;
#P connect 40 0 23 0;
#P connect 27 0 26 0;
#P connect 37 0 27 0;
#P connect 11 0 37 0;
#P connect 55 0 12 0;
#P connect 13 0 12 0;
#P connect 19 0 11 0;
#P connect 12 0 11 0;
#P connect 52 0 13 0;
#P connect 30 0 27 1;
#P connect 47 0 30 0;
#P connect 37 1 30 0;
#P connect 5 0 33 0;
#P connect 33 0 34 0;
#P connect 34 0 35 0;
#P fasten 18 0 19 1 470 81 502 81;
#P fasten 20 0 19 2 506 81 534 81;
#P connect 11 0 24 0;
#P fasten 21 0 19 3 544 81 566 81;
#P connect 41 0 51 0;
#P connect 48 1 47 0;
#P connect 42 0 47 0;
#P connect 11 0 28 0;
#P connect 28 0 29 0;
#P connect 29 0 31 0;
#P connect 32 0 38 0;
#P connect 38 0 39 0;
#P connect 39 0 41 0;
#P connect 35 0 32 0;
#P connect 51 0 42 0;
#P connect 48 0 46 0;
#P connect 42 1 46 0;
#P connect 31 0 32 1;
#P connect 32 0 41 1;
#P connect 50 0 48 0;
#P connect 41 1 50 0;
#P connect 32 0 36 0;
#P window clipboard copycount 57;

#77828
Sep 13, 2007 at 8:58pm

#77829

You must be logged in to reply to this topic.