Bend Layers by Mask in After Effects with Reka Grid plugin tutorial.

Опубликовано: 26 Март 2026
на канале: irrealix
3,100
50

In this tutorial demonstrates Reka Grid Scripts possibilities.

Sample project: https://www.dropbox.com/s/rvf8bfwwuaa...

Get free demo: https://aescripts.com/reka-grid/
Documentation here: https://irrealix.com

Final script:
if points == nil then
points = {}
for ind = 0, xCount do
points[ind] = {}
local p = points[ind]
p.pX, p.pY = GetPath(1, ind / xCount)
end

local p0 = points[0]
local minX, minY, maxX, maxY = p0.pX, p0.pY, p0.pX, p0.pY
for ind = 1, xCount do
local p = points[ind]
minX = math.min(minX, p.pX)
minY = math.min(minY, p.pY)
maxX = math.max(maxX, p.pX)
maxY = math.max(maxY, p.pY)
end

local centerX, centerY = 0.5 * (maxX + minX), 0.5 * (maxY + minY)

local pathLength = 0
local prevX, prevY = p0.pX, p0.pY
for ind = 1, xCount do
local p = points[ind]
pathLength = pathLength + Dist2D(prevX, prevY, p.pX, p.pY)
prevX, prevY = p.pX, p.pY
end

local pathScale = gridWidth / pathLength
for ind = 0, xCount do
local p = points[ind]
p.x = (p.pX - centerX) * pathScale
p.y = (p.pY - centerY) * pathScale
end
end

local p1 = points[i]
local p2 = points[i + 1]
x = (p1.x + p2.x) * 0.5
z = - (p1.y + p2.y) * 0.5
local xLen = Dist2D(p1.x, p1.y, p2.x, p2.y)
scaleX = 100 * xLen / (2 * radius)
angleY = math.deg(math.atan(p2.y - p1.y, p2.x - p1.x))

y = (yPart - 0.5) * (gridHeight - gridHeight / yCount)
scaleY = 100 * (gridHeight / yCount) / (2 * radius)