Dev Blog and other stuff

Legend of Dungeon - Dynamic Lighting on Sprites

So I’m using normal mapping on pixel art. I’m surely not the first to think it up, but I don’t know of another game thats doing this (if so please let me know :D)

Here’s what it looks like without normal mapping:

And with:

Ignore for a moment the bricks making up the level, and those blob shadows under the characters. Almost all the shading on the sprites is done by the lights via the normal map. Why is this cool? because it means I can have moving lights that change the shading on the sprites:

Check out that skeleton in the pirate hat! blue lit on one side, red on the other. looks pretty rad. Here’s without the normal mapping:

yep.

So, how am I doing this normal mapping magic?

1 Have some awesome pixel art. I am using this awesome art from svh440

Then, I deshade, and animate it.

Next I enable most of the overlapping layers and build a combined heightmap, darker further back, lighter closer:

I could animate the heightmap, but so far that hasn’t been necessary.

This then gets a gradient over top to add more depth.

Woosh, into unity!

Heightmap gets made into a normal map:

Normal Map goes onto a Transparent/Cutout/Bumped Diffuse:

here you can see I have a sprite sheet that I scroll through for animation, but the normal map stays the same. If there is nothing to render for a particular pixel, it just ignores the normal map.

and BAM! Dynamically lit Skeleton:

  1. tntnblrblr reblogged this from robotloveskitty
  2. nekomori reblogged this from robotloveskitty
  3. the-13th-anthology reblogged this from robotloveskitty and added:
    Wooo, I actually did think about this but didn’t know how to do it!
  4. thomskrlsson reblogged this from robotloveskitty
  5. peehime reblogged this from robotloveskitty
  6. headwearenthusiast reblogged this from robotloveskitty
  7. m0sak1 reblogged this from robotloveskitty
  8. wapamup reblogged this from robotloveskitty
  9. corwinj reblogged this from robotloveskitty
  10. lilwildman reblogged this from robotloveskitty
  11. robotloveskitty posted this
blog comments powered by Disqus