Rendering (Client) - Start Here

Rendering Pipeline

The rendering process is broken into a series of steps that are collectively referred to as the pipeline. These are, in sequence:

  1. Rendering the geometry of the scene to the depth buffer only. (Sometimes called depth pre-pass). Each draw call is one mesh (a model is a collection of meshes)
  2. Generating the shadow maps and ambient occlusion from step 1.
  3. Re-rendering the geometry to a full-colour buffer.
  4. Rendering particles.
  5. Rendering atmospherics: background, foreground, fog, and finally Color Grading as the last step.
  6. Rendering UI elements.

Mesh Set-up and Rendering

Meshes are rendered either as basic meshes or as skinned meshes. Both types of meshes contain the same material definitions, but skinned meshes have their vertices transformed by an array of bone indices and weights attached to each vertex.

The discussion of how animations are done and how the weights are derived is outside of the subject of rendering and is covered under the Animation card.

The process for rendering the meshes is used in a Multi Render Target setting to output the Shadow Map and the Bloom textures.

By the end of the mesh rendering process, the color buffer should contain both basic and skinned meshes, ready to be post-processed.

Material Definitions

All in-game meshes will use a single type of material, called the Standard Material. This is a non-PBR material that we will start with. Later on, we can move to a PBR approach once the ground work is established and the pipeline works.

The material properties are:

  • Albedo Texture
  • Color Mask Texture 1
  • Color Mask Texture 2
  • Normal Texture
  • Specular MaskTexture
  • Emissive Mask Texture

Color masks as well as emissive mask each have an associated RGB color.

Post-Processing Effects

Once the meshes are rendered to the color buffer, and the Shadow Map, Ambient Occlusion and Bloom buffers are prepared, the next set of tasks in the pipeline involve:

  1. Rendering any full-screen parallax backgrounds and foregrounds. Space backgrounds are a good candidate for a background, whereas a subtly opaque gradient may function well in the foreground to indicate tundra or sand dune-like conditions.
  2. Blurring the Shadow Map, Ambient Occlusion and Bloom textures to soften them up and give the game a bit of a softer look in general, without blurring the actual scene in any way.
  3. Combining the blurred textures back into the main color buffer.
  4. Rendering any anamorphic lens flare effects as camera-facing billboards.
  5. Applying a Color Grading effect that further allows an artist to tune the colors that a player will see based on their location and conditions (ie. wash or over-saturate the colors out if their health status is critical).

User Interface

Finally, the last step in the rendering pipeline is the user interface itself, which does not have any effects applied to it. It is therefore rendered after the color grading step.

User Interface has it's own list, but from a rendering perspective the UI elements are all rendered in pixel space as rectangles, so they are completely orthogonal to anything that happens in the game world.