Tuesday, February 12, 2013

Post-Processing Effects

Post-Processing Effects!


  Our last lecture went over Post-Processing Effects.  Through these effects, you can create different tones, highlights and visuals which add appeal and feeling to your game.  One of these effects which we went over in detail was bloom.  Through bloom, you can brighten up your scene and create a warm toned atmosphere.


  The above image shows the same scene, one with classic rendering, the other with HDR rendering.  with the HDR rendering, you notice the bright areas within your view become brighter.  You also see this hazy, colour seepage within the image.  This is due to you taking the same image, applying different effects to them, and then adding all the effects together.  For bloom, you first take your image and raise the brightness within it, making bright areas even brighter.  Then you take your original scene again, down-sample it to create a blurry, pixelated scene.  Finally, you take your original scene without any HDR rendering down to it, your bright scene and your blurry scene, and you add them together to get a basic bloom effect.  

  We also talked about Cel-shading.


  You achieve cel-shading by creating a range of numbers for colour.  If a value for a pixel falls within a certain value, you output one colour, if it falls within another, you output a different colour.  It works similar to a gradient, and there are no colour blendings between these colours, it is either one colour or another. 

  If a value falls below a certain threshold, you output black.  Finally, you highlight the edges in black, which really pops your scene.  This effect is simple, but can really add character to your game.

  Polishing your game with post-processing effects creates beautiful visuals, and helps distinguish the look of your game.  There are so many things you can do with post-processing, and I look forward to learning more about them.

Sunday, February 3, 2013

Shadow Mapping

Shadow Mapping 

 

  Last week, we talked about Shadow maps.  Shadow maps create realistic shadows within the game, and are computationally light.  They add great effects, and can allow you to hide imperfections or improve game play, such as hiding an enemy within the shadows.  They also allow you to create depth, giving it a more visual appealing look.  Below, I will show you some key shadow maps done in a game called "Path of Exile".


  Now, first thing you might notice, is there are a TON of shadows in this screenshot.  This seems to be a common theme throughout the game, as it goes for this dark feel.  Here, you can see shadows being casted by me, the merchants, and the different objects within the scene.  You can also pick out which light sources are casting these shadows.  I am currently standing quite close to the fireplace, and that is casting a very long shadow behind me.  However, I have a second, very faint, shadow being casted by the torch beside the treasure chest.  You might not be able to make it out in the screenshot, but it was very noticeable whilst playing the game.  With these multiple light sources, you achieve some really cool looking shadows and effects within the game.


  Here, I am in a cave.  You can see a  large light eminating from me in a circle, which will increase and decrease in radius based on how much HP you have.  You can see the rock pillars casting large shadows related to the position of where you are.  You are also unable to see what is outside of the circle of light, because if you were to look from your point of view, you would not be able to see what's behind the rock wall.


  Finally, here I am outside.  The sun is the biggest light source in this screen shot, and you can see the shadow that I am casting in the opposite direction of the light source.  You can also see the reflection of the sun off the water, at the bottom of the cliff.  There are also light shadows being casted by the grass, but you can't really make it out in this screenshot.

  Shadow mapping allows us to emphasize depth, create a more visual appealing game and improve realism within games.  Look forward to my next blog post on post-processing effects!