Low performance with cached gas simulations (Niagara Fluids 3D gas sim)

Hello guys,

I’m trying to develop an effect using Niagara Fluids 3d Gas sim to create muzzle fire smoke that dissipates. Because I know that computing 3d grid sims in real-time is prohibitive performance-wise, I’ve ‘baked’ the simulation to a sim cache file so that I can later play it using the ‘Set Sim Cache’ BP node as seen in this screenshot.

The smoke sim developed in Niagara uses all the base quality settings (200 resolution). Anything less than the defaults and the sim loses too much quality. The animation is roughly over 200 frames.

image

So when I play back the cached effect on a 4080 in a empty scene, my framerate drops from ~110 to ~50!!! With profile GPU, it consumes 6 miliseconds, while not even featuring the effect close to the camera. That’s a massive drop!

I just can’t think of a single use of 3d grid gas sims for gaming if they have this kind of performance cost. What might I be doing wrong?

PS: When I do my profiling, the 6 ms appears under ‘HeterogeneusVolumes’, which I assume is the subproduct of the sim cache.

What’s the last game you saw it used in? Personally I have not seen it used anywhere.

Computing the simulation is just one aspect of the cost, albeit a large one. Once you have the simulation done though you still have to put it on screen by raymarching the volume, which is extremely expensive on its own.

Outside of very tightly controlled cinematics I think it is much more of a future-looking feature than something usable right now.

There are a ton of cvars you can tweak, a couple noteworthy ones are:

Raising the CLOD bias: r.HeterogeneousVolumes.CLOD.Bias
Lowering the Max Step Count: r.HeterogeneousVolumes.MaxStepCount

Ok, thanks for the info. I’ll see what I can accomplish by tweaking those values. I guess I might have to fall back to traditional particles after all…