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) {
    100;
} else {
    0;
}

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

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