Muzzle Flash
by Nathan · in General Discussion · 10/01/2005 (7:27 am) · 33 replies
Hi, I'm not sure what to do about my muzzle flash! I've seen a few topics about this on the forum but not any new ones. So whats the best way to make a muzzle flash?
#3
10/02/2005 (8:50 am)
Wouldn't it be similar though? The light caused by the projectile would be muzzle flash right?
#4
Actually, when the weapon is fired it creates a muzzle flash affect, by makeing a FX light go on when the weapon is fired. But you can remove the projectile light and still have that in the CrossbowImage Datablock without any flaws.
-Max
10/02/2005 (9:36 am)
Hey Stefan,Actually, when the weapon is fired it creates a muzzle flash affect, by makeing a FX light go on when the weapon is fired. But you can remove the projectile light and still have that in the CrossbowImage Datablock without any flaws.
-Max
#5
Commonly when speaking about a muzzle flash, you're talking about the flame (eventually) that exits the barrel when fireing a weapon.
At least, that's what I was thinking about.
Creating a light that follows the projectile is one thing, creating a muzzle flash sprite or set of particles, is another.
10/04/2005 (12:01 am)
Max,Commonly when speaking about a muzzle flash, you're talking about the flame (eventually) that exits the barrel when fireing a weapon.
At least, that's what I was thinking about.
Creating a light that follows the projectile is one thing, creating a muzzle flash sprite or set of particles, is another.
#6
10/04/2005 (3:10 am)
I think that the best way (as far as I can see) is to create a dts shape and attach it to the barrel during the firing sequence, limiting the particles fx to the dts itself.
#7
10/04/2005 (5:20 am)
How would I model a muzzle flash?
#8
Use visibility animation to only show the muzzle flash mesh for a brief period during the fire animation.
You could do some fairly cool things with it.. selfilluminating billboard general flash and maybe a flame coming out of the end..
I could tell you how to do it in Milkshape, but not 3DS or anything else..
10/04/2005 (5:47 am)
One way you could do it would be as part of your weapon mesh.Use visibility animation to only show the muzzle flash mesh for a brief period during the fire animation.
You could do some fairly cool things with it.. selfilluminating billboard general flash and maybe a flame coming out of the end..
I could tell you how to do it in Milkshape, but not 3DS or anything else..
#9
OK. Milkshape's all I own anyway :) Have you actually made a muzzle flash yet? If you have maybe you could post some screens or something!
10/04/2005 (5:53 am)
"I could tell you how to do it in Milkshape, but not 3DS or anything else.."OK. Milkshape's all I own anyway :) Have you actually made a muzzle flash yet? If you have maybe you could post some screens or something!
#10
But it's so simple with the new milkshape exporter.
Basically, you have your weapon mesh already..
Add a square to be your muzzleflash (2 faces) aligned to the front pane, name it something like Muzzleflash or something. move it to the end of the barrel.
Texture it with a nice flash image with transparency.
I'm assuming your weapon already has a fire animation between frames XX and YY (what ever the real frames are)
Save and Go to the exporter.
Click on the muzzleflash mesh, edit and tell it to be a billboard.
Also, add some visibility entries in there.. place one at frame 1 with a value of 0 (don't know if you need it, but to make sure it's invisible all the time.)
Place one at frame XX with a value of 1
Place another at frame XX+5 or so.. to give it a couple of frames ofvisibility and set the value to 0.
Go to the material for the muzzle flash and set it to self illumination. (or transparent and additive depending on which looks best)
on your fire sequence, make sure you allow visibility animation.
GO to export, making sure you're exporting the animations too..
Job's a good 'un. You should have a muzzle flash.
Combine the muzzleflash animation with ifl animation and you've got a cool animated muzzle flash.
(been doing a bit of work lately with IFL, visibility animation and billboards ;-)
Let me know if you want a simple example model making...
10/04/2005 (7:40 am)
I'll do something tonight.But it's so simple with the new milkshape exporter.
Basically, you have your weapon mesh already..
Add a square to be your muzzleflash (2 faces) aligned to the front pane, name it something like Muzzleflash or something. move it to the end of the barrel.
Texture it with a nice flash image with transparency.
I'm assuming your weapon already has a fire animation between frames XX and YY (what ever the real frames are)
Save and Go to the exporter.
Click on the muzzleflash mesh, edit and tell it to be a billboard.
Also, add some visibility entries in there.. place one at frame 1 with a value of 0 (don't know if you need it, but to make sure it's invisible all the time.)
Place one at frame XX with a value of 1
Place another at frame XX+5 or so.. to give it a couple of frames ofvisibility and set the value to 0.
Go to the material for the muzzle flash and set it to self illumination. (or transparent and additive depending on which looks best)
on your fire sequence, make sure you allow visibility animation.
GO to export, making sure you're exporting the animations too..
Job's a good 'un. You should have a muzzle flash.
Combine the muzzleflash animation with ifl animation and you've got a cool animated muzzle flash.
(been doing a bit of work lately with IFL, visibility animation and billboards ;-)
Let me know if you want a simple example model making...
#11
10/04/2005 (8:45 am)
@Jason, that will look crap from the first person view, won't it?
#12
The billboard will give you a omnidirectional flash of flame, useful for hiding other tricks.
Then you could have a cross shaped mesh for the flame coming out of the weapon.
The additive transparency will help to conceal the cross shaped mesh with the muzzel flame from most angles.. but it should be fast..
I'll have a play tonight to see if I can make a semi decent muzzel flash. (i.e in a couple of hours time ;-)
10/04/2005 (9:02 am)
I don't believe so, It'll look the same from all points of view.. so obviously it's not going to be the full effect.The billboard will give you a omnidirectional flash of flame, useful for hiding other tricks.
Then you could have a cross shaped mesh for the flame coming out of the weapon.
The additive transparency will help to conceal the cross shaped mesh with the muzzel flame from most angles.. but it should be fast..
I'll have a play tonight to see if I can make a semi decent muzzel flash. (i.e in a couple of hours time ;-)
#13
Looking at the weapon from the side should show a long flame going vertically.
Looking at the weapon from the shooters point of view should show a round flame, I guess.
10/04/2005 (9:31 am)
Reason to me asking is because me and our artist tried this once and the results didn't look as good as you seem to say :)Looking at the weapon from the side should show a long flame going vertically.
Looking at the weapon from the shooters point of view should show a round flame, I guess.
#14
I played Eve online for a while and they used cross shaped transparent meshes for engine trails and billboards for the engine glow (among other tricks).. Looked OK there.. but then, I don't have the artistic talents of the Eve-online team :-)
10/04/2005 (9:46 am)
Well, in about 30 mins, I'm going to give it a shot and either, make something which looks close enough to what I imagine or... make a complete fool of myself on the forum.. actually, could end up doing that either way ;-)I played Eve online for a while and they used cross shaped transparent meshes for engine trails and billboards for the engine glow (among other tricks).. Looked OK there.. but then, I don't have the artistic talents of the Eve-online team :-)
#15
10/04/2005 (9:50 am)
Ya, was interested in how they did it in Eve, too. Thanks for the info :) Looking forward to hearing your report.
#16
10/04/2005 (10:23 am)
You could use a few billboards, in a pattern like a + and one to cap the muzzle too, that way you should get a reasonable looking flash from most angles.
#17
10/04/2005 (10:29 am)
Jason: I'm looking forward to this, a muzzle flash example as .ms3d would make a great resource, thanks :D
#18
Saying as your artist has tried this, Stefan, I'm sure you're half expecting the report I'm about to give.
It appears that billboards have the be oriented around the 0,0,0 position of the model, so my idea of having a load of billboards placed in cool places to give a nice muzzel flash is unfortunately, fataly flawed...
I did plan to place a load of billboards just beyond the barrel of the gun, hoping that the meshes would have their own origins and be rotated towards the camera... unfortunately, they have the same origin, so they appear on top of each other.. not good.
This also means that in order to place a billboard on the actual weapon mesh itself, you have to move the entire model so that the billboard is around the 0,0,0 point. so when the weapon is placed in a mission as a pickupable item, it rotates around the billboard. possibly fixable in code..
I'm pretty much of the mind that Torque should be able to handle billboards in odd places on a mesh though, although it would probably involve changes to the engine and might break other peoples work which has come to expect this behaviour from the engine. Anyone has any ideas about this, I'd be interested to hear them.
So here's what I came up with. It involved 1 billboard and a cross mesh...





Not exactly what I had in mind, but it's a muzzel flash..
Not exactly up to Eve's standards ;-)
10/04/2005 (12:22 pm)
OK, initial report is bad news.. Saying as your artist has tried this, Stefan, I'm sure you're half expecting the report I'm about to give.
It appears that billboards have the be oriented around the 0,0,0 position of the model, so my idea of having a load of billboards placed in cool places to give a nice muzzel flash is unfortunately, fataly flawed...
I did plan to place a load of billboards just beyond the barrel of the gun, hoping that the meshes would have their own origins and be rotated towards the camera... unfortunately, they have the same origin, so they appear on top of each other.. not good.
This also means that in order to place a billboard on the actual weapon mesh itself, you have to move the entire model so that the billboard is around the 0,0,0 point. so when the weapon is placed in a mission as a pickupable item, it rotates around the billboard. possibly fixable in code..
I'm pretty much of the mind that Torque should be able to handle billboards in odd places on a mesh though, although it would probably involve changes to the engine and might break other peoples work which has come to expect this behaviour from the engine. Anyone has any ideas about this, I'd be interested to hear them.
So here's what I came up with. It involved 1 billboard and a cross mesh...





Not exactly what I had in mind, but it's a muzzel flash..
Not exactly up to Eve's standards ;-)
#19
10/04/2005 (12:42 pm)
I think that looks perfectly servicable.
#20
10/04/2005 (1:51 pm)
Looks very nice :D
Torque Owner Max Thomas
lightType = WeaponFireLight;
lightRadius = 4;
lightTime = 50; // Time in ms
lightColor = "0.5 0.5 0.25";
under the
ShapeBaseImageData(CrossbowImage)
datablock in your crossbow.cs as an example.
-Max