[Solved] Mask Effect on layer

For questions about using Classic.

Post » Fri Mar 11, 2011 8:47 pm

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
viewtopic.php?f=3&t=5237&hilit=mask+effect+bug

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

[list:3pf9gigf]
[*:3pf9gigf]Layer 3, mask layer (using alpha it seems for visibility of what's underneath)[/*:m:3pf9gigf]
[*:3pf9gigf]Layer 2, which should peek trough[/*:m:3pf9gigf]
[*:3pf9gigf]Layer 1, which should be left alone has all kinds of pretty test box thingies on it :P[/*:m:3pf9gigf][/list:u:3pf9gigf]



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.
B
6
S
3
G
1
Posts: 76
Reputation: 1,002

Post » Sat Mar 12, 2011 1:28 am

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.
[size=85:39dxpqv2]"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[/size:39dxpqv2]



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?
B
6
S
3
G
1
Posts: 76
Reputation: 1,002

Post » Mon Mar 14, 2011 12:28 am

More info:

[list:gz9vl7tq][*:gz9vl7tq]When you use a sprite as a mask, you have to use at least 2x multisampling[/*:m:gz9vl7tq]
[*:gz9vl7tq]When you use a canvas as a mask, you can turn multisampling off as well[/*:m:gz9vl7tq]
[*:gz9vl7tq]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![/*:m:gz9vl7tq]
[*:gz9vl7tq]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![/*:m:gz9vl7tq][/list:u:gz9vl7tq]

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 :D
B
6
S
3
G
1
Posts: 76
Reputation: 1,002

Post » Mon Mar 14, 2011 2:48 pm

Depending on what you try to achieve, you may also want to play around with Color Fusion (Masked)
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests