Tessellation & Tiling
Last update: 8 April 2021
Tessellation
Rectangular
//Create a null layer at the top named "Start Tiles" with a Slider effect "Columns",
//and one at the bottom named "End Tiles"
// For Position:
var controlLayer = thisComp.layer("Start Tiles");
var numColumns = Math.floor(thisComp.layer("Start Tiles").effect("Columns")("Slider").value);
var tileIndex = index - controlLayer.index-1;
var columnIndex = tileIndex%numColumns;
var rowIndex = Math.floor(tileIndex/numColumns);
var columnWidth = thisComp.width/numColumns;
var firstTile = thisComp.layer(controlLayer.index+1);
var rowHeight = firstTile.height/firstTile.width*columnWidth;
var xPos = columnWidth*(columnIndex+.5);
var yPos = rowHeight*(rowIndex+.5);[xPos, yPos];
// For Scale:
var controlLayer = thisComp.layer("Start Tiles");
var numColumns = Math.floor(thisComp.layer("Start Tiles").effect("Columns")("Slider").value);
var columnWidth = thisComp.width/numColumns;
var firstTile = thisComp.layer(controlLayer.index+1);
var rowHeight = firstTile.width/firstTile.height*columnWidth;
var xyScale = columnWidth/width*100;[xyScale, xyScale]Hexagonal
Layer slider with responsive positioning

Parameters:
Layer can be aligned in x-axis with adjustable even space in-between
For that to happen, the anchor points of the layers must be centered
This prevents inconsistent opacity for the layers on both sides
If a layer scale changes, the spacing should change accordingly
Create a control that just change the active "tile";
Tiling formula
Last updated
Was this helpful?