Using Blend Mode Through Multiple Layers

  • If I had a background image and multiple layers on top of with sprites completely covering that image, is there a way I can use a blend mode to create a "window" that basically pokes a hole through all the layers to see the background.

    If I'm not making any sense, imagine seeing a 2d room with a sunset as the backdrop. The additional layers would have the wall, objects, etc. Aside from literally moving objects out of the way, how would one create a window to see the background?

  • bump

  • I think that you have to create a "window" on each layer you wish to poke through and use destination out blend.

  • trollface - Hmm...that doesn't seem to be working. What am I putting destination out on - the window itself? Or the backdrop layer?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Is there any reason blend mode wouldn't work at all? I'm just trying something as basic as creating a sprite with destination out on a single layer, and every time I load the game, where the sprite should be "cutting throught", it's just black.

  • In the examples folder, take a look at Lighting.capx - it might point you in the right direction.

  • - I'm already using something exactly like this on another layer in my game (and it works fine), and I've looked over this and the blend examples over and over. For some reason when I try to use Destination Out on this particular layer (2nd from the bottom; no blend effects), the destination out is always black.

    I might note that the background layer (bottom) is a 0,0 parallax 1920 x 1080 image - could this be why it's not working?

  • You have to set "Force own texture" to "Yes" in the layer containing the special blend mode. I don't know why, but that's what they did in the examples.

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