Need help with Blendmodes (SOLVED)

11 posts

Flag Post

I’ve got a torch that “lights up the room” when it’s really a black circle with a white triangle in it. And the blendmode set to Multiply. So the white in the circle essentially becomes transperant and you can see the room, and the back hides everything else.

I also have other objects and walls that cast shadows that are simply black-filled shapes.

What I want to do is make a window where you can see the world outside, regardless of whether an object nearby is casting a shadow, or if the torchlight is on it or not. (See picture)

I already have background and the window with the transperant sections cut out, but I have no idea how I can make the background “shine through” the darkness. I assume I’ll need to use a blend mode to cancel out the darkness, otherwise I’m not sure it’s possible. :( Any help?

PS. I can’t put the background over the foreground and mask it because the cutout is a lot more complicated than the picture suggests.

 
Flag Post

If you’re using Display Objects, you can use the depth of the movie clip and send it to the front.

 
Flag Post

It’s not just a little square, it’s a huge background that stays stationary while the room and the player scroll around.

 
Flag Post

Make all outside objects be children of X including the window itself. The window will be on top of everything else, and there needs to be a mask on X the shape of the window.

That might get really ugly, so maybe try version 2:

Make all outside objects be children of X. X is child of Y. Window is child of Y. Make mask on X the shape of the window. Make sure Window is set above X.

 
Flag Post

I simply used the square window as an illustration to make it easy to understand.
What I’m really working with is a chainlink fence, or a crosswork of metal bars, etc. Every map has different “windows” of different shapes and sizes.

Here’s one example:


 
Flag Post

why is everyone doing realtime lights all of a sudden loololololl.

 
Flag Post

Ok I guess I’ll have a go at manually drawing absract shaped masks for each level, see how that goes…

 
Flag Post
Originally posted by DrYoshiyahu:

Ok I guess I’ll have a go at manually drawing absract shaped masks for each level, see how that goes…

on topic: make the “window” a lightssource in your lighting engine.

 
Flag Post

The problem with that is that my other light source is simply white that becomes transperant, and black that covers everything else.

Remarkably, making a mask actually worked. It took a while to draw, but it’s perfect! :)

 
Flag Post
Originally posted by DrYoshiyahu:

The problem with that is that my other light source is simply white that becomes transperant, and black that covers everything else.

Remarkably, making a mask actually worked. It took a while to draw, but it’s perfect! :)

I’m not sure how making the window light itself in the same way as the flashlight wouldn’t work?
 
Flag Post

Because the “light” from the torch is really an absense of darkness, which is everything else. To make a new “light” I would really be deleting “darkness”. My “light” is a black circle with a hole cut out so you can see the floor and the walls.