beautypg.com

Adobe After Effects CS4 User Manual

Page 679

background image

673

USING AFTER EFFECTS CS4

Expressions

Last updated 12/21/2009

Returns the value of the Light Transmission property for a 3D layer.

castsShadows

Return type: Property.

Returns a value of 1.0 if the layer casts shadows.

acceptsShadows

Return type: Property.

Returns a value of 1.0 if the layer accepts shadows.

acceptsLights

Return type: Property.

Returns a value of 1.0 if the layer accepts lights.

ambient

Return type: Property.

Returns the ambient component value as a percentage.

diffuse

Return type: Property.

Returns the diffuse component value as a percentage.

specular

Return type: Property.

Returns the specular component value as a percentage.

shininess

Return type: Property.

Returns the shininess component value as a percentage.

metal

Return type: Property.

Returns the metal component value as a percentage.

Layer Space Transforms methods (expression reference)

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 layer space to the named space (composition or world). The “to”
methods transform values from the named space (composition or world) to layer space. 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.

toComp(point, t=time)

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 composition space.

fromComp(point, t=time)

Return type: Array [2 or 3].

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

Transforms a point from composition space to layer space. The resulting point in a 3D layer may have a nonzero value
even though it is in layer space. Example:

fromComp(thisComp.layer(2).position)

toWorld(point, t=time)

Return type: Array [2 or 3].

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

This manual is related to the following products: