Fade out particles with Particle Flow

Intro

How to fade out particles with PFlow :: Using a Blend Material with a Particle Age Map for the particles View the result

My goal was to create a simple bloody impact effect with a custom alpha texture.

Although the legacy Max particle systems would have been up for the task, I choose Particle Flow to understand it better. I wanted the effect to fade out smoothly, but Particle Flow doesn't offer any option to do just that. So I did some research...

After checking tutorials and forums at Autodesk's Area, CG Talk and many more sites I couldn't find a good enough solution for fading out particles with an occupied Opacity Slot. Finally, the sparking hint came from within 3ds Max's help: By utilizing a Blend material.

Tutorial

This tutorial is beginner friendly and starts with the basics. However, you can also jump right into the important mapping part or grab the file at the end and analyse it.

  1. Create a PF Source Object found within the Particle Systems Creation Panel. Name it something like "blood_splatter" :)
  2. Adjust your timeline to something shorter like 15 frames.
  3. Open the Particle View and adjust the Birth and Speed Operators to your liking. I tweaked them to a short burst:Adjusting Birth and Speed operators
  4. Create a Plane roughly the size of a single blood splat. Make sure "Generate Mapping Coords." is checked.
  5. Replace the Shape Operator with a Shape Instance Operator.
  6. Pick the generated Plane as Particle Geometry Object so it becomes our particle. Make sure "Acquire Mapping" is checked to get the UV mapping from the Plane.
  7. The Plane isn't visible in the viewport, yet. To fix that, click on the Display Operator and select "Geometry" from the dropdown - voilá!
    Adjusting the Shape and Display Operators to make our Plane visible in the viewport.
  8. The next important step is to apply a Delete Operator. This applies a lifespan to the particles, so the Particle Age Map we apply later works correctly. I adjusted the  Operator so it fits into my 15 frames.
    Apply a Delete Operator so the Particle Age Material works.
  9. Use other Operators like Rotation and Scale to get some more variation into the particles. Animate the Scale Factor in the Scale Operator if you like. I also used a Gravity and Drag Spacewarp and applied them via the Force Operator to get a more dynamic motion. 
  10. Get the tutorial file (3ds Max 2009+) starting at this step
  11. Open the Material Editor [F10] and create a transparent Blood Material (see Step 13 for a screenshot). Make sure "Show in Viewport" is checked. Here is my PNG texture:
    Blood particle
  12. Assign a Material Static Operator to your PFlow Event and drag the Blood Material from the Material Editor into its slot. Make sure to instance it!
    Applying a Material to our particles.
  13. We arrived at the core of the problem here: The Opacity slot of the Blood Material is occupied and cannot be used for the Particle Age Map.The Opacity slot of our material is occupied
    The consequence is that the particles just vanish or stay mid-air at frame 15. Ugly! 
  14. To work around this problem we use a Blend Material (call it pflow_blood).The first slot contains our Blood Material, the second slot contains a simple Invisible Material (just set Opacity to 0).
    Set the Opacity to 0
  15. As Mask we use the Particle Age Map. Make sure to set Color #1 to black and Color #3 to white so the particles fade out, not in. Basically, the Particle Age Map needs to gets whiter towards the end to fade in the Invisible Material.
    The Blend Material and Particle Age Map Settings
  16. Now instance the Blend Material into our Material Static Operator and you're done! 
Get the finished file here! (3ds Max 2009+)

Alternatives

The downside of the alternatives is that they are not connected to the particles. So if you change the lifetime of your particles you have to readjust the visibility animations aswell. When rendering with Mental Ray, I found that only alternative #2 works with PFlow. Animating the Plane we created in Step 4 has no effect btw!

1) Animating the Blood Material opacity

2) Animating the visibility track of the particles themselves
This is not so easy, because selecting the particles in the viewport also selects the PFlow System (and animating that Visibility Track would have no effect). The particles themselves reside in the 0 (default) layer; however, they are not displayed there! Open the Layer Manager and move all objects you see in the 0 (default) layer to a new one. If you now select all objects in the 0 (default) layer you have your particles selected. Now you can animate the visibility track [Autokey On. Right Click -> Object Properties -> Visibility].