Show all projects | Show more projects in the category Tech Demo's

Unity FogOfWar

This project was created by Simon Karman. Published on Monday 23 September 2013. This project was viewed 1126 times.
An Unity Utility to show an Age of Empires II alike FogOfWar in your game.

unity_fogofwar

I created a Fog of War Utility to easily create and manage an Age of Empires II alike FogOfWar in your game.

As seen in the picture above with only 2 scripts and 1 material you can create a really great looking Fog of War for in your own game.

Simply create a new gameobject in your scene and add the FogOfWar component to this. In this component you can change the appearance of the FogOfWar.
You can change the densitiy
The curve that determines the fall off strength of the FogDissolvers
And you can specify the material that should be used to render the FogOfWar

The material that you use for the fog of war should use the shader provided in zip in the graphics folder. As an example texture for this shader you could use the cloud.png provided.

Now you have setup the FogOfWar you can start creating your FogOfWar dissolvers. These dissolvers will dissolve the FogOfWar around them. You can specify the intensity and radius of each FogOfWarDissolver.

Have fun and bring my code to good use! :)
If you use my code you have to entitle me in the credits of your game.
You can download this project here: Download Unity FogOfWar
You can view documentation about this project here: Documentation