Hey-- I was just curious about doing lighting effects in MMF2....
I made a solid layer in the top frame and switched the ink effect so that it makes the whole scene look like night, but I wanted to have lights in the scene, which would essentially by holes in the "darkness" layer that move around. How can i set this up so multiple holes move around and are cut out of the darkness, creating light areas in the room? Does anyone have an exmple file of this?
What if you used the overlay object with some raycasting effects, in order to give a shadow effect that overlaps backgrounds, and then had ALL active objects onscreen have their transparency set based on that difference. Then maybe you could do it without the subapplication.
For one single hole, you could just use one big active, with a hole in it, maybe with some alpha blending too. But I guess that's kind of stupid. I also remember hearing something about the OR effect being able to do something like this, but I've never tried it myself. So there you go, unban phizzy and let him explain kplz?
Just for the benefit of anyone else who might stumble upon this thread at a later date, here's another example:
The example uses 2 layers:
* The background layer (in an actual game, this would be all your layers containing backgrounds, sprites, etc)
* The darkness layer
(and then in a game, you'd probably have a layer on top of that, containing your HUD with score, lives, etc)
The darkness layer has a "subtract" effect applied to the layer itself. The white background object means that 255 is subtracted from the red, green and blue values of each pixel (ie. they are made black) - except where there are black "light" objects. Basically, the darkness layer is the inverse of what you want - a lighter color represents darkness.
You can play around and create some nice fog effects using a similar method: https://skydrive.live.com/self.aspx/Public/LightsEg2.mfa?cid=b1e7ee094271bbda&sc=documents
MuddyMole = Me (The first of those examples is the one I just posted here).
Andos' shadow-caster engine is really very impressive - the only downside is the complexity of the code (and possibly performance).
That's a nice FoW example you've made - going to have to try and figure out how it works, when I have the time...
Hey, someone *just* asked me for a raycasting shadow engine a few days ago, and I couldn't find my old file, so I just made a new one quickly in < 10 minutes. So I can actually post that a second time if it helps!