Alex Printz
Forum Replies Created
-
Alex Printz
February 14, 2019 at 6:52 pm in reply to: What is faster? Time remapping or valueAtTime?yes, time remapping will be faster as Oleg showed.
It has to do with how expressions run and how after effects renders; every time an expression is calling another value outside of itself to come in, it requires that property to be calculated prior to coming in. (despite already having been rendered and cached, because properties are not cached across frames, only the visual data of the frame!)
So the first 30 seconds of frames are calculated normally, then after that all frames are going to go back and recalculate the time-30s value of the trim path, then bring them into themselves, then finish calculating their own trim path.
Precomping, on the other hand, is how the frame is rendered. After effects ALWAYS renders all precomps prior to all other calculations to make the frame, and then when it it is ready it pulls that data back in; I think it is somehow remembering the previously-rendered precomp visual data and simply plopping that down, but I’m not entirely sure.
The AE render engine is a weird ad-hoc’d system that added content and processes over years that renders in passes that aren’t obvious; I’ve been spending some time trying to learn it, but there’s a lot to be desired on the documentation end.
Alex Printz
Mograph Designer -
you cannot modify sliders through any code. You can write a script to create them (potentially remove them), but not update them.
If you didn’t care that the GUI didn’t update though, you could write your expressions to compensate for the different slider positions, but it would be dependent on a number of things (and probably not what you were looking for)
Alex Printz
Mograph Designer -
Alex Printz
February 11, 2019 at 4:40 pm in reply to: Mechanical cam slot rotation – calculating pointOnPath distance to null point?Sounds like a good challenge;lately I’ve been working with recursive searches and subdividing+calculating bezier curves so I might take a stab at this; but in the meantime, the shorthand would be to use the rotation as an input and filter it through a pre-defined output curve; I do this by translating a property into a ‘time’ value and referencing the keys.
Try pasting this keyframe data into your KA350 – CAM PLATE rotation property; go into the curves editor and convert them all to auto-ease and make the first one an easy-ease key. Adjust the slopes of the keys as necessary.
Adobe After Effects 8.0 Keyframe DataUnits Per Second 25
Source Width 336
Source Height 562
Source Pixel Aspect Ratio 1
Comp Pixel Aspect Ratio 1Transform Rotation
Frame degrees
0 0
39 -2.7894
149 -14.8612
250 -27.8363Expression Data
valueAtTime(linear(thisComp.layer("Cam input lever").rotation,0,-36,key(numKeys).time,key(1).time))
End of Expression DataEnd of Keyframe Data
Alex Printz
Mograph Designer -
Try this:
lay = effect("Slider Control")(1).value;
layNam = String(lay.toFixed(0));
thisComp.layer(layNam).effect("TOP")(1);Alex Printz
Mograph Designer -
Alex Printz
January 24, 2019 at 9:28 pm in reply to: Capture number of lines in Paragraph Text for expressionwhoops, that:
var t = thePathToTheTextObject;
var h = 12; //make this a size appropriate to the line height in pixels; can’t pull dynamically from character panel;
var n = t.sourceRecAtTime(time)/h;
n.toFixed(0)Alex Printz
Mograph Designer -
Alex Printz
January 24, 2019 at 9:27 pm in reply to: Capture number of lines in Paragraph Text for expressionyou could do something like measuring the height of your text box and dividing by the height of the leading between lines:
var t = thePathToTheTextObject;
var h = 12; //make this a size appropriate to the line height in pixels; can’t pull dynamically from character panel;
var n = text.sourceRecAtTime(time)/h;
n.toFixed(0)I would suggest rigging h to a slider and test until it seems right, and then keep it there until it (might) break.
Alex Printz
Mograph Designer -
could do it like a ternary operator as well:
thisComp.layer("Adjustment Layer 1").effect("Checkbox Control")("Checkbox") == 1 ? 100 : 0;Alex Printz
Mograph Designer -
Alex Printz
January 21, 2019 at 6:24 pm in reply to: Adding copyright text to a presets in the Effects Controls PanelI think it’s technically a group without any contents and an extra xml property to darken the label name; the plugin ‘pseudo effect maker’ can help you.
Alex Printz
Mograph Designer -
Try this:
t = 9;
t-= time%t;
t.toFixed(0)Alex Printz
Mograph Designer -
Alex Printz
November 15, 2018 at 4:38 pm in reply to: Apply “posterizeTime()” on only one part of an expressionyeah, all you have to do is declare the posterizeTime between the different calculations, and then recombine. This will wiggle the X position at comp framerate, and this will wiggle the Y at 1 per second:
X = wiggle(2,50);
posterizeTime(1);
Y = wiggle(2,50);
[X[0],Y[1]]Alex Printz
Mograph Designer