0 Favourites

reverse mask

This forum is currently in read-only mode.
  • I have a feeling the answer may end up being obvious, is there an effect or a technique to do the opposite of what mask does, only reveal a certain part of the layer, because, for now, if I want to reveal only a small circle of a layer using a mask, I need to use a huge transparent png that takes up the whole screen with a small circle in the middle of it. is there an easier way?

  • Try removing the transparency check from the layer that you're doing this on in layer properties. (I think that's how you do it) alternatively look at the Lighting Effects tutorial in the Tutorial section.

  • Try the 'erase' effect?

  • thanks for the suggestions guys

    but neither is exactly what I meant

    let's say you have a background

    and you want to see the whole background at all times

    on top of the background (on the next layer) you have a sprite of a ghost and a circle

    you don't want to see the circle, but you want to use the circle as a mask to reveal the ghost

    so the ghost is invisible except for parts that are overlapped by the circle

    I can do this by making a huge transparent square sprite with an opaque circle in the middle and using mask, or a huge opaque square sprite with a transparent circle in the middle using erase. I'm trying to figure out a combination of layer and sprite effects, where I can just have the circle by itself, without needing a huge square around it. even if I need a huge square sprite I have to reuse, I don't mind. I just want the circle I'm using as a mask to be separate from the huge square, so I can move it and reshape it freely without worrying about whether the square is covering the rest of the screen.

  • Why don't you just crop the circle?

    If you open the image up in the editor, then hit crop at the top it will do that for you.

    You can then set the circle wherever you want, or use events to set its x,y.

  • Why don't you just crop the circle?

    I need the huge square to mask the rest of the screen. I don't want to see anything except for what's behind the circle. if I crop the circle, it won't hide the background. here I posted a cap to show the problem:

    http://www.willhostforfood.com/access.php?fileid=58447

    move around sprite3, so you can see what I mean. I want the pink square to only be revealed by the circle. I realize I could've made sprite three bigger, but that's what I'm trying to avoid. if I would have cropped it, it really wouldn't work at all. this cap also let's you see how distracting and difficult it is to move around an invisible mask with a huge border. I plan to have many on screen at once to create a variety of effects.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Is this the effect you're going for?

    http://willhostforfood.com/?Action=down ... leid=58459

    Because it does this:

    Try the 'erase' effect?

    And this:

    Why don't you just crop the circle?

    If you open the image up in the editor, then hit crop at the top it will do that for you.

    You can then set the circle wherever you want, or use events to set its x,y.

  • Is this the effect you're going for?

    not quite

    this is the effect I'm going for

    http://www.willhostforfood.com/access.php?fileid=58460

    only without cheating by having a clone of the background.

    if I had a bunch of sprites and things animating behind this layer, I would still want it to work, so the method I used in this cap won't due. But it shows the effect I'm going for

  • Thread Revival!

    Does Construct use RGBA for the framebuffer? that is, is there a destalpha?

  • When rendering to a layer texture, yes (ARGB format), but when rendering to the backbuffer/display, no (XRGB format, A is ignored).

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