Milkshape DTS Plus Muzzle Flashes
by Bryce · in Artist Corner · 07/22/2007 (9:10 am) · 8 replies
Hello Everyone,
I've been trying to bring some muzzle flashes into my Torque projects, but I'm having some trouble. I got this working flawlessly on accident once, and I accidentally overwrote the file and can't get it back. Can someone guide me to properly use the visibility features and animations to get muzzle flashes working again with Milkshape 3D? I'm using the DTSPlus exporter.
I really need the help because right now the flash ends up showing up on the Item in the game world, completely visible. When I pick it up, the flash is still there, stays there, like it is ignoring my visibility settings for my flash mesh in the model.
Help is appreciated!
BrYcE
I've been trying to bring some muzzle flashes into my Torque projects, but I'm having some trouble. I got this working flawlessly on accident once, and I accidentally overwrote the file and can't get it back. Can someone guide me to properly use the visibility features and animations to get muzzle flashes working again with Milkshape 3D? I'm using the DTSPlus exporter.
I really need the help because right now the flash ends up showing up on the Item in the game world, completely visible. When I pick it up, the flash is still there, stays there, like it is ignoring my visibility settings for my flash mesh in the model.
Help is appreciated!
BrYcE
#2
07/22/2007 (10:20 am)
So create sequences for the rest of the animations, all except for Fire with zero visibility settings? I am using simple visibility, not IFL. Never been able to figure out how to use IFL, either :-p
#3
Fire would contain values from 0-1
anyother sequence would have values of 0...unless you want to see this object[muzzleFlash]. And these are the sequences being called in this particular weapon's ImageStateMachine....you're basically going to hammer the engine into rendering the object when you need it in view...'hopes'.
IFL would animate the texture on the object....;). The next step, eh? LOL>
07/22/2007 (10:29 am)
Yes...try that approach.Fire would contain values from 0-1
anyother sequence would have values of 0...unless you want to see this object[muzzleFlash]. And these are the sequences being called in this particular weapon's ImageStateMachine....you're basically going to hammer the engine into rendering the object when you need it in view...'hopes'.
IFL would animate the texture on the object....;). The next step, eh? LOL>
#4
07/22/2007 (12:08 pm)
I'll see if that works tomorrow. Would hiding the mesh in the model before I export it help anything?
#5
07/22/2007 (12:12 pm)
Nope. It should all be handled in the Visibility Type of sequence and the MeshGroup Visibility Channel settings.
#6
I thought I would have to do this but it turns out the ms exporter is smarter than that. I created a muzzle flash animation by means of a visibility animation but I didn't need to specify a visibility value for all the animation frames, only the keyframes for the actual visibility animation. the exporter automatically marked the visibilty as zero for all other frames. I'm not sure if this is the default behavior, or if the visibility for the first and last keyframes of the visibility animation have to be zero.
07/22/2007 (1:26 pm)
Quote:So create sequences for the rest of the animations, all except for Fire with zero visibility settings?
I thought I would have to do this but it turns out the ms exporter is smarter than that. I created a muzzle flash animation by means of a visibility animation but I didn't need to specify a visibility value for all the animation frames, only the keyframes for the actual visibility animation. the exporter automatically marked the visibilty as zero for all other frames. I'm not sure if this is the default behavior, or if the visibility for the first and last keyframes of the visibility animation have to be zero.
#7
NB: I found I had to include the zero Alpha value in an example 'Fire' sequence?? and no extra 'dummy' sequences[preactivate, activate,ready, etc...] needed either, so my example from above should work. If using a transparent texture on the muzzleflash object; remember to use proper Alpha .png and put the slider to the full right and set the Material in the Export dialog Material Editor to translucent.
exported from MS3D 1.8.0 and DTSPlus! v2.7.2
07/22/2007 (1:36 pm)
So, only "Fire" sequence needs to be checked as Visibility Animation? And the Alpha value of 1 in the keyframe needing visibility on muzzleflash geometry?Wonder why that may have been why I had difficulities getting multiple meshes having separate fadeIn values...?? I could never get meshes to fade in and stay on sequentially, like leg meshes fade in/stay on, the say torso fades in/stays on next...or a building for RTS type setup.NB: I found I had to include the zero Alpha value in an example 'Fire' sequence?? and no extra 'dummy' sequences[preactivate, activate,ready, etc...] needed either, so my example from above should work. If using a transparent texture on the muzzleflash object; remember to use proper Alpha .png and put the slider to the full right and set the Material in the Export dialog Material Editor to translucent.
exported from MS3D 1.8.0 and DTSPlus! v2.7.2
#8
07/23/2007 (9:09 am)
Vare Nice (gives Borat-style thumbs up). Got it working. I just started the flash from scratch. Also helps to actually SET the keyframes... :-D
Torque Owner Rex
BrokeAss Games
Without knowing anything further[and from your explanation of approach], I would say:
Export the animations embedded within the gun object itself.
Mark the "Fire" sequence as containing Visibility data.
Edit the Mesh object representing the muzzleflash to have the appropriate alpha value for the appropriate keyframe value....Alpha=1 when needing to be 100%visible/ Alpha=0 when needing to be 0%visible...
So, for example; in the Visibility Channel heading of your meshGrouping needing the data, Frame/Alpha values for a 3Frame "Fire" sequence, might be:
...this would give you zero visibility at the start of the sequence[Frame1], full visibility at [Frame2], and zero visibility at the end of the sequence[Frame3]
Export, check with engine.
If you still get the meshGrouping appearing when undesired[other sequences[preactivate,noammo,reload, yada]], and if you aren't using an IFL approach[merely Visibility animationType], you may need to input zero Alpha values in for the meshGrouping muzzleflash and reexport the object with visibility in the appropriate Frame# and Sequence Name. Hope this makes sense.