Pixel Sampling

01 Feb 2014 //

Tags: After Effects Expressions

Pixel -Sampling _2

This is one of the most useful expressions in my tool kit. Sample a colour from another layer. 1. Add a fill effects to the layer you want to effect. 2. add expression to the fill colour.

thisComp.layer("sampled layer").sampleImage([transform.position[0],transform.position[1]],[10,10])

In this example I've set the pixel sampling to 10x10 pixels, but you can change this to any dimension.

To see a real work example of this check out this piece on my website: Secure Anchorage. This involved many layers and a whole lot of rendering and pre-rendering.

comments powered by Disqus