#2D light with perspective

1 messages · Page 1 of 1 (latest)

sly chasm
#

Hi everyone, it's a 2D game and I want to set up proper lighting, but something just isn't working out for me – either the guides are confusing, or I can't find any good tutorials specifically for 2D perspectives. Plus, my characters will be animated and I have no idea how to make the shadows look good. There's also a screen on the left that can be moved by the player and it emits light too, but then (as you can see in the second screenshot) the lighting ends up looking really bad. ||unity 6.1||

digital lichen
#

The 2D lighting system doesn't do perspective at all

#

All shadow casters are infinitely tall, and all lit sprites with their normal maps are on a flat plane
Like the walls and floor of a totally top-down perspective game

#

You can somewhat fake depth with shadow strength and normal map distance, but mostly it's up to you to hide the parts entirely where the illusion would break down

heady rune
#

If you can live with more stylized shadows, that is one option. Alternatively, you can bite the bullet and do 3d lighting.

digital lichen
#

There's also 3rd party 2D lighting assets which are more for isometric and parallax situations

#

3D lighting is useful even in 2D but sprite renderers might fight you along the way

heady rune
#

Somewhere between, you could do some sort of screenspace shadow effect and generate a depth buffer to approximate 3d.