A guide to add Awesome visuals to your 2D game using POST PROCESSING in Unity
Intro
When it comes to improve the visual appeal of your game in Unity, Post Processing is the first (and probably the best) option. Post Processing means adding extra image effects before rendering the graphics on screen. The fact that they are added before rendering makes them a bit resource demanding but this cost on performance is far less then the results you get. So this guide will make you comfortable with the Post Processing Package that comes with Unity.
Post-Processing Package
Get the Post Processing Package from the package manager. If you don't know, then just go to Windows -> Package Manager -> Post Processing -> Click install. Wait for some seconds and that's it you are ready to add awesome image effect to your game.
Set Up
After importing the package, Select your Main Camera gameObject and add two components : Post Processing Layer and post Processing Volume. Post Processing Volume provides various options for effects and Post Processing Layer applies those effects to your gameObject i.e. Main Camera.
Click on the layers drop down in Post Processing Layer and select Default. This will apply the effects to the Default Layer. You can choose any other layer if you want.
Check 'is Global' checkbox in Post Processing Volume. This will allow Main Camera to take effects from the Post Processing Volume component.
In the Main Camera component turn off MSAA and turn on HDR.
Click 'Add Effect' button in Post Processing Volume component, select Unity and click on Bloom. This will add a bloom effect to your Game Camera. Similarly you an add various effects as per your needs.
The most commonly used Post Processing effect for a 2D game.
These effects when applied properly will dramatically the visuals of your game. Remember that these effects are for 2D game. There are more effects that are for 3D games. It is highly encourage that you mess around with the settings and explore the entire Post Processing Package.
Click on the layers drop down in Post Processing Layer and select Default. This will apply the effects to the Default Layer. You can choose any other layer if you want.
Check 'is Global' checkbox in Post Processing Volume. This will allow Main Camera to take effects from the Post Processing Volume component.
In the Main Camera component turn off MSAA and turn on HDR.
Adding Effects
Click 'Add Effect' button in Post Processing Volume component, select Unity and click on Bloom. This will add a bloom effect to your Game Camera. Similarly you an add various effects as per your needs.
Effects Description
The most commonly used Post Processing effect for a 2D game.
Bloom : Bloom is a Post Processing Effect that blurs the bright part of your game so that they appear to be glowing. This effect is very useful for Fire And Lights.
- Threshold : The threshold value determines how bright your object should be in order to be registered by the effect. A low value will make everything glow and a higher value will only allow brightest object to glow.
- Intensity : The intensity value determines the amount of bloom applied.
- Soft Knee : It determines how much smooth the transition should be from glow to normal.
- Color : It determines the color the of the Bloom.
- Anamorphic Ratio : It stretches the effect horizontally or vertically. Better to leave it as it is :)
- Fast Mode : It reduce the quality and improves the performance. Better to use it for mobiles.
- Diffusion : It increase the glow effect.
Color Grading : Color grading is the most used Post Processing
effect. It can add an additional color tint to your game. Color grading is used to set the mood of your game. The thing that actually matters at a beginner level is Track Ball.
- Track Ball Lift : You can shift the the hue of your game by dragging the little circle towards the desired tint.
- Track Ball Gamma : You can drag the circle towards your desired tint to change the tint of your mid range tones. (Don't force yourself to get the meaning of these complicated terms, just play around with the setting and you will find how easy they are).
- Track Ball Gain : It changes the tint of your dark toned areas.
Vignette : Vignette is also an amazing image effect that can improve your game visuals a lot. It darkens the edges of the screen corners and makes your Camera a bit old aged.
- Mode : Here you can switch between Classic and Masked. Classic just darkens the corners and works on a circular mask. In masked mode, you can specify a custom mask that will be used for the effect. Generally you will need the classic mode.
- Color : It is, as the name suggest, the color of the effect.
- Center : It specify the center of the circle that is used for the effect. Note that (0.5,0.5) is the center for the circle.
- Intensity : It determines the intensity of the effect.
- Smoothness : It determines the transition between the dark and main areas of the screen. A larger value will make the effect blend between the real world and the effect, and a smaller value will immediately transition between the effect and the real world.
- Roundness : As the name suggest, it determines how round your effect should be. A lower value will give you a square like effect and larger value will give much circular effect.
- Round : It actually makes the effect perfectly circular. This is not always encouraged, but can be useful in special cases.
Grain : Grain add a rough look to your game. It mimics the old aged Camera and render the graphics by adding a bit of roughness. It is hard to explain how it actually is. So better perform these in Unity Editor as you go along.
- Colored : This will add colored grains.
- Intensity : Increases the opacity of the effect. A higher value will add more opacity to the grains than the lower value.
- Size : It will determine the size of the grain particles.
- Luminance Contribution : It will allow the particle to share the background color intensity.
Lens Distortion : It will distort the camera lens to make it act like fish-eye or inverse fish-eye.
- Intensity : This will control the amount of distortion.
- X Multiplier : This will independently control the amount of distortion on the x-axis.
- Y Multiplier : Same as above but for the y-axis.
Mess around with other settings to get their importance :)
Chromatic Aberretion : It distorts the camera but outside the mask of the Sprite specified.
- Spectrul Lut : Here you can specify the mask.
- Intensity : Here you can determine the intensity of the effect.
- Fast Mode : Check this if you are working with a mobile game. Reduce quality but increases performance.









Comments
Post a Comment