How to change particle color/alpha based on particle's life, not global time

I know this can be easily done if’ you’re using a duplicated object as the particle, but I’m just using the “line” render type. I’m trying to create some sparks like from a fuse.

I think that happens automatically if you set keyframes in the material window for the particles material. As you can see, my particles are blue as they emerge from the emmitor, and red as the age.

Attachments


Huh… mine aren’t doing that. It’s changing them globally.

EDIT: I’ve got two particle systems going btw, but one of them is just for the smoke simulator, not rendered.

EDIT2: Oh and the particles aren’t starting at frame 0, they’re starting at frame 565.

try this: add a cube, and make sure it doesn’t have a material, and if it does, delete it. then give the cube a particle system. then give it a new material, and set the keyframes. I believe that is what I did.

That’s not doing it for me.

What keyframes are you setting? I’m just setting the diffuse color.

I just set two keys for RGB. one on frame 1 and one on frame 20. I didn’t try setting any for alpha.

Huh… well I wonder why mine isn’t behaving itself!

@LazyCoder: Yeah, Blender can not do that. You can animate the material overtime as Modron is showing, but it really is not related to the age of the particle. You can test this fact by simply making your particles have a longer life after you have animated the material. The best you can do is to use a projection texture of a gradient to simulate age over time.

Please world, prove me wrong by posting a working example.

That stinks… They REALLY need to get the particle system sorted out. I mean that’s one of the basic “gimme” capabilities, and it does not have it???

It’s coming :wink:

Yeah, at least that is good news!

I just tried it using objects as particles. Same thing! I set the object’s material, and it just changes globally as well!

Here is my attempt at using the color ramp projection technique. You can colorize the particle stream, but the colorization is based purely upon the distance from the emitter. So in a fountain situation, when particles rise, then fall back down, this technique can fail to simulate age. But in other situations when the particles never return to their starting source, you can “Fake” it.

NOTE: Because this is a texturing techqniue, you can only see the effects of the texture when you render, not in the viewport.

Attachments


ras_particle_column_color_ramp_1e.blend (525 KB)

2.49 still does that, yoou can render the particles from there and composite them back to 2.5.

@Camaxtli: Could you please post an example file? I would like to know how this can be done right in 2.49.

Thank you.

Sorry, 2.49 doesn’t work on my PC, but it’s precisely as Modron said. Give the particles a material, animate that material in the beginning of the scene (frame 1 - n) even if you use it on frame xyz.
For example If U want the particles to fade out over 50 frames from the time when they’re born, key Alpha=1 on frame 1 and Alpha=0 on frame 50. Should work, at least it has worked about a year and a half ago.

Yeah, it really does not work, however. I am attaching a 2.49 example file to prove my point. I have setup the scene as you suggested.

I have an emitter emitting 1,000 particles over 1-100 frames. The particles have a life of 200 frames. The particles are using an object named “particle” which is a cube with a material applied to it. That material has it’s color animated from red to yellow over frames 0-99. Also the alpha is animated from 1.0 to 0.0 over frames 0-99.

So if what you say is true, then some of the particles should be more solid than others because of the 100 frame delay in birth. Also, at frame 100, the first particle should be 50% dead and thus 50% transparent and orange.

But what you will find that Blender actually does is blindly apply the material to all particles the same way. There is no age honoring of materials that I can detect. I only have scenes to prove the contrary. I would be really nice to see Modron post his scene? I still would like to see how this works.

Attachments

blender_particle_failure.blend (408 KB)

The problem is, you can’t animate objects used as particles over their life. You can do that only with the particles itself.
I got 2.49 to work, I attach a file that works like Modron’s.

Attachments

blender_particle_failure.blend (411 KB)

…but all this is coming. Also flow control is on its way.

Let us all pray for Phonybone!

Huh? Is there a new particle system in the works? Links??? I’m really curious to see this now.