Using Blend Mode Through Multiple Layers

Get help using Construct 2

Post » Sat Aug 17, 2013 6:17 am

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?
B
42
S
12
G
1
Posts: 540
Reputation: 4,213

Post » Sat Aug 17, 2013 6:49 pm

bump
B
42
S
12
G
1
Posts: 540
Reputation: 4,213

Post » Sat Aug 17, 2013 6:55 pm

I think that you have to create a "window" on each layer you wish to poke through and use destination out blend.
B
14
S
6
G
4
Posts: 107
Reputation: 4,858

Post » Sat Aug 17, 2013 7:11 pm

@trollface - Hmm...that doesn't seem to be working. What am I putting destination out on - the window itself? Or the backdrop layer?ome6a17172013-08-17 21:30:29
B
42
S
12
G
1
Posts: 540
Reputation: 4,213

Post » Sun Aug 18, 2013 3:08 am

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.
B
42
S
12
G
1
Posts: 540
Reputation: 4,213

Post » Sun Aug 18, 2013 3:15 am

In the examples folder, take a look at Lighting.capx - it might point you in the right direction.
B
14
S
7
G
6
Posts: 146
Reputation: 3,235

Post » Sun Aug 18, 2013 4:32 am

@buddy40 - 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?
B
42
S
12
G
1
Posts: 540
Reputation: 4,213

Post » Tue Aug 20, 2013 9:30 pm

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.
B
18
S
3
Posts: 57
Reputation: 1,081


Return to How do I....?

Who is online

Users browsing this forum: dop2000 and 8 guests