User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 20

Thread: lighting effects

  1. #1
    No Products Registered

    Join Date
    Mar 2007
    Location
    Sydney, Australia
    Posts
    1,369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    lighting effects

    Hi Guys

    I am working on a test engine for a 2D top down shooter I have planned and have some questions about lighting. I want to incorporate a flashlight that illuminates wherever the mouse cursor is, but it stops when it reaches a wall or obstacle.
    Something that is dynamic and reacts with the surrounding environment.

    I am also looking for examples of things like streetlights or lamps which illuminate an area around the light source.

  2. #2
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    Stephen's Avatar
    Join Date
    Aug 2008
    Location
    Montana
    Posts
    4,515
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: lighting effects

    There is a very good example by Greyhill.

    Flashlight Effect

    stephen1980
    _____________________________________________
    Nivram's Examples -Need extensions? Send me a PM.-


  3. #3
    No Products Registered

    Join Date
    Mar 2007
    Location
    Sydney, Australia
    Posts
    1,369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: lighting effects

    That is a great example, but how do you go about making objects that are hidden in the dark and become fully visible when the light is on it? Untilamtely I want a dark environment where things are very hard to see, unless they are near where the light source is.

  4. #4
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    Stephen's Avatar
    Join Date
    Aug 2008
    Location
    Montana
    Posts
    4,515
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: lighting effects

    I have never tried achieving this effect, so I am unsure how to do this. I was able to get a Background Image to work, but not an Active. Maybe ask Greyhill? :confused:

    stephen1980
    _____________________________________________
    Nivram's Examples -Need extensions? Send me a PM.-


  5. #5
    Clicker Multimedia Fusion 2
    BrandonC's Avatar
    Join Date
    Jun 2006
    Location
    PA, USA
    Posts
    931
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: lighting effects

    It doesn't have real dynamic shadows, but I'm not entirely sure how to do those, so I just gave you a small trick effect that I came up with in about 5 minutes.

    Never the less, here's the easiest and most efficient way I've found to do some sort of lighting, especially without distorting any colors by piling them on top of each other.


    http://www.mediafire.com/file/qoi0l5mzynk/FlashlightEffect.mfa
    (Download Example)

    The effect is also very flexible, allowing you to do all sorts of very fancy lighting effects once you play around with it some more.

    It's the very same type of lighting I use in my game ArcaneTale.
    [img:left]http://i36.photobucket.com/albums/e42/GoldenSonic3000/NewLightAT1.png[/img]

  6. #6
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    Stephen's Avatar
    Join Date
    Aug 2008
    Location
    Montana
    Posts
    4,515
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: lighting effects

    Thanks for the info/example, BrandonC! That is amazingly simple. Makes me think of all kinds of lighting ideas now!

    stephen1980
    _____________________________________________
    Nivram's Examples -Need extensions? Send me a PM.-


  7. #7
    Clicker Multimedia Fusion 2
    BrandonC's Avatar
    Join Date
    Jun 2006
    Location
    PA, USA
    Posts
    931
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: lighting effects

    I just updated it with a better shadow version. The shadows now rotate based off the players location rather than the direction of the light. Makes the effect a little less suspicious when you view it from any less than direct angle.

    I also added in extra lights to show how the effect can be used for more complex lighting. You'll need to add in shadows for each lighting though. It wont be too hard, just tedious. I didn't do that for the example, but as I said, it's just a matter of adding new shadow objects per light source, and making them rotate off of those light sources.

  8. #8
    Clicker Fusion 2.5 Developer

    Join Date
    Jun 2006
    Location
    Virginia, USA
    Posts
    1,509
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: lighting effects

    One way would be to destroy the shadows when the light is not overlapping an object, and creating a shadow when it overlaps an object. I did that in one of my zombie games. [grin]

  9. #9
    No Products Registered

    Join Date
    Mar 2007
    Location
    Sydney, Australia
    Posts
    1,369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: lighting effects

    BrandonC: WOW thats a great example. That is exactly what I wanted to achieve. Thank you!
    I thought I had no other way until the overlay object supported subtractive ink effects.
    just one quick question. Is it possible to stop the light when it hits a wall? My viewpoint is top-down so it would look a bit silly if light could travel through walls.

  10. #10
    Clicker Multimedia Fusion 2
    BrandonC's Avatar
    Join Date
    Jun 2006
    Location
    PA, USA
    Posts
    931
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: lighting effects

    Properly? You'd need something like overlay, because that's more complex. That's why I tried to implement an object based "shadow" system.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Lighting Effects
    By dcrew in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 9th March 2011, 02:31 PM
  2. Lighting Effects
    By Mycale in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 19th July 2008, 12:04 PM
  3. lighting effects and CT ink effect suggestion
    By astrospoon in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 15th December 2006, 05:00 PM
  4. Lighting effects
    By zandoria in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 28th July 2006, 02:45 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •