0 Favourites

[Effect] Disk

This forum is currently in read-only mode.
  • What it does

    What can be done with Disk.fx? Well, this:

    Heck if we had a radial gradient you could even do a Warner Bros. title screen.

    h2]Original

    Ok, sort of, but at least I try

    The boring basic explanation is, Disk allows you to focus on a part of an object using an oval shape by darkening everything outside the shape.

    Disk takes care of transparencies and semi-transparencies and offers a set of parameters to suit your needs.

    Two useful .cap-files, not only showing the effect in action, but letting you tweak a bit also to get a first impression of the capabilities, are provided.

    One limitation: Unfortunately, the important values of pixelWidth and pixelHeight are always passed incorrect to an effect (at least on my system). So there is no chance to take care of the aspect ratio. In other words, you will only get a perfect circle, if the object the effect is attached to is of a square size. I first thought about letting you pass the aspect ratio manually, but I rather decided to do an update when the bug is corrected.

    How to use it

    • Size Defines the size of the shape in percentage of the object's size.
    • Horizontal Center Defines the horizontal position of the shape in percentage of the object's width.
    • Vertical Center Defines the vertical position of the shape in percentage of the object's height.
    • Smooth Border Defines the smoothness of the shape's border (0% = sharp, 100% = gradient to the center).
    • Darken Defines, how much the area outside the shape is darkened (0% = White, 100% = Black).
    • Opacity Defines the opacity of the darkening color (0% = Transparent, 100% = Opaque).
    • Replace Content *Handle with care* A simple switch (0 = Off, anything else = On). Almost always you don't need Replace Content. But in certain situations it can be useful. For example, if you want to use a Tiled Background as a layer effect (TB uses less VRAM than Canvas), you can setup a very small empty image in the TB and then activate Replace Content. It will then draw its own image with a 100% transparent shape and a darkened outside area. In the car.cap Replace Content is used on a Canvas to create a subtle dust effect.

    Installation

    Download and place Disk.fx in the effects folder.

    Download

    Disk.fx

    Disk.cap

    Car2.cap

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • Cool, should make for some nice little transitions.

  • funny, I did that but set the ratio to be a percent of the object's size. Found out that bounding box changes when the object is rotated (to contain it) and just left it there.

    Pixel height and width worked fine for me though and I could define the disk using them. It just didn't match the object size sometimes and I figured it would be hard to use.

    And the funniest thing is that I called it Disk too. It's always centered though, so yours is more complete. Cheers!

  • Looks goods!

    I started a new section on the Master Plugins List for effects.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)