Very easy way to implement a fake fog volume to use in your Unreal Engine 4 projects.
Fake fog volume in Unreal Engine
This easy to do tutorial will let you create a fake fog to use in your Unreal Engine project. But with the ease of creation come a few cons: there are no sides to the fake volume, and it doesn’t look that great if looking from inside the volume.
Fake Fog Material
First of all, let’s create the material and call it M_FakeFog. Don’t forget to change the Blend Mode to Transculent.
Let me explain some of the nodes:
- Color and Emissive Color are both Vector Parameters
- EmissiveStrength, DepthOpacity and DepthFadeDistance are all parameters. You can see their default values in brackets besides “Param” word.
- 0 that goes into the “Alpha” input of the Lerp node is a constant.
That’s it. Save your new material and create an instance of it, so you can tweak the parameters on the fly.
Fake Fog Blueprint
Now create a blueprint Actor (I called mine BP_FakeFog, duh).
- Add an InstancedStaticMesh component.
- Choose a static mesh to use as a fog layer (you can go pretty wild here, but I used one of the default planes that comes with the engine). You will need to assign it in the corresponding field in the InstancedStaticMesh component. Assign the material instance you created earlier here as well.
- Add two new variables — NumberOfInstances and SpawnDistance, both of them are ints. Set the default values to 5, for example.
Now, in construction script, do the following:
Now put the bueprint somewhere on the level, play around with the parameters — do as you please!