Quantcast
Channel: Adobe Community : Popular Discussions - After Effects Expressions
Viewing all articles
Browse latest Browse all 47983

My Expression Selector runs super slow.

$
0
0

So I have a text expression that adds spring and bounce to text characters via and Expression Selector Expression... My text however takes forever to render compared to a Range Selector animating the text in a similar way (minus the bounce).  I realize that by adding spring type effects to many individual text characters takes a lot of calculations, but it seems to be running extremely slow for what is essentially a fairly simple operation.  Is there any way for me to optimize my expression to speed things up?

 

_________________________________________________________

L = text.sourceText.length;

 

if (effect("Random")("Checkbox")==1){

maxDelay = effect("Max Delay")("Slider"); seedRandom(textIndex,true);

myDelay = random(maxDelay); t = time - myDelay;

}else{

maxDelay = effect("Max Delay")("Slider"); seedRandom(textIndex,false);

myDelay = (textIndex)*(maxDelay/L); t = time - myDelay;}

 

if (t >= 0){ freq =effect("Frequency")("Slider"); amplitude = effect("Amplitude")("Slider"); decay = effect("Damping")("Slider");

 

s = amplitude*Math.cos(freq*t*2*Math.PI)/Math.exp(decay*t);

[s,s] }else{ value }

___________________________________________________________

 

***Items in bold italics are simply variables pickwhipped to slider controls or check boxes.

 

The expression does what I want. Just trying to speed it up. Any ideas?


Viewing all articles
Browse latest Browse all 47983

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>