Skip to main content

Image Sampler

Intro

The Image Sampler samples an Input Asset and then outputs values of between 0-1 depending on the value (lightness/darkness) of the asset (e.g. black = 0, white = 1). It supports still images, image sequences and video.

Material Sampler

The Image Sampler does not support Filters and Shaders for performance reasons. It reads the raw image data and so any adjustments (levels, hue etc) need to made to the original asset and reloaded in the Assets Window. Check out the Material Sampler for more flexibility but at the cost of performance.

UI

Position - Set the Image Sampler's position. 0,0 is in the centre of the Composition.

Rotation - Set the Image Sampler's rotation (in degrees).

Scale - Set the Image Sampler's scale.

Skew - Slant or shear the Image Sampler along the X or Y axis.

Pivot - Define the pivot point for the Image Sampler. This is useful when animating rotation and scale.

Opacity - Set the Image Sampler's preview opacity. Note - the Image Sampler is not included in renders.

Enabled - When unchecked, the Image Sampler will output a value of 1 (the result being the same as if the Image Sampler wasn't there). Toggling the visibility icon (the eye) in the Scene Window will only hide the Image Sampler whereas this attribute will affect its output.

Strength - Determine the strength of the Image Sampler's output.

Invert Value - When checked, the output of the image will be reversed so that a low value outputs 1 and a high value outputs 0 (e.g. white = 0, black = 1).

Image Asset - Drag in an Asset from the Assets Window. Still images, image sequences and video are supported.

Tiling - Determine what happens at the borders of the Image Asset.

  • Clamp - Use the values at the edges of the Image Asset.
  • Repeat - Repeat/ loop the Image Asset.
  • Decal - Cut out the Image Asset.

Looping - Where an image sequence or movie is used as the Image Asset, loop the sequence/ movie.

Offset - Add/subtract a value to the output.

Channel - Choose a color channel to sample:

  • RGB - Sample all RGB channels.
  • Red - Sample the red channel.
  • Green - Sample the green channel.
  • Blue - Sample the blue channel.
  • Alpha - Sample the alpha channel.
  • Luminance - Sample the luminance of the image

Time - A connection to the Composition's Time which is used to drive the frame number of a video or image sequence.

Example
  1. Import an image to the Assets Window.
  2. Create an Image Sampler.
  3. Drag the image from the Assets Window into the Image Sampler's Image Asset.
  4. Create a Rectangle.
  5. With the Rectangle selected, click the Duplicator Shelf item.
  6. Connect imageSampler.idduplicator.shapeScale.

The shapes will be scaled dependent on the brightness of the image. Note - set the Image Sampler's Opacity to 0 to hide it from the Viewport.