[Tutorial] Muzzleflashes

Handy guides on how to do things, written by users for users.

Moderators: GZDoom Developers, Raze Developers

Forum rules
Please don't start threads here asking for help. This forum is not for requesting guides, only for posting them. If you need help, the Editing forum is for you.
User avatar
zrrion the insect
Posts: 2411
Joined: Thu Jun 25, 2009 1:58 pm
Location: Time Station 1: Moon of Glendale

[Tutorial] Muzzleflashes

Post by zrrion the insect »

Before we start, this isn't a tutorial for making muzzleflashes. This is a tutorial for adding them convincingly to a weapon.
Because I've seen a lot of muzzleflashes that look like this:

Image

If you're making this sort of muzzleflash frame you should feel bad; your mother raised you better than that. Notice how it looks like the flash is in front of, but not really æffecting the weapon? That's not particularly believable. The flash should be emitting light of some sort, and that light should be reflecting off of the weapon body.
So to start with, You'll need an advanced image editing program. Paint.NET or Photoshop both have the necessary features, so if you have one of those programs you should be fine.

First, resize the canvas to something much larger than you will need. I suggest keeping the image in the center of your canvas. This isn't super necessary, but it's nice to have some room to move about.
Create a new layer and move it below your weapon. Paste your muzzleflash into this layer and position it underneath your weapon wherever you want it to go.
Go back to the layer with your weapon and select the blank space around it. Invert your selection (so that all of your weapon is selected and none of the background is selected) Select the Layer with your muzzleflash and hit delete. This cuts a gun-shaped hole into the flash. The flash should look like this:

Image

Make a duplicate of your muzzleflash layer and move it above the weapon. Apply a gaussian blur (I usually use a radius of 2 or 3.)
Duplicate this blurred layer a few times (3 or 4 times usually works) and merge them together.
Go to your weapon layer and select the transparent background like you did before, but do not invert your selection this time. Return to the blurred layer and hit delete. What is left should be only over the weapon sprite. It should look something like this:

Image

Now you could stop here, and be done. This is already better than what you had before, but it's not particularly great. The blur shows that there is intense light at the muzzle, but there's also some softer light there as well.
For that light you need to duplicate the weapon layer and make it greyscaled. Select the blank space around the weapon. Invert your selection (so that all of your weapon is selected and none of the background is selected) and create a new layer above the weapon. Select a colour that is close to the colour of the muzzleflash and fill in your selection with it. Set this layer's blending style to "overlay" and merge it onto the grey weapon. You could use gradient maps for this if you wanted. Gradient maps offer more control, but such control isn't always necessary. Use whatever recolouring method works best for you. It should look something like this:

Image

Set the gradient tool to alpha mode and fade down from the center of the weapon's muzzle to some point on the weapon closer to the bottom. It should end up looking like this:

Image

Now you that have all of your layers made, they need to be put in this order:
1. Blur (top layer)
2. Soft Glow
3. Weapon
4. Flash (bottom layer)

Flatten the image. It should look something like this:

Image

At this point you're done. This looks much better than just slapping the flash behind the weapon.
For bonus points, you can add soft light to other surfaces on the weapon (such as the tank on the side of this one) where light should be present, but is not currently. This also applies if the weapon has multiple barrels (such as the SSG) but is only firing from one at a time.
So the end result looks like this:

Image

If there's anything that is unclear or that you feel I should elaborate further upon, don't hesitate to tell me, and as always feedback is appreciated.
Last edited by zrrion the insect on Thu Apr 30, 2015 5:44 pm, edited 3 times in total.
User avatar
Yholl
Posts: 1953
Joined: Mon Dec 17, 2012 11:08 am
Location: Here, stupid.

Re: [Tutorial] Muzzleflashes

Post by Yholl »

This is incredibly useful! Thank you so much for posting this, I shall apply this to the great many weapons I've simply tacked muzzleflashes onto. I use GIMP myself, I assume it will be straightforward to do what you've described here in that program.

Ahh, zrrion, is there anything you do that isn't awesome?
User avatar
TheRailgunner
Posts: 1555
Joined: Mon Jul 08, 2013 10:08 pm

Re: [Tutorial] Muzzleflashes

Post by TheRailgunner »

I've gone back and added the improved muzzle flashes to the MoH:A mod - zrrion, thank you for this.
Gez
 
 
Posts: 17833
Joined: Fri Jul 06, 2007 3:22 pm

Re: [Tutorial] Muzzleflashes

Post by Gez »

Lighting everything that should be lit is important. Here's another relatively recent example I remembered:
Gez wrote:
TheRailgunner wrote:@Funktasm:

Image

Threw together a pickup for it, added an extra frame for each barrel. Oh, and a new stock.

