Lewis Snook
Forum Replies Created
-
Yeah, I’ve been using this expression for a while. It’s great until you have a longer comp, then it can really slow down the render times and for some reason the expression takes longer to calculate the longer it is used.
So for my purposes, is there a way to make this random effect without the looping calculation (I don;t quite understand the above answer), or would I have to use an expression that has this effect (I don;t quite understand the above answer):every 3 seconds it decides whether to blink or not.
still keeping in the fadeTime and blinkDurAnd will this get rid of the loop factor that the ‘while” expression brings?
Thanks
-
Thanks, I really appreciate you explaining that to me! I don’t suppose you know a way of achieving the same effect without this looping 2000 times?
Or is there some way to refresh the expression so I can just render it in smaller parts and then edit them together in Premier. (For example, when I have rendered 30 mins, and then stopped, and then rendered another 30 mins, the render time remains slow – so is there a way to refresh the expression if there is no alternative way of achieving this effect?)
Thanks alot Dan.
-
This is completely different to the topic; but when checking task manager I’ve noticed that After Effects is only using 70% of my Ram for rendering. Is there way I can increase this to speed up render times?
-
thanks, i’ve been trying to work this one out for myself since I want to get better at these expressions, but I just couldn’t crack the syntax. This works a treat.
-
Hi Dan,
This expressions of yours works great for me, up until I add in the fade part. As soon as I add in that part; the eye switches to fade-blinking on at random intervals, but is default set to off. I don’t suppose you know how I can fix this?
-
I just tried implementing the expression and nothing that I can see happened.
That said; this expression found on the same site seems to have the right basis, it’s just lacking the “random” element as it’s executed every few seconds in segments. Is there a way I can set the segment to be random?
Here is the code:
segMin = .3; //minimum segment duration
segMax = .7; //maximum segment duration
minVal = [0.1*thisComp.width, 0.1*thisComp.height];
maxVal = [0.9*thisComp.width, 0.9*thisComp.height];end = 0;
j = 0;
while ( time >= end){
j += 1;
seedRandom(j,true);
start = end;
end += random(segMin,segMax);
}
endVal = random(minVal,maxVal);
seedRandom(j-1,true);
dummy=random(); //this is a throw-away value
startVal = random(minVal,maxVal);
ease(time,start,end,startVal,endVal) -
Since you very helpfully gave me the starting point to mastering my blinking effect, I was wondering if you could help with the final touches to perfecting it.
The code you gave me was an excellent starting point, but I have since thought of a better way, but I don’t know how (since at the moment the face looks like it is sneezing when it talks)
So here’s what I have done.
Instead of having one layer with your code attached, there are two layers (two black circles – the eyballs)
The top layer has it’s opacity synced with the Audio with this expression:
minAudio = 0;
maxAudio = 20;
minValue = 0;
maxValue = 100;
a = thisComp.layer(“Audio Amplitude”).effect(“Both Channels”)(“Slider”);
s = linear(a,minAudio,maxAudio,maxValue,minValue);And the bottom layer has this code linked with the size and the audio:
minAudio = 0;
maxAudio = 20;
minSize = 10;
maxSize = 100;
a = thisComp.layer(“Audio Amplitude”).effect(“Both Channels”)(“Slider”);
s = linear(a,minAudio,maxAudio,maxSize,minSize);
[value[0],s]So here’s how I hope you can help. Currently what happens is the opacity of the top black circle fades in line with the audio (more volume = more fade); and the lower black circle does the ordinary blinking that your code was designed for ( shrinking the size in line with the audio). There is one more addition I wish to make.
For the top layer
I want to add a randomiser. So that the top layer’s expression is opperated by chance. E.g. When the volume is louder, the expression has a X% chance of executing. This is to stop the reaction everytime audio is detected, else as I said, it looks like the face is sneezing when it talks. I am aware of the basic code for randomisers (e.g. the “Seed” function, but I do not know how to apply it to the existing expression. I hope all this makes sense since it’s the final piece of this puzzle, and then I will be happy with my effect.
Thanks, and if you need any more clarity I will try and offer it.
-
You sir are a legend, this code works great. I may need to fiddle with the numbers to try and make it a little less extreme, but no, this can work!