User Tag List

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

Thread: Drawing moving alpha rectangles on background

  1. #1
    Clicker 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)

    Join Date
    Nov 2012
    Posts
    121
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Drawing moving alpha rectangles on background

    Hello!

    I can't get it to work with the surface object. All I want to do is draw a semi-transparent rectangle with relative coordinates (my rectangle will move) on a background, which should not be affected when redrawing the rectangle. I tried many combinations of clearing and drawing, but it will never fit what I actually want. Also, is it possible to invert the colors in the content of this rectangle?

    Regards,

    2xD

  2. #2
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Could you explain more clearly what you want? An alpha transparent rectangle is one thing and is very simple, but inverting colors within a rectangle is an entirely different thing and requires shaders. What do you mean "on a background"?
    Working as fast as I can on Fusion 3

  3. #3
    Clicker 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)

    Join Date
    Nov 2012
    Posts
    121
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I also encounter one more problem with the background. Here's what I want:

    Capture screen with screen capture object and put output to clipboard. (tested, works)
    Load it through the surface object as background. (didn't work through the load from clipboard function, though the image is in the clipboard...)

    Then I would like to know 2 things:

    1. How to draw a moving semi-transparent rectangle (filled) that will move from left to right (or whatever), so that it will redraw itself correctly, without clearing the background image.

    2. Draw a rectangle in inverted colors (inverted of those, that are on the background) (only outline) that will move from left to right (or whatever), so that it will redraw itself correctly, without clearing the background image.

  4. #4
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Why don't you just create a semitransparent active object and move it over the surface object?
    Working as fast as I can on Fusion 3

  5. #5
    Clicker 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)

    Join Date
    Nov 2012
    Posts
    121
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It might be quiet bad for performance due to my rectangles are size-related to the screen width/height. I might do it with X/Y-Scale of the active object, but the coordinates won't be precise I guess, which I need to be exact.. Is there really no other way?

    Maybe place the background from clipboard with another object, and move the surface objects coordinates, would that be possible?

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,155
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    I would have suggested the same LB said,
    coordinates are going to be precise if you use floating point values (you can store them in the object's alt. values)
    performances should be good also, Fusion is pretty good at scaling.

    You'll probably have much less pain going with an active,
    maybe you can try and see if this satisfy your needs?
    This should be quick enough.

    (you can also easily invert colours with builtin shaders)

  7. #7
    Clicker 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)

    Join Date
    Nov 2012
    Posts
    121
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Okay, this seems to work quiet good, thanks.

    But I encounter strange problems with the load from clipboard function. If I load it right the first time, it doesn't display the picture at all, but displays it if I load it the second (and further) times from in-game.

    EDIT: Did not really fixed last problem, but it's some case of a layer problem, where many object overlap the surface though its on top. But nevermind, I have a fix around.

    Another question.. would it be possible to draw a moving line on this surface (with the background) with inverted colors?

  8. #8
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,155
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    What do you mean by moving line?
    Something like the old "Qix", "Volfied" -- you move a point that draws lines on screen?
    Or you mean a moving segment of fixed length?

    In both situations, you could again solve with active objects,
    first case could be possibly easier with Surface object
    second case would be probably easier with an active object

    Inverted colors could be achieved again with a shader on the active object

  9. #9
    Clicker 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)

    Join Date
    Nov 2012
    Posts
    121
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Which shader do I have to use on the Active? I tried XOR/Invert etc., but most of them affect the actual active, not the background on which this active is placed..

  10. #10
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,155
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    If I got correctly what you're looking for,
    you can try with the "difference" shader,
    i.e.:
    difference_fx.mfa

    drag around the square to see
    make sure you prepare a rectangle of "mostly opposite" color

    if you don't have the "difference" shader,
    you can find it in Looki's pack "Photoshop Blends" here:

    http://lukasmeller.com/mmf/shaders/

    (and big thanks to Looki for his wide collection of much useful tools)


    EDIT:
    now that I'm looking at the contents of Looki's folder,
    while the "difference" shader does a good job,
    the "InvertBackground" fx you find there does *exactly* what you need
    (and without having to prepare a specifically coloured active)

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Lag from moving background
    By pikzilla in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 3rd June 2011, 04:38 PM
  2. Moving background
    By FlinkGigitty in forum File Archive
    Replies: 2
    Last Post: 27th March 2009, 12:25 AM
  3. Export with Alpha (no background) - How ?
    By Alon Dan in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 15th March 2009, 02:32 AM
  4. Alpha, Background Images
    By Ross in forum Extension Development
    Replies: 17
    Last Post: 9th January 2008, 10:28 AM

Posting Permissions

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