User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11

Thread: [Request] Float position for a better movement fluidity

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    DavidT's Avatar
    Join Date
    Sep 2011
    Posts
    156
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    [Request] Float position for a better movement fluidity

    Hello Clickteam,

    I would like to make slow movements, by adding 0.01 or 0.02 to the position of an active object on each frame, but it doesn't work: only the integer values are seen, and the movement lacks of fluidity, as you can see in the attached file.

    Could you please improve this, maybe for Fusion 3, making available float positions (like 1.12, 500.156, etc.) ?
    Attached files Attached files

  2. #2
    Clicker Fusion 2.5 (Steam)

    Join Date
    Nov 2017
    Posts
    45
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    There's no such thing as 0.02 or 0.14 etc of a pixel. A pixel is either a whole pixel or not. The best you can do is sample the image to fake the illusion that it is moving that slowly smoothly?

  3. #3
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Oct 2016
    Posts
    38
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Progject View Post
    There's no such thing as 0.02 or 0.14 etc of a pixel. A pixel is either a whole pixel or not. The best you can do is sample the image to fake the illusion that it is moving that slowly smoothly?
    sub-pixel movement relates to the calculations that are done not how it's displayed, so obviously you can't split a physical pixel you can calculate how an object would behave if it were 0.01 or 0.12 pixels to the left for example.

  4. #4
    Clicker Fusion 2.5 (Steam)

    Join Date
    Nov 2017
    Posts
    45
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Sure, but if OP is talking about the fluidity of the movement, nothing can be done there, no?

  5. #5
    Clicker Fusion 2.5Android Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    AftPeakTank's Avatar
    Join Date
    Apr 2013
    Location
    Greece
    Posts
    338
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)

    An alias may help you to smooth movement, by faking antialising.

    Maybe you can use somekind of fake antialising.

    I have used a clone of the original object and moved it 1 pixel away, while interpolating the Alpha Blend Coefficient according to your Alterable Value A.

    The result looks a little Blurry and Dirty but It is a way to smooth the movement (at least the eye sees it like this)

    Check the attached example.

    Fluidity-AO.mfa

  6. #6
    Clicker Fusion 2.5Android Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    AftPeakTank's Avatar
    Join Date
    Apr 2013
    Location
    Greece
    Posts
    338
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)

    Smoothing Movement of an object by faking antialiasing.

    @DavidT , just wondering if you had the oportunity to check my example.

    Here is a video for you to get a quick look.




    Here is the link to the file again

    https://community.clickteam.com/attachment.php?attachmentid=27073&d=1560344014

  7. #7
    Clicker Fusion 2.5 Developer

    Join Date
    Jul 2008
    Posts
    1,296
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    I feel like it should be do-able using a shader - something along the lines of:

    return tex2D(img, float2(In.x - (fPixelWidth*xOffset), In.y - (fPixelHeight*yOffset)));

    The challenge is to modify that to work with transparent pixels, since those not only have an alpha of 0, but also red, green and blue components of 0 - so edges will end up grayish...

  8. #8
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Volnaiskra's Avatar
    Join Date
    Jan 2014
    Location
    www.sprykegame.com
    Posts
    2,013
    Mentioned
    63 Post(s)
    Tagged
    0 Thread(s)
    @AftPeakTank 's solution seems pretty good to me.

  9. #9
    Clicker Fusion 2.5Android Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    AftPeakTank's Avatar
    Join Date
    Apr 2013
    Location
    Greece
    Posts
    338
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)

    Smooth Movement - Blend Coefficient - Fake Antialiasing continuation

    @Volnaiskra , thank you. I wanted to make it even better by kind of exchanging blend coefficient between the two actives.

    The problem is that I cannot seem to find the proper formula ot produce a result with the proper final RGB values.

    I made a post here for this if you want to check.

    I followed @defisym 's link but even by making the calculation as presented in the wiki, I cannot seem to find the right formula.

    @MuddyMole , the problem with shaders, is that you cannot use them for Android or some other exporters (HTML5 too maybe?).

    By the way, If someone can solve me the riddle of blend coefficient please do.

  10. #10
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    DavidT's Avatar
    Join Date
    Sep 2011
    Posts
    156
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Thank you AftPeakTank. It works well for this simple movement, but for a circular movement (with sin and cos) for example it seems complicated.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Replies: 6
    Last Post: 14th October 2016, 07:48 PM
  2. Help with wrapping objects and float movement
    By Outcast in forum Fusion 2.5
    Replies: 5
    Last Post: 24th July 2015, 08:01 AM
  3. [Feature Request]Set Position of Active Object
    By LB in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 3rd November 2008, 11:51 AM
  4. (Request) Internal loop/position for MOD files
    By konjak in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 2nd March 2007, 06:32 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
  •