How to make lights affect 2D sprites/flipbooks

Hi I’m making a game using sprites and flip books etc. But I noticed that lighting only affects BSP and meshes.

Is there a way to make lighting act the same way for 2d sprites/flipbooks as they do with BSP and meshes?

Hi Matt,

If you’re using the Paper 2D starter template, you’ll want to make sure that the camera in the character is not set to Orthographic. Currently not all light types are supported and there are known rendering issues with that view mode. You can change this in the Character’s BP by selecting the camera and selecting the camera then setting it from Orthographic view mode to Perspective.

Aside from that, check to make sure that your flipbook material is set to Lit and not Unlit, otherwise you’ll see lighting issues since it can’t be lit.

I checked this against 4.10.2 since I don’t readily have 4.9 installed at the moment.

If that’s not it, can you provide screenshots and settings being used for your flipbook material that can better help assess the issue.

Thank you!

Tim

Hi thanks for your help, everything you have said above is accurate. I have noticed that since changing the camera to perspective. The character sprite is fuzzy, blurry or unclear and sometimes looks like it has a duplicate of itself.

Also I noticed that in the perspective view on the camera that, the blocks that I have aligned perfectly look separated and also overlap each other due to the camera change, depending on where the camera is set on the character. Any way to help with that?

Are there any solutions for this as you see in the image is the best I could capture.

Perspective camera definitely brings a host of problems with 2D games.
I have a few questions for you that might help sort these issues out:
1-What is the FOV of your gameplay camera?
2-What is the distance between your gameplay camera and the sprites?
3-Do you have any post processing enabled?

As of 4.26, changing sprite material to lit, fixes the issue for me even with an orthographic perspective.