Particle random lifespan after initial state set



Not sure if this has ever worked of if I’m doing something wrong. I’ve emitted say 500,000 particles (or Nparticles) using a picture on a plane so I get RGB information. Set the initial state and reset to frame 0.

Now I want to sim with turbulance, drag etc and have the particles die off randomly over time…no matter what I do they never die.
I’ve set lifespan mode to random range (as low as 0.01) , nothing. Created an expression on Lifespan PP, nothing.

The only way I’ve got it to work is to have a really high emission rate for 2-3 frames (10000000.000) but that sometimes makes Maya crash…(2018.3)

My end goal is to pass the simulation to Krakatoa so I’d like to control the lifespan.

Is there another way of using an Initial State along with lifespan ?


Set the lifespan before you set the initial state.



Nope, that doesn’t work. If you set the lifespan before initial state then go back to the start (with lifespan on) you loose 1/2 to 2/3rds of your particles.

If you go back to start with lifespan off, turn lifespan on and start the sim it ignores the lifespan.

Made a ploypane, assigned a lambert with checker texture,
emit from object, set to surface.
Activated color PP attribute.
Assigned the checker to emitter color in texture emission, enabled inherit color and texture rate.

Lifespan set to forever. Emitter set to 0 speed and normal speed.
Set Nucleus to 0 gravity.
Sim so white areas get full of particles.

Set lifespan to 2 and .5 random. Set initial state.
Reset to 0 and you loose 1/2 to 2/3rds of your particles.

If you don’t set lifespan to anything, set initial state.
Reset to 0, set lifespan, then re-start the sim, it ignores the lifespan you set.

I’m trying to fill specific areas of a picture full of particles to pass to Krakatoa, but if I set a small run up 2-3 frames and the emit rate extremely high, after around 300k Maya crashes.



Let me re-phrase that, you set the lifespan before you sim. Per particle attributes are created on particle birth or runtime, in this case particle birth so if you then go ahead and change the attribute after birth, then you’ll run into problems.

So set your random lifespan before you sim and on the emitter you can scale rate by object size which should fill your shot within a frame or 3 then set the initial state.
You lose some frames of lifespan here which is negligible but if critical just add some more time on lifespan to compensate.

Theres probably a better way of doing this but this hack should work.