This is the seventh day of my participation in the August More text Challenge. For details, see:August is more challenging

Recommended reading

  • CSDN home page
  • GitHub open source address
  • Unity3D plug-in sharing
  • Jane’s address book
  • My personal blog
  • QQ group: 1040082875

Adding lighting to the scene can enhance the atmosphere of the scene and make the player experience better. Today I’m going to share 7 tips on how to tweak lighting effects in Unity to make the atmosphere of a game scene more engaging.

1. Use linear color Spaces

Before adding lighting to the scene, try to make the color space Linear. The linear color space will be closer to the rendering of the real environment. Unity uses Gamma Color Space by default. Go to Edit > Project Settings > Player, find the Color Space property under Other Settings, and set it to Linear.

Comparison of Gamma and Linear effects (no post-processing)

Comparison of Gamma and Linear effects (including post-processing)

2. Use Global Illumination (GI)

More realistic lighting can be achieved using global illumination (GI). Rather than limiting light to one surface from a source, global illumination systems can model the way light reflects or refracts from one surface to another (indirect illumination).

Real-time global illumination switch comparison

To enable Global Illumination, go to Window > Lighting > Settings and open the Lighting panel. Select Realtime Global Illumination under Scene. Set Indirect Resolution to change the Resolution of real-time global lighting.

Baked GI and precomputed Real time GI have some limitations. Both only calculate light from static objects, so dynamic objects can’t reflect light onto other objects, and vice versa. But dynamic objects can use Light Probes to receive Light reflected from static objects.

3. Light color coordination

Lighting must be set with attention to the effect of its color on the overall atmosphere of the scene in order to create more beautiful and harmonious lighting.

Two main colors, blue and orange complement each other

Three similar primary colors, from green to yellow

Two main colors, blue and orange complement each other

Different lighting colors bring a completely different atmosphere to the scene:

4 try to use light colors

Use light and don’t oversaturate your colors. Light will look more natural and comfortable.

Saturated light contrasts with light

5. Adjust Settings constantly

Try changing the direction of the light and the shadows, and see and compare the different effects. To find the most appropriate Settings.

6. Adjust the ambient colors

Try adjusting the Ambient Color to change the shadow Color for a more realistic and natural shadow effect.

Open the Lighting panel by clicking Window > Lighting > Settings. Under Scene, set Environment Lighting Source to Color and Ambient Color to the appropriate Color.

7. Use post-processing effects

Use the post-processing effects package provided by Unity to make the lighting of the entire scene more intense. You can download the post-processing effects resource pack from the Asset Store resource Store. Here’s an example of post-processing effects in Unity 5.6:

Comparison of whether post-processing effects are enabled