beautypg.com

Adobe After Effects User Manual

Page 697

background image

fromCompVec(vec, t=time)

toWorldVec(vec, t=time)

fromWorldVec(vec, t=time)

fromCompToSurface(point, t=time)

To the top

pointOfInterest

zoom

depthOfField

focusDistance

aperture

blurLevel

active

Transforms a vector from layer space to composition space. Example: toCompVec([1,0])

Return type: Array [2 or 3].

Argument type: vec is an Array [2 or 3], and t is a Number.

Transforms a vector from composition space to layer space. Example (2D layer):

dir=sub(position, thisComp.layer(2).position); fromCompVec(dir)

Return type: Array [2 or 3].

Argument type: vec is an Array [2 or 3], and t is a Number.

Transforms a vector from layer space to world space. Example: p1 = effect("Eye Bulge 1")("Bulge Center"); p2 =

effect("Eye Bulge 2")("Bulge Center"); toWorld(sub(p1, p2))

Return type: Array [2 or 3].

Argument type: vec is an Array [2 or 3], and t is a Number.

Transforms a vector from world space to layer space. Example: fromWorld(thisComp.layer(2).position)

Return type: Array [2].

Argument type: point is an Array [2 or 3], and t is a Number.

Projects a point located in composition space to a point on the surface of the layer (zero z-value) at the location where it appears when viewed
from the active camera. This method is useful for setting effect control points. Use with 3D layers only.

Camera attributes and methods (expression reference)

Camera objects have the same attributes and methods as Layer objects, except for source, effect, mask, width, height, anchorPoint,

scale

, opacity, audioLevels, timeRemap, and all of the material properties.

Return type: Property [3].

Returns the point of interest values of a camera in world space.

Return type: Property.

Returns the zoom values of a camera in pixels.

Here’s an expression for the Scale property of a layer that maintains the relative size of the layer in frame while changing the z position (depth) of
a layer or the Zoom value of a camera:

cam = thisComp.activeCamera; distance = length(sub(position, cam.position)); scale * distance /

cam.zoom;

Return type: Property.

Returns 1 if the Depth Of Field property of a camera is on, or returns 0 if the Depth Of Field property is off.

Return type: Property.

Returns the focus distance value of a camera, in pixels.

Return type: Property.

Returns the aperture value of a camera, in pixels.

Return type: Property.

Returns the blur level value of a camera as a percentage.

Return type: Boolean.

Returns true if the camera is the active camera for the composition at the current time: the Video switch for the camera layer is on, the current
time is in the range from the In point of the camera layer to the Out point of the camera layer, and it is the first (topmost) such camera layer listed

693

This manual is related to the following products: