Tutorial 191: Grid Generation

Joe Clay | Aug 30, 2019

I've experimented a ton with the effect in this tutorial, but I think this might be the most perfect version of it. And because of that, there's a bit more that can be done with it since it relies on a lot less processing power.

We start by building tiles to replace our sources with. Sources are our gradient maps and tiles are our final output. We're basing our system on a 20 x 20px grid, but you don't even have to use a grid if you don't want to. And if you don't, you might want to add some slight noise to your sources because that can have interesting effects when the tiles are mapped to the source.

The basic idea is that we're using an intermediate comp—Piece—to take our source maps and our tiles and composite them together. With some input from our main comp, like piece number and total number of pieces, we drive an extract effect to crop our source to a range of luminance that will fit that piece, and when we combine all of the pieces with different tiles, we get this effect.

I haven't messed around with this particular idea, but you can also add a Master Property in the Piece comp to change what channel the extract effect looks at. It can't be added directly to a Master Property, but you can put a slider on your controller that the Channel parameter looks at. And then you can add that slider to your Master Properties. 0 and 1 are both Luminance. Red is 2. And so on.

Using this idea, you could add tiles according to certain colors which makes your source maps way more powerful. So, as always, there's a lot to be explored. Have fun experimenting and tweet us @workbench_tv if you make anything with this!

For more information, please see the following tutorials. Some are made somewhat obsolete by this technique, but you might be able to glean other interesting information from them.

Expression Code

These expressions are applied to the Extract effect parameters. This one is for black point.

n = thisComp.layer("Controller").effect("Piece")("Slider");
t = thisComp.layer("Controller").effect("Total")("Slider");
(n - 1) * (255/t);

This one goes on white point. It's nearly identical.

n = thisComp.layer("Controller").effect("Piece")("Slider");
t = thisComp.layer("Controller").effect("Total")("Slider");
n * (255/t);

And this last one goes in your Sources/Tiles comp in the opacity for each Source/Tile. Just swap the names to fit which one it is.

if(thisComp.layer("Controller").effect("Source")("Slider") == index) {
} else {

Then just make sure everything is linked up in your Master Properties and you're all set.

Grab the Project Files

Get the project file through our Gumroad Store. This project file contains everything shown in the tutorial, including footage shown. The After Effects project was built in AE CC 2019 and a version has been saved back to 2018. It shouldn't have any issues with either expression engine, but JavaScript would be the faster engine to use if you're in a current version of AE. You might get a notice that you need a plugin or a font, but they aren't required to use this effect. They're mainly used for the thumbnail.

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 R&D files, setups, and elements to early product releases.

Check out our Patreon Today