background preloader

Java

Java
Related:  Scripting & Expressions

After Effects Expressions I realize that expressions can be daunting, and some would rather copy and past useful code rather than learn the language. That’s cool with me. Therefore, I’d like to share with you my top 5 after effects expressions. These are expressions I use in just about every project, and I consider them to be incredible workflow enhancements. Download My Top 5 After Effects Expressions as FFX presets here. 1. Essentially, Inertial Bounce creates a bouncing motion of any parameter from one keyframe to the next, based on its velocity. This expression is a bit of a community effort. Modify “amp” for the amplitude or how much bounce is present. amp = .1; freq = 2.0; decay = 2.0; n = 0; if (numKeys > 0){ n = nearestKey(time).index; if (key(n).time > time){ n--; }} if (n == 0){ t = 0; }else{ t = time - key(n).time; } if (n > 0){ v = velocityAtTime(key(n).time - thisComp.frameDuration/10); value + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t); }else{value} Like the free content here? 2. 3. 4.

Google C++ Style Guide Definition: Streams are a replacement for printf() and scanf(). Pros: With streams, you do not need to know the type of the object you are printing. You do not have problems with format strings not matching the argument list. (Though with gcc, you do not have that problem with printf either.) Streams have automatic constructors and destructors that open and close the relevant files. Cons: Streams make it difficult to do functionality like pread(). Decision: Do not use streams, except where required by a logging interface. There are various pros and cons to using streams, but in this case, as in many other cases, consistency trumps the debate. Extended Discussion There has been debate on this issue, so this explains the reasoning in greater depth. Proponents of streams have argued that streams are the obvious choice of the two, but the issue is not actually so clear. cout << this; // Prints the address cout << *this; // Prints the contents

Expressions From 1. Intertial Bounce Essentially, Inertial Bounce creates a bouncing motion of any parameter from one keyframe to the next, based on its velocity. This expression is a bit of a community effort. Modify “amp” for the amplitude or how much bounce is present. amp = .1; freq = 2.0; decay = 2.0; n = 0; if (numKeys > 0){ n = nearestKey(time).index; if (key(n).time > time){ n--; }} if (n == 0){ t = 0; }else{ t = time - key(n).time; } if (n > 0){ v = velocityAtTime(key(n).time - thisComp.frameDuration/10); value + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t); }else{value} 2. This is nothing brilliant, but it is something I wrote and use all the time. This is a slightly enhanced version that I’d revamped since I posted it in the “Auto Slideshow” presets and added the option to use markers. //Autofade: Add to opacity 3. This is a cool expression to use on text. If you prefer to use Z space position instead of scale, try this one: 4. 1.

Learn to Program for Windows in C++ Welcome to the series Learn to Program for Windows in C++. The aim of this series is to teach you how to write a Windows program in C++. In the first module, you'll learn step-by-step how to create and show a window. Later modules will introduce the Component Object Model (COM), graphics and text, and user input. For this series, it is assumed that you have a good working knowledge of C++ programming. No previous experience with Windows programming is assumed. In This Section Build date: 10/5/2010

Dan Ebbert Expression language reference Return type: Number or Array. Argument type: freq, amp, octaves, amp_mult, and t are Numbers. Randomly shakes (wiggles) the value of the property. freq value is the frequency in wiggles per second. amp value is the amplitude in units of the property to which it is applied. octaves is the number of octaves of noise to add together. amp_mult is the amount that amp is multiplied by for each octave. t is the base start time. Example: position.wiggle(5, 20, 3, .5) produces about 5 wiggles per second with an average size of about 20 pixels. This example, on a two-dimensional property such as Scale, wiggles both dimensions by the same amount: v = wiggle(5, 10); [v[0], v[0]] This example, on a two-dimensional property, wiggles only along the y axis: freq = 3; amp = 50; w = wiggle(freq,amp); [value[0],w[1]]; Paul Tuersley provides a script on the AE Enhancers forum that automatically adds wiggle, smooth, and loop expressions to selected properties.

AE Tips and Tricks Connect Layers - Rope, triangulation, spanning tree for After Effects This script connects the selected layers with segments or triangles created with shape layers. It was originally created to visualize Newton2 joints but as you will see, it can do much more. Rope Creates a single shape layer with a path connecting the selected layers (2D only). Spanning Tree Computes minimum spanning tree and draws each edge with a shape layer (2D and 3D support). Triangulation Triangulates the selected layers and draws each edge with a shape layer (2D and 3D support). Note that for functions that create shape keyframes (Triangulation with Filled Triangles turned on, and Rope), keyframing is done within the comp work area. Quick start guide Compatibility: For AE CS6 or later Current version: 1.08 – Initial release – May 2013 Note: And yes, everything in the promo video has been done in After Effects CS6.

After Effects ExtendScript Training Complete Series by David Torno After Effects ExtendScript Training is a video training series on Adobe® ExtendScript for After Effects®. Below are direct links to the entire collection right here on PVC. Enjoy and please spread the word. The After Effects ExtendScript Training series is the first comprehensive video tutorial series focused on Adobe® ExtendScript. Episode 1 (Intro) Episode 2 (Javascript Basics p1) Episode 3 (Javascript Basics p2) Episode 4 (After Effects Object Model structure overview / Script Preparation and development tips / Single Item Access of various project items, comps and layers) Episode 5 (Access Renderqueue items, output modules and file paths / Multiple item access of project items, comps and layers / Batch change all renderqueue items file paths) Episode 6 (Collecting data into an Array() / Changing values / Various tips) Episode 7 (Create new comps and folders / Create Null, Solid, and Text layers) Episode 9 (Globally change blue solids to red / Replace solid name blue with red) Share This

31 Essential Scripts from AEScripts.com If you have never used scripts before, you are missing out. These extensions to your After Effects arsenal can be invaluable. There are tons to choose from, they do a wide range of tasks, and new ones are being developed all the time. Lloyd Alvarez, our former editor actually runs AEscripts.com, an online marketplace and central hub for everything scripts in the AE Universe. This is quite the script to start this roundup off with. Quite possibly my favorite script, and not just because of the mustache, is Magnum - The Edit Detector, which can scene detect any piece of footage you throw at it. This is great if you are working with crappy footage, or some wierd pulldown that you might encounter on your AE journey. This is an extremely useful script, and I can think of a hundred uses for it. I am sure you all know the Keyframe Assistant "Time-Reverse Keyframes", but wouldn't it be great to have a keyboard shortcut enabled to perform this simple function?

Related: