sampleImage() time parameter

Moderators: Disciple, zlovatt

Post Reply
anguschandler
Posts: 4
Joined: April 5th, 2009, 3:20 am

Trying to figure out what kind of input this takes, and what it does with it.

Does it want time in seconds, frames, or timecode? Is it an absolute composition time or is it a time shift, like cloneTimeShift?

Thanks in advance.
Paul Tuersley
Posts: 704
Joined: June 5th, 2004, 7:59 am
Location: London, UK

With expressions time is always in seconds. And I believe it's absolute comp time. It returns an array of four values i.e. [r,g,b,a] ranging from 0 to 1. The required inputs are in the format:

Code: Select all

sampleImage(point, radius = [.5, .5], postEffect=true, t=time)
As a quick test to get you started, add a Point Control and a Color Control effect to a layer, then add this expression to the Color Control property:

Code: Select all

sampleImage(effect("Point Control")("Point"),[1,1],true,time);
This will result in a color value, sampled from the position of the Point Control, with a radius of 1 pixel, at the current comp time.
anguschandler
Posts: 4
Joined: April 5th, 2009, 3:20 am

Thanks.
Post Reply