[UE5 Niagara] How to make FOG, MIST and DUST

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi everyone in this video I'm going to show you how to create a localized fog effect with dust suspended in the air using Niagara particles in a real engine 5. before starting let me thank you guys this is still a really small Channel but seeing 50 subscriptions 6000 views and 150 likes in a short amount of time was quite unexpected to be honest so thank you it means a lot to me now let's dive in this tutorial here you can see the dust and fog particle effect in this sample map despite its relative Simplicity it can have a big impact on the perception of a scene making it more mysterious and gloomy let's see how to do it first of all be sure to have an exponential light fog element in the scene and check the box volumetric fog this is necessary because if you don't check this box you won't see any volumetric effects now we proceed to create a new Niagara system by right clicking on the content browser and selecting Niagara we are the hanging particular emitter and click finish I'm going to rename it to NS fog dust then we create a new material for our dust particles and open it we need to set the material blend mode to additive and the shading model to unlit we also need to enable two-sided so our particles are always visible no matter the orientation let's add now a particle color node and connect it to emissive color so we can drive the material color using the values set in the Niagara system now we need to create a round mask for our particles by adding a sphere mask node the first input will be connected to a text core node while the other tree can be set to 0.5 using a single constant finally we add the multiply node and connect to it the particle Alpha and the sphere mask the output goes to the opacity of the material we can now save and close the material editor now let's open the Niagara system we created before the first thing we are going to create is the dust in emitter properties we set the Sim Target to GPU compute Sim we also need to set the bounds inside which the simulation will happen we can go with minus 1000 for the Min and 1000 for the max check also the local space checkbox I'd set the spawn rate in the emitter update group to 800 and the spawn probability to 0.7 meaning that there is a 70 chance in a given point in time that the particle will spawn this will add some Randomness talking about Randomness let's set the lifetime mode in the particle spawn section to random with a lifetime range of 5 to 8 Seconds I've said the color to a slightly translucent Brown to make them appear more realistic while you experiment with systems that spawn tiny particles like this I strongly advise you to set the color to a very bright value like 100 or 1000 in this way you can visualize them easily otherwise you can lose them in the viewport when everything is okay you can go back and set the final color the size of the particles ranges from 0.1 to 0.3 the rotation is random too even if it's not important in this case we have two shape location modules but we only need one so I delete the second one and in the first shape location I'll set the Primitive to box meaning that the particles respawn in a boxer area with values of 1500 for the X and Y and 100 for the Z in the particle update group delete the drag scale Sprite sides and scale color modules as we don't need them to make the particles move we need to add a force in the particle update section the hanging particles preset already has one in it we can leave the noise strength to 5 and noise frequency to 25. I've also added a Vortex Force module with a force amount of one to make it really light I've also set a Vortex origin speed of -1 so that the particles tend to slowly spread away from the center but you can play with this value together with the Kernel's forces to achieve the desired effect in render group we have a Sprite renderer here we need to set the material to be the one we created at the beginning you'll see that the new material does not affect the particle because the material we created is virtually identical to the default one but now you know how it works we can save the Niagara system now and place it in the world to see its effect here you can see that the particles are very bright that's because we set the color value really high but that's just for debugging now we can set it to a lower value okay now we are halfway to the final effect in fact we still need to create the fog we start by creating a material as before but this time will be a different kind of material let's create a new material in the content browser and open it here we'll set the material domain to volume and the blend mode to additive then we add a particle color node we will multiply this with a parameter so let's create one by pressing one on the keyboard and clicking in a empty space of the graph we convert the constant to a parameter and call it Albedo then set the default value to 1. now we can connect the Albedo parameter and the RGB node of the particle color to a multiply node and connect them to the Albedo input of the material in this way we can control the fog color from the Niagara system like in the dust material we created before now we have the particle position absolute word position and particle radius nodes then connect them to a sphere mask like this for the hardness we can create a constant and leave it to zero this will make the fog more smooth then we can create another constant and convert it to a parameter called Extinction then we add it to a multiply node together with the output of the sphere mask the output of the multiply then goes to the extinction input of the material I'd set the distinction parameter to 0.06 this number should be changed according to your needs it affects how much light will be stopped by the fog we can now save and close the material editor going back to our Niagara system let's add another emitter by right clicking on an empty space and select add emitter and then select Fountain the target seam of this emitter will be GPU as well so we check also the fixed bounce box and we set the bounds to minus 1000 for the Min and 1000 for the max check also the local space checkbox in the emitter update group we set the spawn rate to 800. in the particle spawn group we set the mean life time to 3 and the max to 6. the Sprite sides mode should be random non-uniform with a mean value of 50 and 150 while the max values should be quite big something like 300 and 750. at this point the particle viewport will be quite crowded so let's set the material on the Sprite renderer to the volumetric material we created before and wait for the engine to compile the shaders when the Shader compilation is complete you won't see the fog in a particle viewport but don't worry the fog is still there in the shape location module change the shape primitive from sphere to box and choose the size you need in this example I'm setting it to 2 1500 and 200. in the add velocity module set the velocity mode to linear and choose the random range Vector from the little arrow on the right we want the fog to move randomly but not too fast so I'm setting the minimum on 2 1 and -3 and for the maximum I'm setting values of 50 10 and 0. in the particle update group remove the Gravity Force as we don't need it in the scale color module set the scale Alpha curve to ramp up down finally add that Jitter position module and set the amount to 25 and the delay to 0.2 this will make the part of the particles less linear this was the last step save the Niagara system and drag it into the scene if you didn't already and now you should see something like this that's all guys I hope you enjoyed this video and found it helpful if you did remember to like And subscribe to support my work be sure to check also the video description since I've posted a link to a poll that I made on patreon where you can vote which subject you would like me to cover in future videos note that you don't have to be a subscriber to my patreon to vote you just need an account and getting one it's free well it's time to go now see you on the next one guys cheers
Info
Channel: Gono
Views: 45,882
Rating: undefined out of 5
Keywords: ue5, unreal engine, ue5 niagara, niagara particles, ue5 particles, unreal engine dust, unreal engine fog, fog, dust, vfx, particle effect
Id: -_0s0vaNrL8
Channel Id: undefined
Length: 10min 6sec (606 seconds)
Published: Sat Oct 08 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.