Making shadows using the "Mask" effect
Hi guys--
I'm planning on implementing shadows into my game, much in the same way that Blue66 uses them in GunGirl2. Basically, I'm thinking of using the Mask effect so that when a player enters a shadowed area, the shadow "disappears"...we've all seen the Ghost Hunter demo, so just like that.
My question is this:
Is the only way to achieve this effect to use the "Mask" effect and lay out background objects that will denote the lighted areas? This seems terribly backwards and inefficient to me, especially since most areas are lighted.
Is there some way I can make it so the shadows are the defined objects, and not the other way around?
Thanks!
Re: Making shadows using the "Mask" effect
Semitransparent Actives and some sneaky object ordering to hide the character shadow?
Re: Making shadows using the "Mask" effect
Re: Making shadows using the "Mask" effect
Well, I want to make it so that when the character enters a shadowed area, the shadow disappears as if the character is holding a flashlight. In fact, pretend like this is all about creating a convincing flashlight effect.
When the flashlight shines into the shadows, the shadow should disappear, and thus not obstructing visibility of the background behind it.
Re: Making shadows using the "Mask" effect
OH, we thought you meant the character shadow so that it didn't get double dark.
Re: Making shadows using the "Mask" effect
Sorry, yeah, I can see how that came off. It's more like a flashlight object cancelling out the shadow with which it interacts...any thoughts?
Re: Making shadows using the "Mask" effect
Make a new layer with the subtract shader, put a white quick backdrop on it. Now, add objects that fade to black, these will be the light sources.
Re: Making shadows using the "Mask" effect
Looki,any chance you could make an example of that. That would be cool to see and you know me and brain leakage.
Marv
Re: Making shadows using the "Mask" effect
http://clickteam.info/looki/Examples/Subtract.mfa Very very simple. ;) It should be easy enough to understand though. White parts get dark, black parts don't change anything.
Re: Making shadows using the "Mask" effect
Ah, wonderful, thanks Looki!