[UE5 Niagara] How to make realistic FIRE

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi everyone today I'm going to show you how to create a realtime fire simulation using Niagra particles and 3D gas Dynamics in a real Engine 5 you can see the simulation playing in the editor right now I've used it to make a campfire but you can use it for what you need before starting be aware that this is a real-time simulation so it looks good but it's performance heavy you might use it for a main scene a cinematic or to set on fire something that is really in the center of the screen using multiple simulation like this at once is possible but should be done really carefully and optimizing them as much as possible now let's make some file first of all let's create a new Niagra system by right clicking the content browser and selecting Niagra we add the font and particles emitter and click finish I'm going to rename it to nsor Fire and open it this emitter will be the guide for our 3D gas simul ulation in fact these particles will be spawned but won't be actually drawn on the screen in emitter properties we need to set the meter Sim Target to GPU compute Sim next let's increase the spawn rate value to 300 the meter won't reach that value since the particles will die pretty soon in fact in the particle spawn group we leave the lifetime mode to random but we reduce the lifetime to 0.1 note we could also set the mode to direct set since mean and Max values are the same but having it in the range is useful for a quicker experimentation with asimetric values scrolling to the shape properties let's set the Primitive to ring dis and radius to 20 the distribution is better to be set on uniform so we are sure there are always particles at the bottom we have a pretty high velocity values right now so let's set them to minimum of 70 and a maximum of 90 that's because we are going to disable the Gravity Force so the parot will fly upwards freely but not too much since the lifetime it's low and it will make them disappear before going too high for now the effect seems far from what we are aiming for but remember that this emitter is just the guide for the gas simulation in the particle update group let's add a collision module and if you want a lighter effect you can skip this part but for the sake of realism I'm going to keep it on I'm going to set the GPU Collision type to analytical planes CU it gave me a good result and it's the cheapest Collision type in terms of performance now we can finally add the module that will pass data from this emitter to the fluid gas emitter that will create next the module is called fluids gas Source after adding it we can see that it has three parameters that have a great influence on our final fire simulation for now we can leave them to their default values it's time to create the second emiter now so right click in the canvas and click add meter select parent emitter and search for G 3D gas Master emitter you will see the simulation starting right away but it's better to Poise it for now to not slow down the engine too much to make a campfire a big render area is not needed so I'm going to shrink it down to 100 100 and 160 as you can see the SIM imulation is now constrained in a much smaller area and this is also good for performance in fact you always want to optimize the simulation area as much as you can so it won't click the simulation itself but also avoiding to make it too large and waste computing power let's lower the resolution to 160 and the pressure solve iterations to four the first setting acts on the bigger axis of our simulation area in our case the Z since it has a dimension of 160 and tells the engine how detailed the simulation will look the second setting represents how many steps the engine will perform to calculate the particle pressure in the simulation of course higher steps will make it more accurate but lower always be careful when playing with these numbers as you may crash the editor so it's wise to save off for your work okay now we can link the two emitter together so in the meter spawn group let's open the particle source and set the particle Source type to a meter in the emitter name we have to enter the name of the font and emitter we created before and click it in the drop down we can now go to the sourcing stage and turn off the grid 3D gas sphere Source this makes visible the link between the two emitters we just made let's turn off also the compute curl stage to make the effect lighter but still realistic let's go back to the font an Emer and change the parameters in the fluid's gas Source we saw earlier this values are quite sensitive meaning that a small change can lead to quite dramatic results so I suggest you to experiment gradually with them playing with these values you will quickly realize that density and radius seems to do almost the same thing but they are not you can think of the density like the initial density of the gas before the simulation starts so putting a high number here will result in a starting situation of high pressure like if a lot of gas was condensed in a very small sphere when the simulation starts the sphere disappears leaving the gas free the redus value instead indicates the dimension of the Spheres that's why the two parameters seem to do the same thing because their combination Define how much gas is contained in every sphere so here's what happens the font emiter is linked to the gas emiter defining how many spheres will be spawned remember that we set its spawn rate to 300 before and their location then the gas emiter simulates the fluid dynamics in fact we can turn off the Sprite renderer of the font emiter and the effect will still be simulated okay back to the fluids gas source to replicate the effect we saw at the beginning of this video we have to set the density to 0.5 and radius to six you can notice that we still have only smoke there's no fire that's where the temperature parameter comes to play if you change this now it won't affect the simulation and that's why we have to tell the gas emiter to take it into consideration so let's go back to the meter summary of the gas emitter scroll down to the attributes and check the temperature box as we do so we'll see this Fierce fire burning our retinas so let's reduce its intensity going back to the fluid gas source of the fimer and set the temperature to 0.04 the situation is better but the fire is still too strong to contain it we have to edit the dissipation parameters in the emitter summary of the gas emitter scroll down to the attribute section and set the dissipation rate density to three and the dissipation rate temperature to four these two parameters tell the meter how fast the density and the temperature should Decay over time now it's time to save the system and bring it into the scene note that I kept the effect quite dramatic but remember that that if you have Collision enabled like me now objects can collide with the particles dumping the fire down that's exactly what happens in my final campfire that has some wood logs meshes on top of the meter here you can also see a quite realistic flickering ambient light we are not going to cover how to do it now but I will do in a future video that's all guys I hope you enjoyed this video and found it helpful somehow if you did remember to like the video and subscribe to the Channel if you want to take your support to the next level be sure to check out my patreon page in the video description thank you so much for watching and I'll see you in the next one until then keep on creating and sharees
Info
Channel: Gono
Views: 4,243
Rating: undefined out of 5
Keywords: ue5, unreal engine, ue5 niagara, niagara particles, ue5 particles, unreal engine dust, vfx, particle effect, unreal engine fire, ue5 fire, fire particles
Id: PuHhxj-6XRY
Channel Id: undefined
Length: 8min 11sec (491 seconds)
Published: Fri Oct 20 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.