In this tutorial, we will be going over how to add fog to an environment in Unreal Engine 5.
For the fog, we will need an animation but luckily, this is easy and free to find. The ones I used can be found here: https://www.premiumbeat.com/blog/free-4k-fog-overlays/
We also need to break the fog footage down into frames, which will be our fog cards. I used Clideo, but Premiere Pro could also be used.
For this tutorial, I’ll be using the tundra scene we made in the last tutorial, so you can either add this fog to your own scene, or use it for your tundra environment. Either way, the process is exactly the same!
Open the material, and drag and drop the Fog_MediaPlayerVideo into the graph. This is where we’ll set up the material for our animated fog cards.
a. First, click on the MasterMaterial node and go to Blending Options, and under details, go to Material, and then Blend Mode. Select blending mode as Translucent, and tick “Two Sided” to on.
b. Hold M and left click, and repeat this three times to create 3 Multiply nodes.
c. Hold 1 and left click, and create four nodes. Right click, and convert these to Parameters. Name each of them:
d. Set the value of each of these to 10. Then, plug them in so the graph looks like this:
Save and exit.
With that, our set up is complete!
Back in the content browser, right click, and select Blueprint Class. Select Actor, and name the new Blueprint “BP_Fog”. This is where we’ll set everything up.
A Blueprint is Unreal Engine’s node-based visual coding system. It can be used for programming, animation and level design, to name a few. In this case, we’re using it for technical art.
In the blueprint, open the event graph. Go to Components, and click “Add”, and select Plane. Then, under Variables, click the +. Name the new Variable “Media Player”, then select the drop down and navigate to Media Player, shown below:
Now, go to the viewport in the Blueprint Editor and select the Plane. Under Details, go to Materials and set the Material as the FogMasterMaterial Instance. Hit Compile and then Save.
Check out some of the other great tutorials on CGHero.
Looking for assistance with your next project? Post your project and receive quotes from our Heroes.Post Your Project
We are looking for talented freelance artists with a passion for producing cutting-edge 3D CGI content.Become a CGHero