Unity2D tuning environmental lighting for Stouthollow Tales

Published January 31, 2020
Advertisement

After we migrated over to the pixel perfect camera in the previous version of unity, and having recently upgraded our project to 2019.3.0f6 we wanted to start getting some of our environmental effects rolling. I briefly considered using particles but haven't dived into them because I haven't found a good application. We basically wanted to accomplish two things:

  1. Get environmental lighting to look good, but subtle.
  2. Supplement the look of environmental lighting with interesting showcase lighting effects (in this example, the fireflies).

To match the aesthetic of Stouthollow Tales we currently have (very low pixel count per tile) I knew that we couldn't go crazy with stuff like volumetric fog or god rays or anything insane like that, but we still wanted something subtle. Post-processing aside, this was easily achieved by giving each type of light it's own hour-by-hour brightness, establishing a sunrise time and a sunset time and changing the color of the light depending. E.g. light from a window would get blue at night and yellow-orange during the day.

Your store at night
Your store in day

This effect was fairly easy to achieve, light-weight and aesthetically effective.

The first of our “Showcase” lighting effect to appear in Stouthollow Tales are the fireflies. Which are very simple light prefabs that Lerp across a specified box collider to create the appearance of a firefly.

Fireflies over a pond

I may write a tutorial on this in the future but it is very simple and takes advantage of the pixel perfect camera to give the fireflies a pixelated effect, let me know if anyone is interested in that.

For reference, my initial code for light intensity (for global lights in an outside scene) went from 0.30 to 0.75 (interpolated over a 24 hour day and 60 min per hour). Using color shifting I we don't go below 0.60 now, which gives our exterior scenes a lot more subtle of a look without making players squint at their screens.

0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement