Forums > Jitter

animating text/ text following curves

November 3, 2006 | 3:06 pm

Is there a way to make text follow curves/shapes, or do similar things as path text does in after effects, or livetype?

I havent been able to find any references to this in the archive or elsewhere.

thanks,

hc


November 3, 2006 | 4:50 pm

Perhaps using NURBS as a stroke/curve with a a texture that moves
because its texcoords are being offset with tex_plane_s/t?

wes

On 11/3/06, hc gilje wrote:
>
> Is there a way to make text follow curves/shapes, or do similar things as path text does in after effects, or livetype?
>
> I havent been able to find any references to this in the archive or elsewhere.
>
> thanks,
>
> hc
>
>
>


November 3, 2006 | 7:33 pm

Can you discribe a bit more what you mean?
Do you mean tracking edges of shapes and putting text at these
coordinates?

Falk
Am 03.11.2006 um 16:06 schrieb hc gilje:

> Is there a way to make text follow curves/shapes, or do similar things
> as path text does in after effects, or livetype?


November 3, 2006 | 9:44 pm

no,
I want to create defined curves, for instance a circle, as a path for the text, but I need to be able to change the paramaters for the curve/shape/circle. For instance a small circle growing into a bigger circle and rotating.
dont know if this was clearer?


November 3, 2006 | 10:30 pm

It’s pretty hard, since the text2d-3d objects "just" typeset in rows
and columns. If I had to do it with 3d text, I’d start by getting
each letter as a matrix from jit.gl.text3d into a Javascript, then
use JS to move the matrices along the curve. Actually that’s such a
pain, what I’d really do is write a new external in C. Depending on
your project, maybe you can render the texts in some other program
and use the .obj / SVG / Flash into / under / alongside of Jitter.

-Randy

On Nov 3, 2006, at 1:44 PM, hc gilje wrote:

>
> no,
> I want to create defined curves, for instance a circle, as a path
> for the text, but I need to be able to change the paramaters for
> the curve/shape/circle. For instance a small circle growing into a
> bigger circle and rotating.
> dont know if this was clearer?
>


November 4, 2006 | 12:13 am

ok, just wanted to make sure I wasnt missing an obvious solution. It seems I will stick to my early attempts of prerendering the text animations as qt movies and use multiple gl.videoplanes to position and resize them (several text snippets happening simultaneously)

thanks,
hc


November 4, 2006 | 12:37 am

If you’re prerendering stuff anyway, I don’t see whay you just can’t
prerender a small texture strip and animate that over a nurbs surface
in space. This would be much more 3d IMHO.

wes

On 11/3/06, hc gilje wrote:
>
> ok, just wanted to make sure I wasnt missing an obvious solution. It seems I will stick to my early attempts of prerendering the text animations as qt movies and use multiple gl.videoplanes to position and resize them (several text snippets happening simultaneously)
>
> thanks,
> hc
>


November 4, 2006 | 12:58 am

There’s always this approach:

#P button 220 156 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 236 196 102 196617 jit.op @op * @val 2.;
#P newex 236 176 106 196617 jit.op @op – @val 0.5;
#P newex 236 156 110 196617 jit.noise 3 float32 5 5;
#P newex 236 218 91 196617 prepend ctlmatrix;
#P message 220 266 34 196617 reset;
#P newex 220 283 80 196617 jit.gl.handle foo;
#P newex 99 324 75 196617 jit.window foo;
#P toggle 99 215 15 0;
#P newex 99 266 50 196617 t b erase;
#P newex 99 244 51 196617 qmetro 5;
#P newex 99 301 82 196617 jit.gl.render foo;
#P newex 302 311 235 196617 jit.gl.nurbs foo @blend_mode 6 1
@blend_enable 1;
#P newex 302 282 86 196617 jit.gl.texture foo;
#P message 370 68 321 196617 frgb 255 255 255 , brgb 0 0 0 , clear ,
moveto 10 400 , font Geneva 48;
#P message 370 87 203 196617 write "this is text for the curved surface";
#P number 659 123 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 577 123 66 196617 tosymbol;
#P newex 577 150 93 196617 pak font geneva 14;
#P user ubumenu 576 104 126 196617 0 1 1 0;
#X add "Andale Mono";
#X add "Apple Chancery";
#X add Arial;
#X add "Arial Black";
#X add Capitals;
#X add Charcoal;
#X add Chicago;
#X add "ChordFont 4.0";
#X add "Comic Sans MS";
#X add Courier;
#X add "Courier New";
#X add "Cubase Data Font";
#X add Gadget;
#X add Geneva;
#X add Georgia;
#X add Helvetica;
#X add "Hoefler Text Ornaments";
#X add "Hoefler Text";
#X add Impact;
#X add Monaco;
#X add "Monotype Sorts";
#X add QuickScribe;
#X add PerfPrintGeneva;
#X add PerfPrintIcons;
#X add "MT Extra";
#X add "New York";
#X add Palatino;
#X add Swing;
#X add "Lydian MT";
#X add Kidprint;
#X add FrenchScript;
#X add Sand;
#X add "Score Font 4.0";
#X add Skia;
#X add Symbol;
#X add Techno;
#X add Textile;
#X add Times;
#X add "Times New Roman";
#X add "Trebuchet MS";
#X add Verdana;
#X add VT100;
#X add Webdings;
#X add Wingdings;
#X add ".Last Resort";
#X add .Keyboard;
#X prefix_set 0 0 0;
#P button 370 108 15 0;
#P newex 370 194 111 196617 jit.lcd 4 char 800 600;
#P connect 0 0 8 0;
#P connect 21 0 18 0;
#P connect 18 0 19 0;
#P connect 20 0 17 0;
#P connect 19 0 20 0;
#P connect 17 0 9 0;
#P connect 16 0 15 0;
#P connect 7 0 0 0;
#P connect 6 0 0 0;
#P connect 3 0 0 0;
#P connect 1 0 0 0;
#P connect 15 0 9 0;
#P connect 8 0 9 0;
#P connect 13 0 11 0;
#P connect 12 1 10 0;
#P connect 12 0 10 0;
#P connect 11 0 12 0;
#P fasten 2 1 4 0 639 120 582 120;
#P fasten 4 0 3 1 582 145 623 145;
#P connect 5 0 3 2;
#P window clipboard copycount 22;


