Flamethrower (Unreal Engine 5)

A flamethrower vfx I made in unreal engine.
Had the limitation on this one that I couldnt use houdini to simulate anything even textures. (Licensing issue). So its just substance designer textures and shaders.

Feedback is always welcome, but this one is mostly to share!
42fe300b355a0f5af8d1a3811fc5ba44-ezgif.com-video-to-gif-converter

5 Likes

Very cool (or hot) result considering the limitations!

It looks cool, but I’d say the shader complexity is very large; most likely, the area where everything happens and everything around it is quite white. It would be great if you could work on the particle count, the shader (make it as simple as possible), and of course use catout.

If this fire takes up relatively little space on the screen, then that’s perfectly fine. If it’s the same as yours or larger, then your frame rate will likely drop by half, depending on your computer’s performance. In such cases, some people split the fire into two parts: the first part is like a ribbon, geometry, or a single sprite, and then, where the collision occurs, more sprites.

Check out how it looks in Ark Raiders. I don’t think it looks that good, but the optimization is pretty good.

Hey thanks for the feedback, I’m quite new to this and am learning it on my own.

I’m trying to understand your feedback. In short my effect might be to heavy for actual game performance, you already share some tips based on only the gif which will proof usefull.

Ill share the shader and some other stuff to showcase how its currently being handled.

I haven’t gotten the chance to get feedback on optimalisation for vfx thusfar so I appreciate any further tips you have!

Its rougly 1600 sprites, shader is unlit but translucent.
The niagara effect has a multiplier to change the amount of particles if wanted based on the game performance.

The effect is meant to be a large monster fire attack, there will be only a single instance of it in the scene at any given time. How many sprites should someone look for within such an effect?

ezgif.com-cut

Here are 3 versions ranging from ~1600 to ~400 sprites

ezgif.com-video-to-gif-converter (1)
ezgif.com-video-to-gif-converter
ezgif.com-video-to-gif-converter (2)

The shader instruction count should be in the range of roughly 150–170 instructions. Moving toward that target is a good direction because fire generally does not require a complex shader.

The shader should be additive and unlit only. As soon as you switch to translucent blending, the instruction count typically jumps above 200 instructions. I do not have Unreal Engine available right now to verify the exact numbers, but if I remember correctly, a basic additive shader starts at around 135 instructions.

Fire usually looks better when it is built from multiple sprites, so keeping the shader lightweight allows you to use more particles. I would only use a translucent material with a more complex shader if I needed a single sprite to handle fire, smoke, and refraction simultaneously, while using only a few sprites overall—perhaps between one and four.

If you are rendering 1,600 sprites, I would consider that excessive. In most cases, you can achieve a convincing fire effect with approximately 25–50 sprites. If you build it using older CPU-based techniques, you can often get away with as few as 15 sprites.

The appropriate particle count depends heavily on the context. For example, if there is only one monster and one player in the level, the CPU load from AI and gameplay systems is relatively low, leaving more performance budget for particles. The effect may also be acceptable if it occupies less than roughly 35% of the screen, if there are no other overlapping particle systems, and if the player is not generating many additional effects at the same time. There are probably several other conditions under which a higher particle count could be justified. In any case, you should use GPU particles and a tightly controlled bounding box.

Even so, that number of particles is likely to have a significant performance impact. Even on the GPU, it could potentially reduce frame rate from around 120 FPS to somewhere between 40 and 60 FPS.

I would recommend several alternative approaches, although the best solution depends on how dynamic the flame needs to be and whether it will be viewed only from the side or also directly facing the player.

One option is to use a ribbon for the main body of the flame. Another is to use approximately five particles to represent the flame from the side and add a second particle facing the camera for each of those, creating a cross-shaped arrangement. This setup can be optimized further using a dot-product-based approach for orientation and visibility control.

Once you reduce the effect to only five primary particles, you can afford to make the shader somewhat more complex.

For collision-driven effects, it is more difficult to avoid higher particle counts, but I would still recommend prioritizing optimization wherever possible.

references

2 Likes

One more point: if you are just starting to think about optimization, try looking for opportunities to replace groups of sprites with a single sprite.

If you examine your smoke effect closely, you will probably notice many similar patches that appear as fairly uniform shapes without much internal detail. In many cases, you can replace several individual sprites 20-50 with just 3–10 larger sprites that use animated noise. The result often looks better because the motion adds variation and breaks up the repetition.

More importantly, this approach can provide a substantial performance improvement. You reduce particle count, overdraw, and simulation cost while maintaining—or even improving—the overall visual quality of the effect.

2 Likes

Hey!, just finished my internship so I had some time to revisit this effect with your feedback.

I wanted to keep it slightly more details then the references you send, but still aim to lower my 1600 sprites with ~330 instructions

This new effect got ~60 sprites at a time, thats for flames, smoke and heat distortion (optional) combined.
Then 1 low poly mesh for the base of flame to reduce sprites there.

Heat distortion wont be spawned or rendered on lower settings.

For the flames I also reduced the instructions to 159 (base pass shader)

I also made it so its better visibly when you get hit with it in first person.
This is what I got with your feedback, if I missed anything big I’d love to hear it. Im all ears and trying to soak in as much information as possible!


5d7174de65850250d1fb5b4efa046f65-ezgif.com-video-to-gif-converter
023b28f9646d8fcbf5f286bf413aa10f-ezgif.com-resize

1 Like

The choppy look is a gif limitation for size, just noticed that happend.


Also made this fun texture in substance designer for wooden area’s that get hit with it!



Your flame in the green area looks good, but I still think there are quite a lot of particles there, and they could be reduced by about half. I think the flame shape should be uneven and have some gaps. And regarding the main stream, you optimized it, but you lost the visual impact you had before. This is a common situation when working on effects; it needs to be beautiful and well optimized. I would make the stream wider and add a few particles so they connect well with the main stream and make it uneven.