Overgrowth graphics overview

Add comment!

December 16th, 2010

I haven't had time to write any new tech posts during the rush to get the gameplay structure in, but for now I decided to consolidate some previous tech posts into an overview of core rendering in Overgrowth. If you're new to the Wolfire blog, this should be a good intro to the Overgrowth graphics technology!

Since the game primarily takes place outdoors in open environments, I really wanted to capture a natural feel to the graphics. To achieve this I made some decisions that are not appropriate for many other games, like using a forward renderer and baked shadow maps. There are trade-offs to these decisions, but I think they are worth it to give the game its distinct look.

Land and sky

The base for every scene is the land and sky. The sky is based on a panoramic photo[1], which is converted to a skybox at run-time. The terrain is based on a heightmap, which is then simplified[2] using quadric error metrics and divided into patches for frustum culling. Finally the terrain and sky are combined into a new skybox[3], and the edges of the terrain are faded to blend in[4]. This new skybox is then blurred to use as a lookup for lighting and fog color[5]. The terrain also has four normal-mapped detail textures[6], which are blended based on a weight map, and automatically tinted[7] to match the base color map. The detail textures fade away[8] in the distance to avoid any visible tiling, but the heightmap normal mapping keeps the large-scale detail[9]. This same technique is also used for some large objects, like buildings, cliffs and boulders.


The shadows for the environment are created by supersampling traditional shadow maps on the GPU[10]. Ambient occlusion[11] is baked by accumulating shadows from 200 different directions, so it is a lot slower to bake, but does not have to be rebaked when the lighting changes. Character shadows are created dynamically using the traditional depth map technique, but it reads the environment shadow when it's projected so that it doesn't darken areas that are already in shadow[12]. Similarly, when the environment shadow is read, it is also projected back onto the character[13], so the baked environment shadows are actually cast back onto his body.


To light objects, the diffuse and specular components are calculated, and then added together[14]. The diffuse and specular components are divided further into direct and ambient components, which are modulated by the baked direct and ambient shadows[15]. The direct components are calculated using the standard NdotL and half-angle methods, and the ambient components are calculated using lookups into the blurred skybox textures[16]. The weighting of the direct and ambient light can be controlled by 'scaling' the sun, which controls how concentrated its light is[17]. Because of the forward rendering, different materials can have special effects like translucency and rim lighting, for example to make fur light up around edges[18].

Checklist features

The rendering also supports many standard checklist features like soft particles[19], imposters[20], gamma correct lighting[21], post processing shaders[22], automatic texture atlases[23], and instancing[24]. A number of the traditional techniques have a bit of a twist in Overgrowth, for example, some normal maps have been softened to simulate translucency (such as grass[25] and fur[26]), and the lens flare[27] is based on the anatomy of an eye rather than a camera.

I should have a chance to write some new tech posts soon, but I hope this helps new subscribers catch up for now!