Flipbook Frame offset on muzzle flashes for greater variations

Hey!

I want to share a technique that I use when making muzzle flashes.

It’s pretty useful for adding some extra variety to muzzle flashes and getting more out of your flipbooks.

Muzzle Flash

The basic idea is that you don’t really run through the entire flipbook on one particle but instead you use random segments of that flipbook to decrease the chances that any two particles in sequence will look too similar.

In Unitys Shuriken it could look something like this if you use a custom shader:

You would specify the range of the curve (How many frames will play during the particles lifetime) and then you would set a random start frame which will control where on the flipbook the curve starts.

The start frame would work like this:
Muzzle Flash - frame start
See how it’s animating over 4 frames but the starting frame is being controlled by you. You can either set a “Random between two constants” to offset this starting frame or use random between two curves.

If you’re using VFX Graph you can set it up like this:

In both cases you need to make sure you don’t exceed the maximum number of frames otherwise it’ll looks super weird when it starts at 0 again.

Happy blasting!

3 Likes

Hey, good stuff! How do you usually generate your flipbooks for this kind of muzzle effect ?

1 Like

Thank you!

Embergen is my go to for flipbooks.

1 Like

I love this technique, makes it feel very natural!

Got any tips for setting up the simulation in embergen for these muzzle flashes? Are you using particles or volume emitters? (both?) Im also trying to make some muzzle flashes but my results are a bit hit and miss.

1 Like

I used different kinds of forces, colliders and noises to shape the muzzle flash shape.

If you make a hole with surrounding colliders it’ll be easier to have the sim explode out into an interesting shape. Then if you need further movement forward you can use the line force and tweak its settings.

Do keep in mind that the explosion sim in embergen does not have to represent the speed of the muzzle flash in the editor.

You will most likely end up with a pretty slow sim which is 50-100 or so frames. Just set up the final render to skip a couple of frames in between. You probably don’t need more than a 16 frame flipbook.

1 Like