November 4, 2006 | 1:16 am

And since I’m on a shader roll today. Here’s how you can animate it
along a nurb with shaders. Keep in mind though that since these are
bitmapped fonts, it will look a bit funky from far away. You may want
to use mipmapped textures.

wes

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#N counter 0 0 800;
#X flags 0 0;
#P newobj 141 425 83 196617 counter 0 0 800;
#P message 244 515 85 196617 file td.offset.jxs;
#P flonum 182 460 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 144 460 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 144 484 79 196617 pak offset 0. 0.;
#P newex 144 505 76 196617 prepend param;
#P newex 144 542 232 196617 jit.gl.shader foo @file td.offset.jxs @name offset;
#P user ubumenu 153 205 100 196617 0 1 1 0;
#X add none;
#X add nearest;
#X add linear;
#X add bilinear;
#X add trilinear;
#X prefix_set 0 0 0;
#X pattrmode 1;
#P newex 160 230 81 196617 prepend mipmap;
#P user jit.pwindow 484 287 82 62 0 1 0 0 1 0;
#P button 280 216 15 0;
#P newex 296 256 102 196617 jit.op @op * @val 2.;
#P newex 296 236 106 196617 jit.op @op – @val 0.5;
#P newex 296 216 110 196617 jit.noise 3 float32 5 5;
#P newex 296 278 91 196617 prepend ctlmatrix;
#P message 280 326 34 196617 reset;
#P newex 280 343 80 196617 jit.gl.handle foo;
#P newex 142 389 75 196617 jit.window foo;
#P toggle 142 280 15 0;
#P newex 142 331 50 196617 t b erase;
#P newex 142 309 51 196617 qmetro 5;
#P newex 142 366 183 196617 jit.gl.render foo @erase_color 0 0 0 1;
#P newex 362 371 306 196617 jit.gl.nurbs foo @blend_mode 6 1
@blend_enable 1 @shader offset;
#P newex 362 342 86 196617 jit.gl.texture foo;
#P message 430 128 321 196617 frgb 255 255 255 , brgb 0 0 0 , clear
, moveto 10 50 , font Geneva 48;
#P message 430 147 203 196617 write "this is text for the curved surface";
#P number 719 183 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 637 183 66 196617 tosymbol;
#P newex 637 210 93 196617 pak font geneva 14;
#P user ubumenu 636 164 126 196617 0 1 1 0;
#X add "Andale Mono";
#X add "Apple Chancery";
#X add Arial;
#X add "Arial Black";
#X add Capitals;
#X add Charcoal;
#X add Chicago;
#X add "ChordFont 4.0";
#X add "Comic Sans MS";
#X add Courier;
#X add "Courier New";
#X add "Cubase Data Font";
#X add Gadget;
#X add Geneva;
#X add Georgia;
#X add Helvetica;
#X add "Hoefler Text Ornaments";
#X add "Hoefler Text";
#X add Impact;
#X add Monaco;
#X add "Monotype Sorts";
#X add QuickScribe;
#X add PerfPrintGeneva;
#X add PerfPrintIcons;
#X add "MT Extra";
#X add "New York";
#X add Palatino;
#X add Swing;
#X add "Lydian MT";
#X add Kidprint;
#X add FrenchScript;
#X add Sand;
#X add "Score Font 4.0";
#X add Skia;
#X add Symbol;
#X add Techno;
#X add Textile;
#X add Times;
#X add "Times New Roman";
#X add "Trebuchet MS";
#X add Verdana;
#X add VT100;
#X add Webdings;
#X add Wingdings;
#X add ".Last Resort";
#X add .Keyboard;
#X prefix_set 0 0
0;
#P button 479 166 19 0;
#P newex 430 254 111 196617 jit.lcd 4 char 800 100;
#P fasten 11 0 31 0 123 377;
#P connect 11 0 12 0;
#P connect 12 1 10 0;
#P connect 12 0 10 0;
#P connect 31 0 28 0;
#P fasten 30 0 25 0 249 536 149 536;
#P fasten 28 0 27 1 149 479 183 479;
#P fasten 29 0 27 2 187 479 217 479;
#P connect 26 0 25 0;
#P connect 27 0 26 0;
#P connect 17 0 9 0;
#P connect 15 0 9 0;
#P connect 8 0 9 0;
#P connect 23 0 8 0;
#P fasten 24 1 23 0 203 225 165 225;
#P connect 0 0 8 0;
#P connect 0 0 22 0;
#P connect 7 0 0 0;
#P connect 6 0 0 0;
#P connect 3 0 0 0;
#P connect 1 0 0 0;
#P connect 5 0 3 2;
#P fasten 4 0 3 1 642 205 683 205;
#P fasten 2 1 4 0 699 180 642 180;
#P connect 13 0 11 0;
#P connect 16 0 15 0;
#P connect 19 0 20 0;
#P connect 20 0 17 0;
#P connect 18 0 19 0;
#P connect 21 0 18 0;
#P window clipboard copycount 32;

