Website powered by

KZ:M - Lighting technical breakdown

Here is a brief breakdown on how the lighting pipeline was setup for Killzone Mercenary. This was a heavily lightmap driven project, dynamic lights were very rare, only really applied to muzzle flashes and VFX plus a small amount of carefully placed level lights. Sunlight was partially dynamic but with most of the work pre baked. We had some really good approximations of blob and stencil shadows from dynamic characters which did a fantastic job of making the lighting feel more dynamic than it actually was.

This is a maya test render of the DLC MP08 map of KZ:M.

This is a maya test render of the DLC MP08 map of KZ:M.

Here is what you worked with in Maya, standard maya lights plus some ATG nodes for geometry and custom light types.

Here is what you worked with in Maya, standard maya lights plus some ATG nodes for geometry and custom light types.

Here are the lights test rendered on direct only.

Here are the lights test rendered on direct only.

Here the lights are test rended on indirect (bounce) only. Note the pipeline here didn't pass through material colours, all bounce light was based on a default grey material.

Here the lights are test rended on indirect (bounce) only. Note the pipeline here didn't pass through material colours, all bounce light was based on a default grey material.

Here is more or less the same view shown in game.

Here is more or less the same view shown in game.

Here is another section of the level where I had some fun with an overly dramatic light behind a fence.

Here is another section of the level where I had some fun with an overly dramatic light behind a fence.

This shadow is just overly dramatic and serves no gameplay purpose but it is fun. Note I set the lightmap density on the back wall to be higher than normal to make the shadow clear.

This shadow is just overly dramatic and serves no gameplay purpose but it is fun. Note I set the lightmap density on the back wall to be higher than normal to make the shadow clear.

And here's an in game screenshot of the surrounding area.

And here's an in game screenshot of the surrounding area.

One trick we did on KZ:M was to split off geometry that had no sunlight hitting it. This saved lightmap data as we could bin off a channel and simplied the shader slightly for performance.

One trick we did on KZ:M was to split off geometry that had no sunlight hitting it. This saved lightmap data as we could bin off a channel and simplied the shader slightly for performance.

Here is an example of one of the lightmap channels for a random bit of geometry. This contained the colour and high frequency brightness but not low frequency brightness. This was an 8bit texture

Here is an example of one of the lightmap channels for a random bit of geometry. This contained the colour and high frequency brightness but not low frequency brightness. This was an 8bit texture

We had a seperate 32 bit texture which is combined to get the overall brightness. This texture was significantly downsized to save memory. I've upscaled it again just for consistency.

We had a seperate 32 bit texture which is combined to get the overall brightness. This texture was significantly downsized to save memory. I've upscaled it again just for consistency.

This is the sunlight calculcation that is processed as an SDF in game to be extra sharp. This was actually rendered at 4x resolution offline and then downscaled to make it as clean as possible.

This is the sunlight calculcation that is processed as an SDF in game to be extra sharp. This was actually rendered at 4x resolution offline and then downscaled to make it as clean as possible.

This is the mean light direction texture used for normal and specular shading. This is a tangent space value for what direction the light is coming from.

This is the mean light direction texture used for normal and specular shading. This is a tangent space value for what direction the light is coming from.

This is a 'directionality' texture. White means the light is coming very strongly from one direction, black means it is very ambient. This affected the normal and specular shading.

This is a 'directionality' texture. White means the light is coming very strongly from one direction, black means it is very ambient. This affected the normal and specular shading.