Skip to content

Lighting and GI

Ciro Continisio edited this page Mar 1, 2021 · 9 revisions

The lighting model in Chop Chop is pretty simple, and it relies a lot on the shaders to deliver its look. In short, we bake GI using Subtractive mode mixed lighting and then we process lightmaps with the shader, while realtime objects receive light from Light Probes.

Light Setup

The scene setup is extremely simple: we have just one directional light representing the sun and set to Mixed mode. This light has intensity 1 and colour #FFF4D6 (for full day scenes), and is set to provide Soft Shadows.

Skybox and Ambient

The skybox is a Cubemap skybox material using a custom cubemap which we bake in the scene Scenes/Skybox/ClearSky, using a Reflection Probe placed in the centre of the scene. This scene is not actually used in the game.

[Sky scene]

For the purpose of baking the sun in the cubemap, we have a fake sun in the sky done using a simple white sphere (seen in the image above).

However, in normal scenes the ambient lighting is provided using a gradient: #B1BFD4 (Sky) #23353F (Equator) #1E241E (Ground).

[Ambient settings]

Baking settings

For baking GI, we use Mixed lighting mode set to Subtractive. Realtime shadow colour doesn't matter, since it's forced to a different colour in the shader.

When we bake lightmaps, much of the nuance of the lightmaps is actually lost because of the toon shader approximating gradients. For this reason, many baking parameters like the number of samples or the lightmap resolution don't make much of a difference.

[BakingSettings]

The only important parameters are the ones as follows:

  • We bake Ambient Occlusion and sometimes with Direct Contribution set to 2, to make it stand out a bit more.
  • Lightmap resolution is set to very low values, like 10 or even 5 in some big scenes. When making test bakes, we go down to 2.
  • Directional mode is set to Non-Directional because we don't need that extra set of maps, given that we don't use a PBR workflow.

Home
Video materials

Basics

World building and Graphics

Game architecture

The game systems explained, with API examples. For programmers.

Game design

How-tos for designers to expand the game's gameplay.

  • Adding quests
  • Adding items
  • Creating dialogues
  • Making a cutscene
Clone this wiki locally