My problem is related to node editor and multiple render layers, as far as I'm concerned. I have a simple particle emitter and an icosphere serving as a single particle object. Thanks to the Particle Info node I can easily get the info about particle age. But what I want is to render some kind of alpha channel map (or B&W bitmap) based on particle age info, where only particles of certain age are visible. The math part is not a problem for me. I can combine some math nodes to filter out the value I need. The only problem is how to extract this to the compositor (in parallel with the rest of the scene)?
My current node stack for the particle object looks like that:
The "what I'm trying to achieve" part
My big goal is to render an animation of welding sparkles.
I watched a few videos of some real ones and noticed that most sparkles at the end of their life usually emit something like a small glare. Here's an example: YouTube video
If you pause the video you'll notice that some sparkles at the end of their life emit a 'subset' of smaller sparkles for a fraction of a second. I want to emulate this with a glare node but unfortunately it is only available in the compositor. What I'm missing is a separate render layer (aside from the whole scene) which consists only those sparkles which are about to die.
Completely different approach
Maybe I'm doing everything wrong and maybe there are some other ways to achieve such effect? Please let me know if you have better ideas.