User Tag List

Results 1 to 10 of 10

Thread: Stretch/distort object

  1. #1
    Clicker Fusion 2.5 DeveloperiOS Export Module
    ChrisBurrows's Avatar
    Join Date
    May 2011
    Location
    Tasmania, Australia
    Posts
    622
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Stretch/distort object

    Hello,

    Has anybody found a way to stretch/distort the corners of an object based on co-ordinates?



    Thank you

  2. #2
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    You can use Polygons:
    Attached files Attached files
    Working as fast as I can on Fusion 3

  3. #3
    Clicker Fusion 2.5 DeveloperiOS Export Module
    ChrisBurrows's Avatar
    Join Date
    May 2011
    Location
    Tasmania, Australia
    Posts
    622
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Thanks LB, but I need to do it with an active object. What are my chances?

  4. #4
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Surface is active and it is an object. You can even blit actives onto it!
    Working as fast as I can on Fusion 3

  5. #5
    Clicker Fusion 2.5 DeveloperiOS Export Module
    ChrisBurrows's Avatar
    Join Date
    May 2011
    Location
    Tasmania, Australia
    Posts
    622
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    I need the polygon to be textured.....

  6. #6
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Oh...the best I could think of would be some shader. :\
    Working as fast as I can on Fusion 3

  7. #7
    Clicker Fusion 2.5 DeveloperiOS Export Module
    ChrisBurrows's Avatar
    Join Date
    May 2011
    Location
    Tasmania, Australia
    Posts
    622
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    The top and bottom edges remain straight if that makes it any easier?

    I just need to be able to pick these points by co-ordinates.


  8. #8
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    You could split it into a bunch of horizontal one-pixel-high actives and spread value on them then stretch them based on a formula involving their spread value. Or use a shader. Other than that I have no idea, if someone else would like to input.
    Working as fast as I can on Fusion 3

  9. #9
    Clicker Fusion 2.5 DeveloperiOS Export Module
    ChrisBurrows's Avatar
    Join Date
    May 2011
    Location
    Tasmania, Australia
    Posts
    622
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    That is an idea but it seems a bit extreme. I appreciate all your help though LB!

    I know it can be done with the 3D Shader because I have stretched objects in this way before with it. I just can't get them to go exactly where I want. Any other ideas?

  10. #10
    Clicker Multimedia Fusion 2SWF Export Module

    Join Date
    Sep 2006
    Posts
    1,544
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    MMF2 only supports pixel shaders, not vertex shaders right now, unfortunately- vertex shaders would be a bit complicated for it given how the collision detection works on the collision mask. Vertex shaders are exactly what has this effect (and some more, light passive lighting), but unless you're using a custom 3d graphics plugin like OpenGL for MMF2, I don't think you'll have much success trying this, at least not with standard active objects- you can do it with other methods like polygons, the Surface object extension, and opengl as mentioned.

    As far as pixel shaders themselves, you could plausibly create a shader that skews an image into a predefined quadrilateral. The limitation here is that pixel shaders still need to operate on the same texture size, so you cannot enlarge an image- it only works if the points are *inside* of the rectangle. Still plausible, if you have the object be larger than the actual texture size, so as to give it extra distance on the sides, for example making it three times as wide and high, and centering the image by default. But it still won't allow large stretches, and the larger the texture, the slower it will go (pixel shaders are expensive GPU operations), and no matter what you do, it won't actually affect the collision mask for that object- it is purely display, no effect on collisions.

Similar Threads

  1. How to stretch gradient background? (Q)
    By SMASHINGmedia in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 7th May 2013, 01:47 PM
  2. Stretch game to fit screen?
    By LemonyLime in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 5th January 2012, 05:13 AM
  3. Stretch 2
    By loglady in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 5th August 2011, 06:12 PM
  4. Stretch this display?
    By MechatheSlag in forum Multimedia Fusion 2 - Technical Support
    Replies: 13
    Last Post: 31st August 2008, 08:18 PM

Posting Permissions

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