A Flash Developer Resource Site

Results 1 to 12 of 12

Thread: How is this done???

  1. #1
    absolutezero3424
    Join Date
    Nov 2006
    Posts
    508

    How is this done???

    http://www.versedgear.com/vge/vge.html

    I would like to know how he manages to scale/transform the text primarily and additionally how he embeds many different fonts dynamically? this is the best I've seen for customizing text...I need some ideas! thanks!

  2. #2
    absolutezero3424
    Join Date
    Nov 2006
    Posts
    508
    well, I guess this is the best around because nobody seems to have a clue I suppose?

  3. #3
    Ө_ө sleepy mod
    Join Date
    Mar 2003
    Location
    Oregon, USA
    Posts
    2,441
    The only thing in there that's outside the ordinary is the word art...everything else is generic textfield stuff.

    If I were doing it, I'd use Mathieu Badimon's Five3D parser to cut the text up into CVs and then apply some mathematical envelope distortions...

  4. #4
    absolutezero3424
    Join Date
    Nov 2006
    Posts
    508
    yeah, the word art is definitely what I was referring to...

    thanks for replying, I appreciate it...do you have any examples using this Five3D parser? what is a CV? and any info you can give me about the Five3D parser would be cool, like where to obtain, how to use, etc....thx again!

  5. #5
    absolutezero3424
    Join Date
    Nov 2006
    Posts
    508
    ok, I downloaded the Five3D package and I'm trying it out which is cool...what type of mathematical envelope distortions are you referring to? is it within Five3D or native or something else? as always, an example is handy...thx again for the feedback!

  6. #6
    Ө_ө sleepy mod
    Join Date
    Mar 2003
    Location
    Oregon, USA
    Posts
    2,441
    The internet is fighting me right now and I can't pull up the five3d site...somewhere out there he has a custom tool that installs into Flash to help cut fonts up into class files (a la, outlining fonts in illustrator)...crack open one of the fonts in the five3d package files to see what I mean.

    Anyhow, he's just using those points to redraw the font in 3d space later. You probably don't need the 3D stuff so you could just get into his code and pull out the font renderer for your own use...

    As far as envelope distortions...basically you assume that your font is currently on a linear grid...meaning 1 = 1 for both x and y (like graph paper). What you want is to map one or both of your axes to a new grid that's not even. I've never done it but you could set your type in the five3d coordinate system, then run each point through a transformation before rendering. A simple linear distortion might be something like:

    y = y*(x/2);

    So the further out (horizontally), the taller the letters get. For more advanced stuff think about curves and easing equations. (here's the bezier equation if it helps).

    Unfortunately all my knowledge on this is pretty theoretical but I'm pretty intrigued by the idea...please post if you get this working or if you have more questions along the way.

  7. #7
    absolutezero3424
    Join Date
    Nov 2006
    Posts
    508
    what I'm trying to figure out is how to take a straight line of text and curve it into a rainbow or arch either up or down...I'm sure you would have to do some kind of TransformationMatrix on it, but I'm not really sure how that works??? any tips on how to accomplish this, or how to better understand Transformation matrices? I'm good at math, but I've never learned about those?

  8. #8
    absolutezero3424
    Join Date
    Nov 2006
    Posts
    508
    ok, maybe this question makes more sense...when you do a free transform in the Flash authoring environment or any other Adobe app, what equation does that go by when you begin to transform, either from the corners or top/bottom/left/right? somebody had to program this functionality? what's the approach?

  9. #9
    Ө_ө sleepy mod
    Join Date
    Mar 2003
    Location
    Oregon, USA
    Posts
    2,441
    Hey, I don't have a lot of time to tinker with this but I have pulled some links

    http://www.5etdemi.com/blog/archives...er-experiment/

    http://www.connectedpixel.com/blog/morph/animmorph

    And Mathieu already has a version of the method I posted to you earlier using five3D...check out warped text

  10. #10
    absolutezero3424
    Join Date
    Nov 2006
    Posts
    508
    thx again! yeah, that last one is exactly what I am trying to do...the part that I'm confused about is what type of equation he is using for the handles. Obviously you have to redraw the vector-based word based on some transformation matrix, but I'm not sure what that matrix would look like and it's obviously being updated based on the mouse's x & y position. He's even doing it in 3D, I just need mine in 2D!

    hey, thanks again!

  11. #11
    Junior Member
    Join Date
    Jul 2008
    Posts
    1
    I talked to Mathieu and he said he's using Lagrange Polynomial math. Unfortunately I wasn't able to get anything more from him than that.

  12. #12
    Ө_ө sleepy mod
    Join Date
    Mar 2003
    Location
    Oregon, USA
    Posts
    2,441
    I just checked out the wikipedia page and as you can imagine, its a hellscape of crazy-long equations. I never took calc so I'm no good on anything past Trig. I did hit up my smarter economist friend though, and here's what she had to say:

    I think that using statistical math rather than calc in this situaiton is a little lazy. I would've done some calc then run an rsquare regression but, again, I don't know about programming
    So...yeah. If anyone out here is good with The Calculus, I'd love to get more info on this. And if I have time I might try and hack something together by just manually interpolating the distance between two 'parallel' bezier curves.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center