@Mike12: Can't wait to see all of that stuff finished - it looks pretty damn good.
The vented plasma should light up the rest of the gun, including the barrel not currently fired.
I'm not singling out this one in particular, it's just an illustration. I've seen the same problem with single-barrel shots on the double-barreled shotgun, for example.
User avatar
Marrub
 
 
Posts: 1192
Joined: Tue Feb 26, 2013 2:48 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Arch Linux
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Contact:

Re: [Tutorial] Muzzleflashes

Post by Marrub »

Yholl wrote:Ahh, zrrion, is there anything you do that isn't awesome?
Not being awesome is something inconceivable in zrrion's mind, thus making him perpetually awesome. All the time. And every day.
User avatar
zrrion the insect
Posts: 2411
Joined: Thu Jun 25, 2009 1:58 pm
Location: Time Station 1: Moon of Glendale

Re: [Tutorial] Muzzleflashes

Post by zrrion the insect »

Oh you guys *blushes* glad you're finding this useful.
@gez, That last bonus step could conceivably cover multiple muzzled weapons. Ill have to add some stuff to the first post about that particular issue.
And if you guys really want to see zrrion not being awesome, go read my older posts. (please don't)
User avatar
TheRailgunner
Posts: 1555
Joined: Mon Jul 08, 2013 10:08 pm

Re: [Tutorial] Muzzleflashes

Post by TheRailgunner »

zrrion the insect wrote:Oh you guys *blushes* glad you're finding this useful.
@gez, That last bonus step could conceivably cover multiple muzzled weapons. Ill have to add some stuff to the first post about that particular issue.
And if you guys really want to see zrrion not being awesome, go read my older posts. (please don't)
I'd make several transparency gradients for the holes in the DND, it that's what you and Gez are referring to. For any other multi-barrelled weapon, just applying the halves of the muzzle flash layer separately will do the trick.

This is a decent example of a non-centered/non-Doom weapon after being augmented through zrrion's profane muzzleflashery rituals:

Image
User avatar
Bitterman
Posts: 564
Joined: Mon Jun 25, 2012 12:06 pm
Location: Stranded on Lh'owon

Re: [Tutorial] Muzzleflashes

Post by Bitterman »

That muzzle flash seems very blurry compared to the gun itself.
User avatar
Uboa
Posts: 634
Joined: Sun Feb 19, 2012 8:53 pm
Location: Poniko's House
Contact:

Re: [Tutorial] Muzzleflashes

Post by Uboa »

Thanks for this, zrrion, it worked out fantastically.
User avatar
TheRailgunner
Posts: 1555
Joined: Mon Jul 08, 2013 10:08 pm

Re: [Tutorial] Muzzleflashes

Post by TheRailgunner »

Bitterman wrote:That muzzle flash seems very blurry compared to the gun itself.
It really isn't that noticeable in-game, given that it appears for one thirty-fifth of a second at a time.
User avatar
TheMightyHeracross
Posts: 2100
Joined: Sun Aug 18, 2013 9:41 am
Location: Philadelphia, PA

Re: [Tutorial] Muzzleflashes

Post by TheMightyHeracross »

Awesome! Bookmarked this, this is totally useful! The only complaint I can think of is that it sorta break palette; this isn't a problem (since ZDoom has truecolor HUDs) except that Realm667 doesn't allow for this. That's OK though, still useful. :)
User avatar
zrrion the insect
Posts: 2411
Joined: Thu Jun 25, 2009 1:58 pm
Location: Time Station 1: Moon of Glendale

Re: [Tutorial] Muzzleflashes

Post by zrrion the insect »

You could always apply the palette afterward in Slade or your palletizer of choice. I typically do, but as it isn't necessary I left it out.
User avatar
Blox
Posts: 3728
Joined: Wed Sep 22, 2010 9:35 am
Location: Apathetic Limbo

Re: [Tutorial] Muzzleflashes

Post by Blox »

ImageImageImage
Eh, it's not so bad as long as you use gradient maps (which you should) that are somewhat within the palette to colorize stuff.
User avatar
agaures
Posts: 303
Joined: Mon Jan 07, 2013 7:33 pm
Location: New Zealand

Re: [Tutorial] Muzzleflashes

Post by agaures »

I tried applying this tutorial to the SSG and came out with this:

Image

Did i do good? :o
User avatar
TheRailgunner
Posts: 1555
Joined: Mon Jul 08, 2013 10:08 pm

Re: [Tutorial] Muzzleflashes

Post by TheRailgunner »

Blox wrote:ImageImageImage
Eh, it's not so bad as long as you use gradient maps (which you should) that are somewhat within the palette to colorize stuff.
That sure is a pretty HR Doom Rocket Launcher you got there...
Post Reply

Return to “Tutorials”