AuthorTopic: Specular lighting  (Read 3130 times)

Offline ConfusedSheep

  • 0001
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile

Specular lighting

on: December 19, 2018, 08:36:02 pm
Hello there  :)
I'm not a pixel artist, but I still have a couple of questions about it. I have dynamic shadows (copy of sprite drawn unto the background at a displacement determined by the position of the character and the position of the light blocks out light) and specular lighting in my 2D platformer with pixel art. For the specular lighting, I was thinking of using normal maps generated by a tool like Sprite DLight.

Do you think it's a good idea to have automatically generated normal maps like this for everything?
To what degree should the unlit raw sprites have shadows and shading? (just to be clear, this is what I mean by shadows and shading, image is a bit large and not mine, so I'll just post the link): https://pbs.twimg.com/media/CvZxXkPXYAAjXam.jpg

Thanks

Offline eishiya

  • 0100
  • ***
  • Posts: 1266
  • Karma: +2/-0
    • http://pixeljoint.com/p/28889.htm
    • View Profile
    • Website

Re: Specular lighting

Reply #1 on: December 21, 2018, 12:26:43 am
If the lighting in your game is mostly static or sharply toggles between a few modes, then don't use normal maps and just hand-draw the highlights. Static highlights that don't quite match the lighting usually look fine and players don't notice them. However, if you have dynamic lighting, then dynamic highlights (and/or shadows) to match it can add a great bit of extra visual polish.

Normal maps + automatic lighting on pixel art rarely look as good as manually-drawn lighting, and this is compounded by automatically-generated normal maps usually having some kinks. You will probably want to manually tweak your normal maps to make them interact with your lighting just so, e.g. to emphasise important details or flatten unimportant textures.

Your unlit sprites should probably have ambient occlusion (non-directional shadows in crevasses where light doesn't tend to reach), but no directional lighting or highlights.

Offline ConfusedSheep

  • 0001
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile

Re: Specular lighting

Reply #2 on: December 21, 2018, 07:48:57 am
Thanks for the advice! Only drawing ambient occlusion seems logical. I have directional lights like immobile and mobile torches, so I think dynamic shadows and specular lighting is a good fit. There will be a lot of sprites and animations to make normal maps off, so I'm thinking I could probably get away with making the normal maps more polished for the player, important objects and bosses and less so for the rest. This might also make these important things stand out more in the scenery.