[Tutorial] Muzzleflashes
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.
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.
-
- Posts: 2431
- Joined: Thu Jun 25, 2009 1:58 pm
- Location: Time Station 1: Moon of Glendale
[Tutorial] Muzzleflashes
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:
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:
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:
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:
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:
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:
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:
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.
Because I've seen a lot of muzzleflashes that look like this:
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:
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:
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:
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:
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:
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:
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.
-
- Posts: 1955
- Joined: Mon Dec 17, 2012 11:08 am
- Location: Here, stupid.
Re: [Tutorial] Muzzleflashes
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?
Ahh, zrrion, is there anything you do that isn't awesome?
-
- Posts: 1556
- Joined: Mon Jul 08, 2013 10:08 pm
Re: [Tutorial] Muzzleflashes
I've gone back and added the improved muzzle flashes to the MoH:A mod - zrrion, thank you for this.
-
-
- Posts: 17922
- Joined: Fri Jul 06, 2007 3:22 pm
Re: [Tutorial] Muzzleflashes
Lighting everything that should be lit is important. Here's another relatively recent example I remembered:
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.Gez wrote:The vented plasma should light up the rest of the gun, including the barrel not currently fired.TheRailgunner wrote:@Funktasm:
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.
-
-
- Posts: 1198
- 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
Re: [Tutorial] Muzzleflashes
Not being awesome is something inconceivable in zrrion's mind, thus making him perpetually awesome. All the time. And every day.Yholl wrote:Ahh, zrrion, is there anything you do that isn't awesome?
-
- Posts: 2431
- Joined: Thu Jun 25, 2009 1:58 pm
- Location: Time Station 1: Moon of Glendale
Re: [Tutorial] Muzzleflashes
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)
@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)
-
- Posts: 1556
- Joined: Mon Jul 08, 2013 10:08 pm
Re: [Tutorial] Muzzleflashes
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.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)
This is a decent example of a non-centered/non-Doom weapon after being augmented through zrrion's profane muzzleflashery rituals:
-
- Posts: 564
- Joined: Mon Jun 25, 2012 12:06 pm
- Location: Stranded on Lh'owon
Re: [Tutorial] Muzzleflashes
That muzzle flash seems very blurry compared to the gun itself.
-
- Posts: 634
- Joined: Sun Feb 19, 2012 8:53 pm
- Location: Poniko's House
Re: [Tutorial] Muzzleflashes
Thanks for this, zrrion, it worked out fantastically.
-
- Posts: 1556
- Joined: Mon Jul 08, 2013 10:08 pm
Re: [Tutorial] Muzzleflashes
It really isn't that noticeable in-game, given that it appears for one thirty-fifth of a second at a time.Bitterman wrote:That muzzle flash seems very blurry compared to the gun itself.
-
- Posts: 2100
- Joined: Sun Aug 18, 2013 9:41 am
- Location: Philadelphia, PA
Re: [Tutorial] Muzzleflashes
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.
-
- Posts: 2431
- Joined: Thu Jun 25, 2009 1:58 pm
- Location: Time Station 1: Moon of Glendale
Re: [Tutorial] Muzzleflashes
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.
-
- Posts: 3728
- Joined: Wed Sep 22, 2010 9:35 am
- Location: Apathetic Limbo
Re: [Tutorial] Muzzleflashes
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.
-
- Posts: 303
- Joined: Mon Jan 07, 2013 7:33 pm
- Location: New Zealand
Re: [Tutorial] Muzzleflashes
I tried applying this tutorial to the SSG and came out with this:
Did i do good?
Did i do good?
-
- Posts: 1556
- Joined: Mon Jul 08, 2013 10:08 pm
Re: [Tutorial] Muzzleflashes
That sure is a pretty HR Doom Rocket Launcher you got there...Blox wrote:
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.