[Solved] Mask Effect on layer

This forum is currently in read-only mode.
From the Asset Store
Basic template for drawing game with masks and easy customization
  • Well, I've been fiddling with this effect and it seems it is buggy. After reading trough this thread, which has the same issue as I'm seeing

    And not knowing the policy on thread necromancy on these here forums, I took the liberty of posting a new thread.

    So here's what I'm seeing with for example three layers

    • Layer 3, mask layer (using alpha it seems for visibility of what's underneath)
    • Layer 2, which should peek trough
    • Layer 1, which should be left alone has all kinds of pretty test box thingies on it

    All of the above works, well sometimes... I've seen it influence layer 1 as well. As I've read in the thread linked above, it seems the mask just outright refuses to update after moving/scrolling or even re-testing using debug all. Leaving trails and simply not updating the render at all. Checking "force own textures" as suggested in the thread, doesn't seem to do anything either.

    So what's the deal, how is the Mask effect actually used. I REALLY need to have some kind of mask effect for something I'm working on.

  • Alright, I've been hammering away at it some more.

    To get rid of the trails or what we call "hall of mirrors" or "leaks into the void" on some older 3D engines

    Application settings needs to have multisampling set to at least 2x for this to go away.

    "Run without pixel shader" is off by default as well? Ah well not needed for this one of course, but still something to keep in mind indeed

    With that solved (and quite logical indeed, D'oh!), onto my next question.

    I've got a few layers I want to cover partially with a texture, using this Mask effect on a layer higher up in the layers list. Can I force this effect only affect a specific layer, ie: one layer below it and not the rest?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • More info:

    • When you use a sprite as a mask, you have to use at least 2x multisampling
    • When you use a canvas as a mask, you can turn multisampling off as well
    • Adding a mask effect to a sprite or canvas and sending it to the front, you can have it affect only the layer it is on. This was kind of fiddly using a sprite, but with a canvas it works so much better!
    • Adding a sprite to use as a mask on a layer, you can't use another mask effect sprite on top of it to mess with the first mask sprite partial visibility/invisibility. They don't play nice together and keep everything invisible, which was invisible for the first sprite. This is where the canvas object comes in!

    I didn't know about the canvas object's existence, but reading trough this forum I found out it was in there somewhere. As a matter of fact, a lot of stuff posted on these forums were kind off related to what I want, but not quite. So by messing with all of those things and molding into what I wanted. You guys did indeed help me out indirectly. Good info on here, thanks for that at least

  • Depending on what you try to achieve, you may also want to play around with Color Fusion (Masked)

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