Spirit Crossing: Cell Shaded Lighting Model

Spirit Crossing has a cartoony style which pulls from sources such as French artist Jean Giraud’s works as well as the works of Studio Ghibli. We knew we needed a flexible cel shaded model with an arbitrary number of light sources. This precluded existing methods such as applying a threshold in a post process, or using pure unlit materials with a custom lighting function.

Therefore, I was tasked with modifying Unreal Engine to implement a custom “stylized” lighting model which could be selected when creating new materials. This lighting model applies a hard threshold to the NL term, as well implementing a custom specular term based on roughness. We decided to avoid Unreal’s built-in ambient terms and fog, and instead opted for a “CustomLightingFunc” material node which is shared by all lit materials – this node applies cubemap sampling for metallic surfaces, as well as ambient lighting and distance fog based on the current time of day & weather.

Later, I was tasked with finding a way to support warm interior lighting regardless of the time of day or weather. The approach I ended up taking was “ambient volumes”. An axis-aligned volume could be placed around a building, with a configurable falloff and ambient color. As the camera enters the volume, surfaces near and inside the volume are lit with the ambient color specified by the volume rather than the current time of day ambient color.