Activity › Forums › Adobe After Effects Expressions › tirigger emitter with marker
-
tirigger emitter with marker
Posted by Sarah Schela on July 17, 2014 at 3:24 pmHello folks
I dearly need your help.
is there any way to control the emitting timing of particles of particular effect set on grid?
I set the emitting the on grid and type to traverse.I would like to link it to an audio rhythm, and I set marker on some beats.
Thank you so much for any help or idea.
Sarah Schela replied 11 years, 10 months ago 2 Members · 5 Replies -
5 Replies
-
Sarah Schela
July 17, 2014 at 5:13 pmI think it could be done with a simple if-else clause.
is there is a marker, emit 1 particle, if not, stay zero.but I seem not to be able to accomplish this simple expression….
please, help!
-
Xavier Gomez
July 17, 2014 at 5:34 pmYou can try this (expression to put in the emitter’s emit rate property, change “Null 1” to the name of the layer carrying the markers):
// the emitter emits at the control layer's markers
// the emit rate at markers is controlled by the emitter key value
// how fast it decays after each marker is controlled by this param:
decay = 25;// get last key index;
m = thisComp.layer("Null 1").marker;
idx = m.numKeys ? m.nearestKey(time).index : 0;
if (idx && m.key(idx).time>time) idx--;
//
(idx<1) ? 0 : value*Math.exp(-decay*(time-m.key(idx).time));
Xavier -
Sarah Schela
July 17, 2014 at 5:51 pmoh wow, it seems to work in the right direction!
That’s fantastic! Thank you a thousand times!!!Only thing is that my beat is quite fast. and I need to adjust the number per second to a higher rate, like 10 or 20, not 1 per second.
Do you know where I can adjust the value? -
Xavier Gomez
July 17, 2014 at 6:14 pmHi again,
it’s not completely clear to me what number you are refering to.
If it is how many particles are emitted at each marker, do it by changing the emit rate value (which the expression reads for its final output).
If it is to emit not at all markers but say every 3 markers, something like this, or the other way round, 3 times between 2 consecutive markers, then the expression should be modified slightly.Xavier.
-
Sarah Schela
July 17, 2014 at 6:56 pmHello Xavier,
oh, I see! That fixed my problem! I meant the particles emitted at each marker.
Again, thank you SO SO much. you saved my life, otherwise I would have spent my night setting keyframes…
Reply to this Discussion! Login or Sign Up