Tutorial 165: Generative Art

Joe Clay | Mar 1, 2019

We just got back from Keyframes Conference so we're going to explore a little bit of what we talked about there. We'll take a look at how to set up a grid that can generate imagery using master properties in a single precomp. Building the grids using StackIt, it's pretty easy to make some interesting imagery with short expressions.

Expressions

Inside of your block precomps, add a controller layer. Add a slider to it called Brightness. Then you'll have to add your own expressions to achieve whatever you're looking for. Here are some examples.

For poly shape points:

Math.floor(thisComp.layer("Controller").effect("Brightness")("Slider")%.06*100)+3;

For shape strokes:

thisComp.layer("Controller").effect("Brightness")("Slider")*7+1;

For grids (sized from width):

b = Math.floor(thisComp.layer("Controller").effect("Brightness")("Slider")*8);
if(b < 1) { b = .5 }
30/b;

Then in your main comp, also set up a controller layer. On that layer you'll need a Layer Control. Then add this to your precomp with Brightness Master Property.

l = thisComp.layer("Controller").effect("Layer Control")("Layer");
b = l.sampleImage(position,[5,5], true);
b[0];

And then duplicate your layers with either StackIt or do it manually. If you grab the project file, there is a 60x60 and a 30x30 grid already set up.

Grab the Project Files

The best way to get our project files is to become a patron on Patreon. For $5 a month, you get access to all of the tutorial project files we've made available as well as other monthly projects, rigs, R&D, elements, early product previews, and BTS content not available anywhere else! You can also purchase just this project file on our Gumroad Store if you would rather do that.

Get access to all of our project files on Patreon or Get this single project file on Gumroad