Post Processing Assignment
This was an assignment set for me to develop a variety of post processing effects which was a mixture of full screen and polygon post processing effects. Many of the post processing effects had to use double buffering to achieve the result and the use of polygon post processing meant that the ordering of the effects needed to be correct. The post processing effects were also stack-able due to the use of ping pong buffers within the application. The next few sections will explain some of the post processes that were put in place:
Colour Wheel Tint Effect
This post process slowly cycles through the complete range of colours tinting the scene as it cycles. It is achieved by increasing the hue slowly until it reaches its maximum and then resetting it back to zero.
High Contrast Effect
This is a technique used to make the light things lighter and the dark things darker. It is implemented by adding up the red, green and blue (RGB) values and dividing them by three to create an average colour. Depending on whether this average is higher or lower than the middle brightness the brightness of the colour is changed accordingly. Functionality was added to increase/decrease the contrast on the scene using Z and X.
Under Water Effect
This is a multiple pass process that simulates the effect of being underwater. It combines a tint, wiggle and blur to create this illusion. In the first pass of this implementation a wiggle is created using the cosine and sine waves in the X and Y directions; a blue tint is also added. The second and third passes are used for the blur. A two pass Gaussian blur approach was used which first blurs in the X direction and then in the Y. It does this by using various amounts of the surrounding pixels colour and adds it to the current pixel.
This is another multiple pass technique which makes bright parts seem brighter. It is achieved by firstly pinpointing the bright areas, blurring these and then adding the blurred bright areas to the original scene. This was implemented using the Gaussian blur once again which meant the technique was five passes rather than four. This effect is extremely popular in the games industry as it gives the illusion of increased range of colour. It also gives a much brighter feel to the game. This is one of the first parts to having full high dynamic range (HDR)
Depth of Field
This is an advanced technique that recreates the way in which a camera’s focus works i.e. things that are closer than the focus area are blurred and things further than the focus area are also blurred. In the first two passes a blurred version of the scene is created using the Gaussian blur. The third and final pass is quite complex. Firstly the near and far values are needed to show at what point the scene is fully blurred. A focal point is also needed somewhere between the other two points. Depending on how far away from the focal points depth the current pixels depth is; means how much the original scene is blurred. This gives the effect of a gradual fade from blurred to normal scene and then eventually back to the full blur. This sort of post process is often used in cut scenes as it can be very effective when used properly. It is also great for directing the player’s eyes to a certain area or point. Controls were added to the application to allow the user to the distance of the focal point.
Polygon Post Processing
Polygon post processing techniques were put into place to add effects such as colour tints, water ripples and shattered glass. There were various implications when trying to stack these polygon effects with full screen effects which meant the ordering of the post processing effects had to be handled carefully. The image to the right shows the polygon post processes that were implemented.
Depth of Field and Polygon Post Processing
This image shows the tint polygon post processing working with the full screen depth of field effect. Handling the ordering of these effects was a tedious task and it is no surprise that most games avoid using both types of effects at the same time.
My next step with this small project would be introducing crepuscular rays(God Rays) as a post processing effect. Implementing this would be fairly simple as the theory is quite basic and the outcome is great when the values are tweaked. Many games at the moment have some form of this post process although many have gone slightly over the top.