A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: [flash mx] wrap a text around a cylinder

  1. #1
    Junior Member
    Join Date
    Jul 2002
    Posts
    3

    [flash mx] wrap a text around a cylinder

    I have not enough knowledge of 3d and math to do this, but i have found an old example of a text wrapped around a sphere in vemix.com, using the skewing of a movieclip in order to match the curve of the sphere.

    My actual problem i sthat I need to preview the engraving of text in a ring, and i tried to adapt the above script in my program, but since the wrapping around the sphere is not really three dimensional (no bending of the text on the Z axis, it does not look good on the final effect.

    I need to know how to write my own renderer to wrap the text (as an arc portion with the movieclips on it) around a cylinder that can be rotated in isometric 3d and with the rear clips hidden, as a solid cylinder.

    the tutorials I found are here:

    how to skew an object
    how to place an object in space

    An implementation I made is here:
    select the bridal engraved ring then follow the steps,type a text and press submit

    Thanks for your attention

    Saimon69

  2. #2
    Senior Member RUSHVision's Avatar
    Join Date
    Dec 2000
    Location
    Pacific Northwest
    Posts
    5,441
    I don't normally recommend this, but you might want to PM member 'shipstern' and see if he can give you some information about this. You can search his posts here, but all of his links to examples seem to be dead. He was doing some very cool things in the realm of being able to dynamically wrap images around 3D objects in Flash.
    mrush


    > .. _ .: Join the FK ARENA!:..:RUSHVision vs. JWin:. _ .. <
    ..:: "Why aren't the lockout programs working?!?...Release the monkey!" ::..

  3. #3
    Senior Member
    Join Date
    Nov 2003
    Posts
    524
    Hi,
    Tried link to your implementation ... but I am on a razor sharp 49 kps dial-up connection so after 5 minutes and no end in site I bailed.

    Coding a renderer to render text on a ring is no trivial matter even in a more powerfull environment.

    Coding a pixel perfect renderer capable of rendering random and quality text on a curved surface is not something you can throw together in a few days. Doing it for a 3D interactive environment would be a project I would put aside a large chunk of time for ... and be prepared to be dissapointed with the results.

    I would love to see someone make me eat these words ... but ... I just don't see it happening in Flash at the moment.

  4. #4
    Junior Member
    Join Date
    Jul 2002
    Posts
    3
    For now seems i have resolved, i found those tutorials and modified the code:

    3D spinning wheel
    Explainations about spinning wheel

    In short, it is s spinning wheel with skew. It is not spherical as I expected, but i was able to modify it,include it in a clip, fix the rotating position and the size and attach it to my movie with the parameters needed to make it look reasonable.

    BTW, the late was due to a uncorrectly paused loadVars, so if you now go back to the site (after erasing the browser cache, of course), you will see a working model of what I just did.

    Thanks for the attention

    Saimon69

  5. #5
    Senior Member
    Join Date
    Nov 2003
    Posts
    524
    Most probably a good idea that you have opted for the old skew Movie Clip standard, improved kerning of the text should eliminate some of the problems when mapping to your curved surface.

    I don't know how you can eliminate the incorrect perspective mapping of the individual letters. I have tried multiple triangles (4) to make up each letters Movie Clip ... but getting the outline of the letters to match up is pretty difficult even on planar surfaces. I have also found that numerical errors that creep into the 3D transforms make for some strange kerning artifacts during real-time rendering.

    Maybe with AS3 and it's new bitmap data methods you would be able to get each letter to have correct perspective transform, someone on the AS3 forum maybe able to help with that, I am not sure if the "bitmap data" can be altered at the pixel level like a true image buffer though.

    I was wondering how you are representing the position and kerning of your letters in 3D, are they calculated at runtime or are you using a hard coded data set?

  6. #6
    Senior Member RUSHVision's Avatar
    Join Date
    Dec 2000
    Location
    Pacific Northwest
    Posts
    5,441
    It's not quite ready yet, but you guys should check this out.
    mrush


    > .. _ .: Join the FK ARENA!:..:RUSHVision vs. JWin:. _ .. <
    ..:: "Why aren't the lockout programs working?!?...Release the monkey!" ::..

  7. #7
    Senior Member
    Join Date
    Nov 2003
    Posts
    524
    Yes I have been watching the development of Paper Vision.

    That was one of the reasons I suggested that AS3 could be an area to look into.

    It is good to see that there is a team bringing some 3D functionality to Flash, previous attempts have been pretty lame. Maybe with AS3 and Flash Player 9 we will see something closer to what one would expect from a Java project.

    I suspect that the Paper Vision team must be coming up against some tough problems in regards to adapting a 3D renderer to the Flash environment. There is a heap of robust Open Source code available which could be ported to the Flash environment and it seems very unlikely the Paper Vision Team would start reinventing the wheel so to speak. I sort of hope they are holding off release so they can blow everyone away with their API.

  8. #8
    Junior Member
    Join Date
    Jul 2007
    Posts
    1
    did you find a good way to fix the problem whit the text? Whould be nice to see what you made. trying to do the same thing right now.

    thanks

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