set full layer mask

This forum is currently in read-only mode.
From the Asset Store
Basic template for drawing game with masks and easy customization
  • mask and erase seem to be the same things but inverse of eachother. it would be helpful if I could mask the whole layer, and then use a small sprite to cut a whole and see a little circle cutout of the layer. or the reverse for erase

    as of now if you want to do this you need to make a mask that takes up the whole view, with your actual mask shape in the middle. and if you want to be able to move it, the mask has to take up more than the view.

    there should be a checkbox on the layer or on the mask effect, that allows you to start with the whole thing masked and then your mask sprite could cut a whole in that.

    an example of the problem I'm trying to solve is in the cap below.

    the idea is to only see the circle of pink stuff revealed, but if you move the mouse around you can easily ruin the effect.

    problem.cap

    on a side note, it'd be cool if you could toggle the behavior of overlapping masks to go more transparent or less so. as of now if I put two masks over eachother, it goes by whichever is more transparent. it'd be convenient to be able to trigger the opposite behavior, or an average. it's also not possible to combine erase and mask to fix either problem.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • so if no one responds and it's not in the todo list, does that mean it's not gonna happen?

  • I think the best thing for us to do is add someting like

    //#FULL-SCREEN

    to the effect file, and then the runtime can mark that shader as one that clips to the entire screen rather than the object...then we would have the desired effect. It would make sense as well, since transparent areas become erased. The only problem is if the object leaves the screen entirely, it is considered invisible, so the rendering of that object wouldn't happen and you'd lose the effect :/

    One work around is to use a canvas as an inbetween step. Make a canvas 640x480, then always paste the circular sprite into it, but make the sprite invisible, and the canvas have the 'erase' effect. Or swap layers around so you can use erase instead...

  • thanks davi.

    I've never really understood the canvas object, can you post a cap, preferably just an altered version of the one I posted here? if it's not too time consuming or too much trouble. It'd be a big help.

    thanks either way

  • ooh!!!!! Nevermind

    figured it out!

    works perfect!

    Thanks, and as a bonus, the canvas makes perfect sense now!!!!

    thanks again dave

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