—————-td.offset.jxs


animated normals



< ![CDATA[

varying vec2 texcoord0;

void main (void)

{
gl_Position = ftransform();
texcoord0 = vec2(gl_TextureMatrix[0] * gl_MultiTexCoord0);

}
]]>

< ![CDATA[

uniform vec2 offset;
uniform float falloff;

varying vec2 texcoord0;
uniform sampler2DRect tex0;

void main (void)
{
vec4 a = texture2DRect(tex0,texcoord0+offset);
gl_FragColor = a;
//gl_FragColor = vec4(1., 0., 0., 1.);
}
]]>


November 4, 2006 | 9:34 pm

thanks andrew and wes for your patch examples, the nurbs approach might work.
the td.offset.jxs file wasnt included in the animation example, so I didnt really get to see how that would work.

hc


November 4, 2006 | 9:53 pm

its there. view the source, its an xml file which some mail
applications mistake for html

v a d e //

http://www.vade.info
abstrakt.vade.info

I LIVE! I LIVE! I LIVE! I LIVE! I LIVE! I LIVE! I LIVE! I LIVE! I
LIVE! I LIVE! I LIVE! I LIVE!

You will not be saved by the Holy Ghost. You will not be saved by the
God Plutonium.

In fact, YOU WILL NOT BE SAVED!

On Nov 4, 2006, at 4:34 PM, hc gilje wrote:

>
> thanks andrew and wes for your patch examples, the nurbs approach
> might work.
> the td.offset.jxs file wasnt included in the animation example, so
> I didnt really get to see how that would work.
>
> hc


November 4, 2006 | 11:45 pm

I read the forums from firefox, and the only thing I see in Wes


November 4, 2006 | 11:52 pm

ah, isnt being parsed into htmlspecialchars(); or something of that
sort.

Ill send it off list

v a d e //

http://www.vade.info
abstrakt.vade.info



jml
November 5, 2006 | 8:56 pm

could someone attach the shader file to a message in this thread?
it’d be nice to be able to take a look at it on-forum…

thanks in advance,
jl


November 5, 2006 | 9:30 pm

Quote: jml wrote on Sun, 05 November 2006 15:56
—————————————————-
> could someone attach the shader file to a message in this thread?
> it’d be nice to be able to take a look at it on-forum…
>
> thanks in advance,
> jl
—————————————————-

hear, hear!

tim


November 5, 2006 | 10:48 pm

On 11/5/06, Tim wrote:
>
> Quote: jml wrote on Sun, 05 November 2006 15:56
> —————————————————-
> > could someone attach the shader file to a message in this thread?
> > it’d be nice to be able to take a look at it on-forum…
> >
> > thanks in advance,
> > jl
> —————————————————-
>
> hear, hear!
>
> tim
>


November 5, 2006 | 11:02 pm

attach


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