Ling Talfi
Forum Replies Created
-
Thanks, this actually is EXACTLY what I was looking for.
And btw, spoon fed is good, it’s just efficient searching said with other words.
So yes, your post made the difference, at least for me.
You made the internet a better place when you shared that (I believe). -
Ling Talfi
July 9, 2016 at 4:18 pm in reply to: remove/attenuate white contour around the face and hairYes, this is a black background behind her
(She was keyed out from an awful green screen, with wrinkles and light contrasts). -
Ling Talfi
July 7, 2016 at 4:50 pm in reply to: keyframe from x to y, with controlled variation – how?Organic animation preset script
================================Goal
———
You have an existing animation between two keyframes A and B.
This script adds some variation on A and B values.
It actually only works with linear interpolation between A and B.Use case, why?
———–
I have a video with two guys fighting.
In order to make the fight more spectacular, I want to create some impacts on every punch, like on a “street fighter” game.
So I manage to create an impact glow on a layer, using the “CC Light Burst 2.5” and Glow effects.
To add more realism, I add some short animation on those effects (using a start and end keyframe on different props of the effects).Now I know that I need to repeat the process for every punch, so I save the layer’s effects as an animation preset.
Then I just need to re-apply the animation preset on every layer, …
the only problem with that is that the effects will look exactly the same on each layer,
so I want to induce little variation on them: instead of having keyframe A=>x and B=>y, I want A => x+-v and B => y+-v.So, that’s what the script below basically does, it chooses a variation number and applies it to the keyframes.
How
———
Animate a property using two keyframes A and B.
Set the value of the property at keyframe A to x,
and the value of the property at keyframe B to y.Then, add the script below as an expression to the property (alt+click).
You need to understand the script and configure it accordingly too.Here are some insights.
The script expects that your layers are named n1, n2, n3…
Good luck.Script
————
// docs: https://forums.creativecow.net/thread/227/33228
var prefixLength = 1; // a layer is named
var startVariationFactor = 1; // the layerNumber will first be multiplied by this startVariationFactor…
var startVariationDelta = 30; // …then modulo-ed to this startVariationDelta…
// … then if the layer number is odd, the variation will be subtracted from the keyframe’s base value,
// or added if the layer number is even.var endVariationFactor = 1; // the number of the layer will first be multiplied by this endVariationFactor…
var endVariationDelta = 30; // …then moduloed to this endVariationDelta…
// … then if the layerNumber modulo 3 is equal to 0, then the sign of the variation will be the same
// as the one of the start variation, and if not, it will be of the reverse signvar useRemote = false; // default=false, set to true when you want to debug and apply this script on a remote text layer which displays the debug var…
// set the variables below ONLY IF you are debugging and you apply this script to a text layer
var layerName = “n1”;
var effectName = “CC Light Burst 2.5”;
var effectName = “Glow”;
var effectParamId = “Ray Length”;
var effectParamId = “Glow Intensity”;/**
* SCRIPT
* ———————————————-
* You shouldn’t have to edit below this line…
*/
// define fxProp
if(true === useRemote){
theLayer = thisComp.layer(layerName);
fxProp = theLayer.effect(effectName).param(effectParamId);
}
else{
layerName = thisLayer.name;
fxProp = thisProperty;
}var theLayer = thisComp.layer(layerName);
var layerNumber = parseInt(layerName.substr(prefixLength));// getting the frame number of the 2 keyframes
var fxStartFrame = theLayer.timeToFrames(fxProp.key(1).time);
var fxEndFrame = theLayer.timeToFrames(fxProp.key(2).time);// getting the 2 keyframes’ values
var fxStartValue = fxProp.key(1);
var fxEndValue = fxProp.key(2);var debug = “”;
debug += “Raw: ” + fxStartFrame + ” => ” + fxStartValue[0] + “; ” + fxEndFrame + ” => ” + fxEndValue[0];// creating the variation values
var startVariationValue = (layerNumber * startVariationFactor) % startVariationDelta;
var isNegative = (1 === layerNumber % 2);
debug += “\nisNegative: ” + isNegative;
debug += “\nstartVariationValue: ” + startVariationValue;var endVariationValue = (layerNumber * endVariationFactor) % endVariationDelta;
var isSameSign = (0 === layerNumber % 3);
debug += “\nendVariationValue: ” + endVariationValue;
debug += “\nsameVariationSign: ” + isSameSign;// update the values using variation
if(isNegative){
fxStartValue -= startVariationValue;
}
else{
fxStartValue += startVariationValue;
}
if(isSameSign){
if(isNegative){
fxEndValue -= endVariationValue;
}
else{
fxEndValue += endVariationValue;
}
}
else{
if(isNegative){
fxEndValue += endVariationValue;
}
else{
fxEndValue -= endVariationValue;
}
}debug += “\nProcessed: ” + fxStartFrame + ” => ” + fxStartValue + “; ” + fxEndFrame + ” => ” + fxEndValue;
// now get the current frame
var curFrame = thisLayer.timeToFrames(time);
debug += “\ncurFrame: ” + curFrame;// prepare the linear interpolation values
var nbSteps = fxEndFrame – fxStartFrame; // assert this is >0
debug += “\nnbSteps: ” + nbSteps;
var valueRange = (fxEndValue – fxStartValue);
debug += “\nvalueRange: ” + valueRange;
var stepIncrement = (fxEndValue – fxStartValue) / nbSteps;
debug += “\nstepIncrement: ” + stepIncrement;// apply to the current frame
var newValue = (curFrame – fxStartFrame) * stepIncrement + fxStartValue;
debug += “\ncurValue: ” + newValue;var ret = newValue;
if(true === useRemote){
ret = debug;
}
ret -
Ling Talfi
July 7, 2016 at 10:36 am in reply to: keyframe from x to y, with controlled variation – how?@Kalle Kannisto
In other words, I want to be able to apply the preset to any layer, and it would basically re-use
the existing keyframes’ position, but actually change their values from x,y to x+-v, y+-v. -
Ling Talfi
December 22, 2015 at 11:55 am in reply to: Adobe After Effects error: overflow converting ratio denominatorsI just had the same problem with cc2015, and I found a fix.
After effects doesn’t recognize the format of the camera I used, so I converted my footage in mp4 first, using a (free) software called handbrake.
From premiere pro, I used right click > Replace with After Effects Composition, and I had the problem.
But then I changed the encoding settings in Handbrake: instead of converting with the default “Variable Framerate” setting, I reencoded the footage using the “Constant Framerate” setting, and then I can do the right click from premiere pro and after effects doesn’t complain anymore.
-
I had the same problem in cc2015, I just clicked the “Toggle Pixel Aspect Ratio Correction” button in ae, in the composition window (where the footage is being displayed) and it fixed it.
Using right click “Replace with ae composition” from pp.
-
Same problem here, I have to relaunch after effects 2015 to see the changes.
-
Ling Talfi
December 4, 2015 at 8:40 am in reply to: Camera Not Orbiting 3D Object – Any Problem Solvers ?I had the same problem with cc 2015, and I found a solution: when you create a camera, make sure it is a two nodes camera instead of a one node camera.
See my full answer here:
https://forums.creativecow.net/thread/2/1068676 -
Actually I find what my problem was.
My problem was that I used a one node camera.
The camera has to be a two nodes camera, which brings up a point of interest around which the camera can rotate with the orbit camera tool.