-
Impossible expression
Hello fellow animators,
I have this problem which is troubling my mind beyond sanity. I’m trying to blow up an object composed of many layers and elements. I want to use the same expression, maybe with variations (2 or 3) for all the layers in the position attribute.
First I came up with this expression:
randomfactor= random(1, 10);
pos= 1
neg= -1
slider=thisComp.layer(“slider”).effect(“Slider Control”)(“Slider”);x= value[0]+neg*randomfactor*slider;
y=value[1]+neg*randomfactor*slider;
z=value[2]+pos*randomfactor*slider;[x,y,z]
But it didn’t work as I wanted to, because the random function makes the animation jumpy.
Then tried this one:
factor= 15;
pos= 1
neg= -1
slider=thisComp.layer(“slider”).effect(“Slider Control”)(“Slider”);x= value[0]+neg*factor*slider;
y=value[1]+neg*factor*slider;
z=value[2]+pos*factor*slider;[x,y,z]
But it was to predictable and the explosion didn’t seem random.
I think what I really need is a way to produce a random factor to use in the first equation instead of the random function, that way a random number is produced for each layer at the first frame and used for the duration of the animation instead of generating random numbers every frame.
Anyone know of a way to produce and hold this random number? Or maybe a better solution for this effect?
Thank you,
Gerardo.