7
$\begingroup$

[.blend file here]

The problem

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:

node editor

The "what I'm trying to achieve" part

My big goal is to render an animation of welding sparkles.

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.

$\endgroup$
5
$\begingroup$

You can do this by adding a new render layer with an Override Material specified.

First create a dummy object and give it a new material and call it something like particle_age. Just plug the Particle Age output into an Emission shader and plug that into the output. Also make sure to give it a Fake User.

enter image description here

Then just add another render layer and give it the new material as an Override Material. You can also override the samples with a small amount, since emission shaders are easy to compute.

enter image description here

$\endgroup$
  • $\begingroup$ That's exactly what I was looking for! Thank you very much. $\endgroup$ – matewka Feb 3 '16 at 14:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.