Creating Missile Trails for Playblasts in Maya
This is purely for viewport representation, not actually renderable missile trails.
You can download the MEL script to create the setup or follow the steps below.
To use the script:
Open the Script Editor
Source the script
Run the following command:
Enter in the name of the emitter you wish to create
Once the control is created, constrain the group above the control to the animated object and you should be good to go
The script creates the following setup:
-Go to Dynamics dropdown (hotkey F5)
-Particles > Create Emitter
Two elements are created emitter1 and particle1. It's best to name these now, especially if you have more than one missile in your scene.
-Point Constrain the emitter to the exhaust point or animated object
-Viewport > Show Dynamics
-Set to 'Play Every Frame' to help with calculations
-Play the timeline to see what the initial results are, most likely this is not what you're looking for
-Select the particle
-Open the Attribute Editor and select the Shape Node
-Under the Render Attributes
-Set Particle Render Type to Cloud (s/w)
-Click Add Attributes For [Current Render Type]
-Change the Radius to the desired size
Depending on your scene size, a radius of 20 may not be large enough, however the slider doesn't go larger than 20. To increase it to any size you need, set a key on the Radius Value and adjust that key in the Graph Editor.
-Under the Time Attributes set the desired start frame to start emitting
-As you playback your animation, adjust the follow attributes to get your desired result:
Emitter: Rate - increase this for a more solid stream of exhaust
Particle: Lifespan Mode - Based on seconds (life span of 1 is one second) for how long they particles last on screen)
Assign a material
-Select the particle and assign a Lambert shader
-Only Color, Transparency and Diffuse have noticeable viewport changes
Once you have your setup looking good for your scene, you can duplicate and constrain it to other Missile, though it's best to delete the Point Constraint on the emitter, since Duplicate Special will also copy what the emitter is constrained to, which is should be avoided.
To create Duplicates of the emitter setup
-Delete the point constraint on the emitter
-Select emitter and particle
-Edit > Duplicate Special > Option Box
-Duplicate Input Graph checked
-Assign Unique Name to Child Nodes checked
When your setups are complete, you'll likely want to hide your emitters as they will be distracting in the viewport. Should you need to adjust the animation after you've created the trails, hiding Dynamics from the viewport will hide both the emitter and the particles.
A main restriction to using viewport particles is the radius attribute changes all the existing particle radius. This can cause an undesirable effect. You can work around this by using multiple emitters or by using nParticles for explicit control.