Pages

Thursday 5 December 2013

Culling Methods

In normal usage, the word cull means to eliminate things that are unwanted (e.g. the UK government recently initiated a badger cull because of fears that they may spread diseases to cattle). In the realm of computer graphics, culling refers to removing unwanted elements from the render queue.

Rendering is the action of turning the information from an application, such as a modelling programme or game engine, into an image or video.

Depending on the complexity of the scene, rendering can be a very complicated procedure; For example, an average frame in Pixar's Toy Story 3 took over 7 hours to render (bear in mind that Pixar would be using state of the art technology). Therefore, anything that can be done to reduce render times is very important.

View Frustum Culling

View Frustum culling projects a volume denoting the camera's field of view (FOV), usually a cone shape. It checks to see if entire objects are outside the FOV, they are removed from the render queue.

This method of culling is very effective; in the following scene from Grand Theft Auto IV (Rockstar 2013), many on the objects in the map are likely to be culled by the view frustum technique.

Given the size of the map in this game, rendering everything would reduce the frame rate to unplayable levels or, more probably, cause the game to crash.
It is worth noting that view frustum culling is applied on a "per-object" basis, meaning that even a small part of the object is inside the FOV the entire object will still be added to the render queue.

Backface Culling

Backface culling examines the individual faces or polygons of each object. If the face is facing away from the camera, the face is culled from the render queue. Backface culling can result in a significant reduction in rendering as it generally reduces the number of face by 50% (assuming that the object is symmetrical).