User Tag List

Results 1 to 6 of 6

Thread: Sprite light mapping effect

  1. #1
    No Products Registered

    Join Date
    Jul 2006
    Posts
    492
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Sprite light mapping effect

    Hi,

    I invented a directional lighting method that can be used for sprites in MMF2 the other day. It was originally going to be for my current game project, but I decided it was too late in development to put it in, so I have made it open source instead.

    It gives a similar effect to bump mapping in 3D games. It would be an ideal effect for applying to characters and moving objects in a game. The way that this example actually handles the lighting isn't very sophisticated, but the basic principal of the effect itself is there.

    It works by first working out the direction from the object to a light source. There are three sprites in the lighting effect, the base sprite, light sprite and dark sprite.

    The light and dark sprite both use a desaturated version of the base sprite. The light sprite uses the additive ink effect whilst the dark sprite uses subtractive.

    The effect works by displacing the light and dark sprite by 1px in opposite directions from the base sprite. This gives a sort of embossing effect.

    Currently this lighting effect only works in 2D. Surely that's ok if you are making a 2D game right? Well not exactly. If you are making a platform game, the current set up will work fine, however if you are making a top down/isometric game then it will need modifying; when a character stands in front of a light source the side facing the screen should be dark, but currently it will be rendered as if the light was hovering abover their head.

    The disadvantage of this method is that for every graphical sprite that uses this lighting, you need to create a desaturated duplicate of all the anims. It's a shame MMF2 can't do multiple inks at a time or this would be very easy.
    Attached files Attached files

  2. #2
    No Products Registered

    Join Date
    Jan 2007
    Location
    Sweden
    Posts
    107
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Sprite light mapping effect

    Nice! But it doesn't look so good if you'r running through the ight. The light thingy behind him is too slow, so he gets very lit up on his back(is that correct english?)

  3. #3
    No Products Registered

    Join Date
    Dec 2006
    Posts
    1,332
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Sprite light mapping effect

    It's a very cool effect, but it is hardly visible at all. If it was more defined, it would be great. This would actually go very nicely with the example made by Andos on http://click.andersriggelsen.dk/examplefiles.php Its the example called light and shadow engine.

  4. #4
    No Products Registered

    Join Date
    Jul 2006
    Posts
    492
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Sprite light mapping effect

    If the effect becomes too well defined then it ends up looking like the guy is made out of metal. It looks fine on my PC, but then I suppose my monitor might be brighter or darker than yours. Still, I think it is important that lighting effects aren't exaggerated to draw attention to themselves. For example some games these days use specular phong shaders too much and end up with people that look like they are made of plastic

    I know of Andos's lighting engine, a near identical closed source lighting engine i made was what inspired him to make it

    Attan I'm sorry but I can't understand what you are trying to say. All I can suggest is that you read the second to last paragraph of my first post, which explains why this effect isn't entirely correct.

  5. #5
    Clickteam Clickteam
    Anders's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, Århus
    Posts
    3,456
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    Re: Sprite light mapping effect

    Yes I made that engine after seeing stuckboy's tech-demo
    I just re uploaded the MMF2 version to my new server since the old link is dead. (check the latest comment)

  6. #6
    No Products Registered

    Join Date
    Jul 2006
    Posts
    492
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Sprite light mapping effect

    And still the overlay redux doesn't support MMF2 inks been waiting for that for a loong time.

    I did hear that vortex will make a new overlay object but he has a lot on his plate at the moment so I wouldn't expect anything soon.

Similar Threads

  1. Mod7ex Z Sprite Mapping
    By King_Cool in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 7th April 2010, 10:24 PM
  2. Sprite Mapping with Mode 7 ex
    By Atherton in forum Articles
    Replies: 6
    Last Post: 11th August 2009, 01:24 PM
  3. Sprite mapping in Mode 7
    By Atherton in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 10th August 2009, 02:56 AM
  4. active sprite mapping with mode 7
    By Gabriel in forum File Archive
    Replies: 13
    Last Post: 26th January 2009, 03:08 AM
  5. Mod7ex/ sprite mapping
    By King_Cool in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 7th November 2008, 02:46 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
  •