Weapons, muzzle flashes, sequences
by Alex Rice · in Artist Corner · 11/27/2004 (7:30 pm) · 5 replies
Contemplating making a muzzle flash type of animation for a weapon, I have bunches of questions :-)
In TGE there seems to be 3 ways to do muzzle flashes (an animation at the firing event). I have added notes about what this means for a Blender DTS exporter users. Please notify me if any of this is incorrect... a lot of it is speculative. The 3 ways then:
1) Use a stateEmitter in the weapon's state system. This causes a particle emitter to appear when the weapon is firing. ( This would not involve the .dts export of your weapon at all. It's a separate particle system.)
2) Write the muzzle flash into a .dts sequence. This would involve a texture animation or visibility animation. (not possible to do with Blender DTS exporter because visibility animation and texture animation isn't supported)
3) Use a flash.dts or bang.dts model, which gets attached to the muzzlepoint at firing time. I have seen one or two mentions of this method, and can't verifiy if/how it actually works. Can anyone confirm this? If it does work, it might be the best way to animate a muzzle flash using the Blender DTS exporter.
In TGE there seems to be 3 ways to do muzzle flashes (an animation at the firing event). I have added notes about what this means for a Blender DTS exporter users. Please notify me if any of this is incorrect... a lot of it is speculative. The 3 ways then:
1) Use a stateEmitter in the weapon's state system. This causes a particle emitter to appear when the weapon is firing. ( This would not involve the .dts export of your weapon at all. It's a separate particle system.)
2) Write the muzzle flash into a .dts sequence. This would involve a texture animation or visibility animation. (not possible to do with Blender DTS exporter because visibility animation and texture animation isn't supported)
3) Use a flash.dts or bang.dts model, which gets attached to the muzzlepoint at firing time. I have seen one or two mentions of this method, and can't verifiy if/how it actually works. Can anyone confirm this? If it does work, it might be the best way to animate a muzzle flash using the Blender DTS exporter.
About the author
#2
This is method 2) I was describing above, I think.
If you were using this method with our exporter, then the flash sequence would have to be written as an armature/action somehow, exported as a sequence in your weapon model.
I think I'll try method 3) above, to attach a separate muzzle flash .dts model to the weapon via script.
11/27/2004 (8:41 pm)
@Westy, I'm reading through shapeImage.cc, and you are right it appears that if you set stateSequenceRandomFlash to true in your ShapeBaseImage, then it will load the sequence named in the var stateSequence. This is method 2) I was describing above, I think.
If you were using this method with our exporter, then the flash sequence would have to be written as an armature/action somehow, exported as a sequence in your weapon model.
I think I'll try method 3) above, to attach a separate muzzle flash .dts model to the weapon via script.
#3
I'd like to mount a model/image (the muzzle flash) to the muzzlePoint on any mounted weapon image (ideally picking a random .dts to attach). I haven't been able to find if this is possible or not... any insight? Maybe "stateSequenceRandomFlash" has something to do with something? I can find no information on that though either.
08/27/2006 (11:58 am)
My apologies for bumping up such an old thread, but does anyone know if Method 3's possible without engine changes? I'd like to mount a model/image (the muzzle flash) to the muzzlePoint on any mounted weapon image (ideally picking a random .dts to attach). I haven't been able to find if this is possible or not... any insight? Maybe "stateSequenceRandomFlash" has something to do with something? I can find no information on that though either.
#4
Its really not that hard to add method 3 to shapeImage.
08/27/2006 (12:04 pm)
It is possible trough script, but will neither be good looking (jittering when the image is moving) nor effective for a multiplayer game, as the change needs to travel across the network at each fireState.Its really not that hard to add method 3 to shapeImage.
#5
08/27/2006 (12:53 pm)
That's what I figured. Ah well, modelling multiple fire animations and randomly playing one each fire sequence works, at least.
Torque Owner Westy
Look in shapeBase for a flashSequence bool. It also has its own state with the field stateSequenceRandomFlash (boolean).
I think the idea is to red the flashSequence and display random frames from it (varying muzzle flash).