Menu

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

Get the project file through our Gumroad Store. This project file contains all of the setups shown in the tutorial, as well as a corrected version using the more efficient setup. It also includes the slide deck from my Using Master Properties for Generative Art session at Keyframes. I'm not sure what you can gain from that, but you can at least see how they're all built using greyscale maps that are completely changed using Grid effects driven by brightness.

If you're buying project files, consider becoming a Patron. At the $5/mo. tier, you get access to project files as they come out and some tutorials also come with additional BTS content showing more of the builds.

Get the project on Gumroad

Become a Patron

If you'd like to help support Workbench, check out our Patreon page. Thank you for even considering clicking this link to support what we're doing. We appreciate it. Patrons get all sorts of benefits, from additional files to early product releases depending upon the tier.

Check out our Patreon Today