Now Loading..

The Venetian Blinds Conundrum

1619131780

A story about precision

After a rough morning of finishing a test and failing miserably to deliver on expectations, I went to take a short nap.

When I woke up, it was 8 hours later in the evening, what a "nap". Got my computer booted up, ready to waste another day in front of the monitor, I was informed of the existence of this funny image.

pic.twitter.com/DlRiYSBW1j

— CH FR (currently logged off) (@chfr_otomads) July 27, 2020

"haha thats relatable I will like this tweet"

Then I looked deeper into the thread, courtesy of CH FR. He was having misery finding a way to have perfect Venetian Blinds when scrolling (using the Offset effect).

Okay I give up, I have no idea on what I should even do now.
I wanted to make improvements on Venetian binds by making it so width and direction snap in such a way that it loops seamlessly when repeated. Got the trigonometry down but now I'm at a loss... pic.twitter.com/8gbC7Qumxm

— CH FR (currently logged off) (@chfr_otomads) July 27, 2020

Scrolling down the thread, MMaker (who would’a guessed?) provided the classic solution using Motion Tiles.

Then I thought, hm, this sure does solve the issue, but it feels like giving in. So there I was trying to find the solution using only Venetian Blinds. Two hours later, I ended up with something.

Explanation (Updated Jan 2021)

In reality the huge equation with tan and absolute values is largely unnecessary. It merely serves as a memento for how I initially solved it. But the explanation can do without so here it is.

The theta I’m using in the video is not the same angle setting in AE, stick to the formulae I have above when you’re actually using it (don’t, use the MMaker method instead).

Note: this equation is not fully simplified, it is merely what I originally found and plotting yields the following implications.

where:
L: Layer width
W: Venetian Blinds width
θ: Venetian Blinds angle
k is in a way, number of stripes present on screen relative from the center, it's kinda hard to explain, so we will graph the equation first.

For:
θ∈]-180°,180°[
L: 1920
W: 270
Horizontal Axis -> k
Vertical Axis -> θ

We only worry about integer values of k because these are the seamless configurations.

Where the k-values intersect the curve in the graph represents configurations with no seam. Every other point on the curve has a seam. It would only be seamless when one stripe ending on one side of the layer has the same vertical/horizontal position as another stripe on the other side of the layer.

As W decreases, possible values of k also increases, this corresponds to being able to have more direction values that don’t have seams with a lower width value.

Rearranging the equation and simplifying yields:

Now k controls the width

It is also possible to arrange the equation the other way around, yielding:

As seen on the graph, this means that for a fixed L and a fixed W, every k will give 4 θ values for θ∈]-180°,180°[.

And indeed for k=3, all 4 values work.

For the record, the Transition Completion percentage has no impact on this and Feather will break it.

If you had been attentive enough, you might have realized there's still a little seam in the middle even using the formulae. This is because the Venetian Blinds effect doesn't process on enough decimal places. So in the end, it is still better to use the classic Motion Tiles method provided by MMaker.

Note: having it offset properly both horizontally and vertically is a lot harder and mostly pointless, since it looks the same way once animated.

4 hours well spent (half of this spent on figuring out LaTeX again).