betafullpac

Adobe After Effects Expressions

Adobe After Effects Expressions Average ratng: 3,5/5 4558 votes

Speed up your animation workflow with expressions in Adobe After Effects.

Attention, Internet Explorer User Announcement: Jive has discontinued support for Internet Explorer 7 and below. In order to provide the best platform for continued innovation, Jive no longer supports Internet Explorer 7. Jive will not function with this version of Internet Explorer.

Please consider upgrading to a more recent version of Internet Explorer, or trying another browser such as Firefox, Safari, or Google Chrome. (Please remember to honor your company's IT policies before installing new software!).

Use the After Effects expression elements along with standard JavaScript elements to write your expressions. You can use the Expression Language menu at any time to insert methods and attributes into an expression, and you can use the pick whip at any time to insert properties.

If an argument description contains an equal sign ( =) and a value (such as t=time or width=.2), then the argument uses the included default value if you don’t specify a different value. Some argument descriptions include a number in square brackets—this number indicates the dimension of the expected property or Array.

Some return-value descriptions include a number in square brackets—this number specifies the dimension of the returned property or Array. If a specific dimension is not included, the dimension of the returned Array depends on the dimension of the input. The provides information for the standard JavaScript language, including pages for the JavaScript Math and String objects.

Return type: Number. Argument type: t and fps are Numbers; isDuration is a Boolean. Converts the value of t, which defaults to the current composition time, to an integer number of frames. The number of frames per second is specified in the fps argument, which defaults to the frame rate of the current composition ( 1.0 / thisComp.frameDuration). The isDuration argument, which defaults to false, should be true if the t value represents a difference between two times instead of an absolute time.

Absolute times are rounded down toward negative infinity; durations are rounded away from zero (up for positive values). Vector Math functions are global methods that perform operations on arrays, treating them as mathematical vectors. Unlike built-in JavaScript methods, such as Math.sin, these methods are not used with the Math prefix. Unless otherwise specified, Vector Math methods are lenient about dimensions and return a value that is the dimension of the largest input Array object, filling in missing elements with zeros. For example, the expression add(10, 20, 1, 2, 3) returns 11, 22, 3. Provides explanations and examples that show how to use simple geometry and trigonometry with expressions. Return type: Array 3.

Argument type: fromPoint and atPoint are Arrays 3. The argument fromPoint is the location in world space of the layer you want to orient. The argument atPoint is the point in world space you want to point the layer. The return value can be used as an expression for the Orientation property, making the z-axis of the layer point at atPoint.

This method is especially useful for cameras and lights. If you use this expression on a camera, turn off auto-orientation. For example, this expression on the Orientation property of a spot light makes the light point at the anchor point of layer number 1 in the same composition: lookAt(position, thisComp.layer(1).position). Return type: none.

Argument type: offset is a Number, timeless is a Boolean. The random and gaussRandom methods use a seed value that controls the sequence of numbers. By default, the seed is computed as a function of a unique layer identifier, the property within the layer, the current time, and an offset value of 0. Call seedRandom to set the offset to something other than 0 to create a different random sequence.

Use true for the timeless argument to not use the current time as input to the random seed. Using true for the timeless argument allows you to generate a random number that doesn’t vary depending on the time of evaluation. The offset value, but not the timeless value, is also used to control the initial value of the wiggle function. For example, this expression on the Opacity property sets the Opacity value to a random value that does not vary with time: seedRandom(123456, true); random.100 The multiplication by 100 in this example converts the value in the range 0–1 returned by the random method into a number in the range 0–100; this range is more typically useful for the Opacity property, which has values from 0% to 100%. Return type: Number or Array.

Argument type: minValOrArray and maxValOrArray are Numbers or Arrays. If minValOrArray and maxValOrArray are Numbers, this method returns a number in the range from minValOrArray to maxValOrArray. If the arguments are Arrays, this method returns an Array with the same dimension as the argument with the greater dimension, with each component in the range from the corresponding component of minValOrArray to the corresponding component of maxValOrArray. For example, the expression random(100, 200, 300, 400) returns an Array whose first value is in the range 100–300 and whose second value is in the range 200–400. If the dimensions of the two input Arrays don’t match, higher-dimension values of the shorter Array are filled out with zeros. Return type: Number or Array.

Argument type: maxValOrArray is a Number or Array. When maxValOrArray is a Number, this method returns a random number.

Approximately 90% of the results are in the 0 to maxValOrArray range, and the remaining 10% are outside this range. When maxValOrArray is an Array, this method returns an Array of random values, with the same dimension as maxValOrArray. 90% of the values are in the range from 0 to maxValOrArray, and the remaining 10% are outside this range. The results have a Gaussian (bell-shaped) distribution.

Return type: Number or Array. Argument type: minValOrArray and maxValOrArray are Numbers or Arrays.

If minValOrArray and maxValOrArray are Numbers, this method returns a random number. Approximately 90% of the results are in the range from minValOrArray to maxValOrArray, and the remaining 10% are outside this range.

If the arguments are Arrays, this method returns an Array of random numbers with the same dimension as the argument with the greater dimension. For each component, approximately 90% of the results are in the range from the corresponding component of minValOrArray to the corresponding component of maxValOrArray, and the remaining 10% are outside this range. The results have a Gaussian (bell-shaped) distribution. Return type: Number. Argument type: valOrArray is a Number or an Array 2 or 3. Returns a number in the range from -1 to 1.

The noise is not actually random; it is based on Perlin noise, which means that the return values for two input values that are near one another tend to be near one another. This type of noise is useful when you want a sequence of seemingly random numbers that don’t vary wildly from one to the other—as is usually the case when animating any apparently random natural motion. Example: rotation + 360.noise(time). For all the Interpolation methods, the argument t is often time or value, though it can have other values, instead. If t is time, the interpolation between values happens over a duration. If t is value, then the expression maps one range of values to a new range of values. For additional explanations and examples of the Interpolation methods, see.

Expressions

Chris and Trish Meyer provide additional information and examples for these methods in an article on the. Ian Haigh provides a script on that you can use to easily apply advanced interpolation method expressions—such as bounces—to properties. Andrew Devis provides a on the Creative COW website that show in detail how to use the linear expression method along with the Convert Audio To Keyframes command. Return type: Number or Array. Argument type: t, tMin, and tMax are Numbers, and value1 and value2 are Numbers or Arrays.

Returns value1 when t = tMax. Returns a linear interpolation between value1 and value2 when tMin. Return type: MarkerKey. Argument type: name is a String. Returns the MarkerKey object of the marker with the specified name. The name value is the name of the marker, as typed in the comment field in the marker dialog box, for example, marker.key('1').

For a composition marker, the default name is a number. If more than one marker in the composition has the same name, this method returns the marker that occurs first in time (in composition time).

The value for a marker key is a String, not a Number. For example, this expression returns the time of the composition marker with the name '0': thisComp.marker.key('0').time. Return type: Array 4. Argument type: point is an Array 2, radius is an Array 2, postEffect is a Boolean, and t is a Number. Samples the color and alpha channel values of a layer and returns the average alpha-weighted value of the pixels within the specified distance of the point as an array: red, green, blue, alpha.

If postEffect is true, the sampled values are for the layer after masks and effects on that layer have been rendered; if postEffect is false, the sampled values are for the layer before masks and effects have been rendered. The input value point is in layer space; the point 0,0 is the center of the upper-left pixel in the layer. The input value radius specifies the horizontal and vertical distance from the sample center to the edges of the sampled rectangle.

The default value samples one pixel. Return type: MarkerKey. Argument type: name is a String.

Returns the MarkerKey object of the layer marker with the specified name. The name value is the name of the marker, as typed in the comment field in the marker dialog box, for example, marker.key('ch1'). If more than one marker on the layer has the same name, this method returns the marker that occurs first in time (in layer time). The value for a marker key is a String, not a Number. This expression on a property ramps the value of the property from 0 to 100 between two markers identified by name: m1 = marker.key('Start').time; m2 = marker.key('End').time; linear(time, m1, m2, 0, 100). Use layer space transform methods to transform values from one space to another, such as from layer space to world space.

The “from” methods transform values from the named space (composition or world) to the layer space. The “to” methods transform values from the layer space to the named space (composition or world). Each transform method takes an optional argument to determine the time at which the transform is computed; however, you can almost always use the current (default) time. Use “Vec” transform methods when transforming a direction vector, such as the difference between two position values. Use the plain (non-”Vec”) transform methods when transforming a point, such as position. Composition (comp) and world space are the same for 2D layers.

For 3D layers, however, composition space is relative to the active camera, and world space is independent of the camera. Return type: Array 2 or 3. Argument type: point is an Array 2 or 3, and t is a Number. Transforms a point from layer space to view-independent world space. Example: toWorld.effect('Bulge')('Bulge Center') Dan Ebberts provides an expression on his that uses the toWorld method to auto-orient a layer along only one axis.

This is useful, for example, for having characters turn from side to side to follow the camera while remaining upright. Rich Young provides a set of expressions on his that use the toWorld method link a camera and light to a layer with the CC Sphere effect.

Return type: Number or Array. Argument type: freq, amp, octaves, ampmult, 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. This value controls how much detail is in the wiggle. Make this value higher than the default of 1 to include higher frequencies or lower to include amplitude harmonics in the wiggle. Ampmult is the amount that amp is multiplied by for each octave. This value controls how fast the harmonics drop off. The default is 0.5; make it closer to 1 to have the harmonics added at the same amplitude as the base frequency, or closer to 0 to add in less detail. T is the base start time.

This value defaults to the current time. Use this parameter if you want the output to be a wiggle of the property value sampled at a different time. Example: position.wiggle(5, 20, 3,.5) produces about 5 wiggles per second with an average size of about 20 pixels. In addition to the main wiggle, two more levels of detailed wiggles occur with a frequency of 10 and 20 wiggles per second, and sizes of 10 and 5 pixels, respectively. This example, on a two-dimensional property such as Scale, wiggles both dimensions by the same amount: v = wiggle(5, 10); v0, v0 This example, on a two-dimensional property, wiggles only along the y-axis: freq = 3; amp = 50; w = wiggle(freq,amp); value0,w1; Dan Ebberts provides an example expression and a detailed explanation on his that shows how to use the time parameter of the wiggle method to create a looping animation.

Return type: Number or Array. Argument type: freq, amp, octaves, ampmult, and t are Numbers. Samples the property at a wiggled time.

The freq value is the frequency in wiggles per second, amp is the amplitude in units of the property to which it is applied, octaves is the number of octaves of noise to add together, ampmult is the amount that amp is multiplied by for each octave, and t is the base start time. For this function to be meaningful, the property it samples must be animated, because the function alters only the time of sampling, not the value. Example: scale.temporalWiggle(5,.2). Return type: Number or Array. Argument type: width, samples, and t are Numbers.

Smooths the property values over time, converting large, brief deviations in the value to smaller, more evenly distributed deviations. This smoothing is accomplished by applying a box filter to the value of the property at the specified time. The width value is the range of time (in seconds) over which the filter is averaged. The samples value is the number of discrete samples evenly spaced over time; use a larger value for greater smoothness (but decreased performance). Generally, you’ll want samples to be an odd number so that the value at the current time is included in the average. Example: position.smooth(.1, 5). Return type: Number or Array.

Loops a segment of time that is measured from the first keyframe on the layer forward toward the Out point of the layer. The loop plays from the In point of the layer. The numKeyframes value determines what segment is looped: The segment looped is the portion of the layer from the first keyframe to the numKeyframes+1 keyframe. For example, loopIn('cycle', 3) loops the segment bounded by the first and fourth keyframes. The default value of 0 means that all keyframes loop.

You can use keyframe-looping methods to repeat a series of keyframes. You can use these methods on most properties. Exceptions include properties that can’t be expressed by simple numeric values in the Timeline panel, such as the Source Text property, path shape properties, and the Histogram property for the Levels effect. Keyframes or duration values that are too large are clipped to the maximum allowable value. Values that are too small result in a constant loop.

Loop type result cycle (default) Repeats the specified segment. Pingpong Repeats the specified segment, alternating between forward and backward.

Offset Repeats the specified segment, but offsets each cycle by the difference in the value of the property at the start and end of the segment, multiplied by the number of times the segment has looped. Continue Does not repeat the specified segment, but continues to animate a property based on the velocity at the first or last keyframe. For example, if the last keyframe of a Scale property of a layer is 100%, the layer continues to scale from 100% to the Out point, instead of looping directly back to the Out point.

Adobe After Effects Torrent

This type does not accept a keyframes or duration argument. Return type: Number or Array. Loops a segment of time that is measured from the last keyframe on the layer back toward the In point of the layer. The loop plays until the Out point of the layer. The specified number of keyframes determines the segment to loop. The numKeyframes value sets the number of keyframe segments to loop; the specified range is measured backward from the last keyframe. For example, loopOut('cycle', 1) loops the segment bounded by the last keyframe and second-to-last keyframe.

The default value of 0 means that all keyframes loop. See the entry for loopIn for more information.

David Van Brink provides an instructional article and sample project on his that show how to use the Echo effect, the Particle Playground effect, and the loopOut method to animate a swarm of stylized swimming bacteria. Return type: Number or Array.

Loops a segment of time that is measured from the first keyframe on the layer forward toward the Out point of the layer. The loop plays from the In point of the layer. Specified duration determines the segment to loop. The duration value sets the number of composition seconds in a segment to loop; the specified range is measured from the first keyframe. For example, loopInDuration('cycle',1) loops the first second of the entire animation.

The default of 0 means that the segment to loop begins at the layer Out point. See the entry for loopIn for more information. Return type: Number or Array. Loops a segment of time that is measured from the last keyframe on the layer back toward the In point of the layer. The loop plays until the Out point of the layer. Specified duration determines the segmetn to loop. The duration value sets the number of composition seconds in a segment to loop; the specified range is measured backward from the last keyframe.

For example, loopOutDuration('cycle', 1) loops the last second of the entire animation. The default of 0 means that the segment to loop begins at the layer In point. See the entry for loopIn for more information. Return type: Group.

Sony Vegas Pro

Returns a group of properties relative to the property on which the expression is written. For example, if you add the propertyGroup(1) expression to the Rotation property of a brush stroke, the expression targets the Transform property group, which contains the Rotation property. If you add propertyGroup(2) instead, the expression targets the Brush property group. This method lets you establish name-independent relationships in the property hierarchy. This method is especially useful when duplicating properties that contain expressions. The numProperties method for propertyGroup returns the number of properties in the property group. This example returns the number of properties in the group that contains the property on which the expression is written: thisProperty.propertyGroup(1).numProperties.

You can access values for composition markers and layer markers using the same methods. Access layer markers through the thisLayer.marker object; access composition markers through the thisComp.marker object. For the purpose of expressions, markers are a special type of Key object, so you can use methods such as nearestKey(time) to access markers, and markers also have time and index attributes. The index attribute is not the number (name) of the marker; it is the keyframe index number, representing the order of the marker in the time ruler. Expressions have access to all the values for a marker that you can set in the Composition Marker or Layer Marker dialog box. This expression on the Source Text property of a text layer displays the time, duration, index, comment (name), chapter, URL, frame target, and cue point name for the layer marker nearest the current time, and whether the marker is for an event cue point. Points An array of length 1 or greater containing number pair arrays representing the x,y coordinates of the path points.

Required unless no parameters are passed (i.e., createPath). Default is 0,0, 100,0, 100,100, 0,100. Isclosed Boolean, optional. Determines if the mask is closed. If true, the last point will be connected to the first point.

Default is true. InTangents An array containing number pair arrays representing the x,y offset coordinates of the outgoing tangent handles to the path points. Required unless no parameters are passed (i.e., createPath). The array length must be the same as points, or you can pass an empty array , which will assume the same length as points and 0,0 for all tangents. Default is an empty array. OutTangents An array containing number pair arrays representing the x,y offset coordinates of the incoming tangent handles to the path points. Required unless no parameters are passed (i.e., createPath). The array length must be the same as points, or you can pass an empty array , which will assume the same length as points and 0,0 for all tangents.

Adobe After Effects Expressions List

Default is an empty array.