Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsJedi Knight and Mysteries of the Sith Editing Forum → Muzzle Effects
Muzzle Effects
2005-06-28, 4:20 PM #1
I am wondering if there is a good way to produce a muzzle flash for a weapon, for both internal view and external view. I have played mods that have some, but each of them seem to have their limitations, like lag, bugs, or looking 8-bit and such.

Muzzle effects are apparent in real weapons and most games and would be great to have in JK, but there appears to be no simple way to do it for some reason.

I have tried things, but those make for too many vectors to match the player's movement, and is really useless in external as you cant find a cordinate position of the players weapon node in animation. So I am giving up on things.

Post your ideas
visit my project

"I wonder to myself. Why? Simply why? Why why? Why do I ask why? Why do I need to find out why? Why do I have to ask why as a question? Why is why always used to find out why? Why is the answer to why always why? Why is there no final answer to why? Simply why not? Holy cow, this is pretty deep, meaningful **** I wrote. Glad I wrote it down. Oh man."
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ [slog], Echoman
2005-06-28, 5:29 PM #2
Attach the muzzleflash directly to the gun model. This is how most games do it. The flash is geometry that is usually invisible; when you fire it's visible for just a frame or two. This would be easy in SP using mat animation. That would make everyone's gun flash in MP though. Switching the models real quick might work; I don't know how that would interact with the firing keys, or if gun models can even be switched that fast.
2005-06-28, 6:16 PM #3
If you want to make the flash part of the weapon, you can switch the models really fast. If you're using a thing-based weapon pov, you have no worries concerning interference with the animations. However, if you're using JK's pov renderer, I think you need to play a keyframe file with the 0x4 "Hold at last frame" flag to get the gun to be held up again (because switching the jkpov model resets all "hold at last frame" info). I forget exactly since it's been so long since I last used the jk pov model method, and have no old code from which to refer to.

I'd think you're using a thing-based pov though, given the detail of your weapon and hands on the showcase forum (you know how JK likes to "clip" highly detailed pov models), so just switch the model and after a short delay switch it back.
May the mass times acceleration be with you.
2005-06-28, 7:14 PM #4
Emphasis on short delay. Really short. Just long enough to get it on screen for a single frame. Most games show the flash for as short a time as possible - for a single frame. Since you can't actually do that, aim for a few milliseconds at most. You might want to mat-anim the flash texture so it switches on and off, so for rapid fire guns you can leave it set to the flash model the entire time the trigger is depressed.
2005-06-28, 8:05 PM #5
Speaking of how other games make muzzle flashes, certain games seem to have 3d or volumetric ones (americas army, halflife2). It would be cool to do this in JK.

I also took a look at the few JK mods that have muzzleflashes. Goldeneye mod seems to use mat frames. Jedi Knight Advanced and Space Soldiers 3 actually move a flash mesh into to front of the weapon for a split second. GCW uses (really ugly) mat frames I think.

The model swapping sounds like the best bet. Mat frames are universal in multiplyer games, and I really don't understand them. Animating a textured muzzle flash node seems to be the most multiplayer-friendly, but isn't doable in external.

I use things for models and it works well compared to JK's. I have fears about swapping models with it though.

Also post your ideas on transparancy and dynamic light. JK is very limited in those areas and making a believable sprite will be hard.
visit my project

"I wonder to myself. Why? Simply why? Why why? Why do I ask why? Why do I need to find out why? Why do I have to ask why as a question? Why is why always used to find out why? Why is the answer to why always why? Why is there no final answer to why? Simply why not? Holy cow, this is pretty deep, meaningful **** I wrote. Glad I wrote it down. Oh man."
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ [slog], Echoman
2005-06-29, 12:16 AM #6
In internal camera, you could do it if you ran the effect locally (flags=0x240 at start of cog makes it local)

As for the 3d mesh, I'd suggest a merging of two cones back to back, one shorter than the other, and the texture wrapped around cylindrically.
_ _ _____________ _ _
Wolf Moon
Cast Your Spell On Me
Beware
The Woods At Night
The Wolf Has Come

↑ Up to the top!