Winner of the Adobe Digital Edge Awards 2023 in Engineering, Pattern is an Adobe After Effects plugin that creates Islamic star pattern-style animations using Hankin's polygons-in-contact algorithm. Colors for animations are generated from a dataset of images (illustrated by professional artists at Kurzgesagt) through k-means clustering. This plugin's algorithm is inspired by the techniques proposed in the University of Waterloo's research paper "Islamic Star Patterns from Polygons in Contact" by Craig S. Kaplan (https://dl.acm.org/doi/pdf/10.5555/1089508.1089538).
See LICENSE.md for license details. Watch Pattern in action: https://youtu.be/4MxbwQsuseU
Brief explanation of how Pattern's algorithm works: https://artsengine.engin.umich.edu/science_as_art/pattern/
-
Follow this tutorial to set up the After Effects SDK files on Visual Studio: https://www.youtube.com/watch?v=gilpHirsXQA
Make sure to rename everything to "Pattern". In PatterPiPL.r, change the category to "Motion Graphics Plugins" before compiling.
-
Follow this tutorial to link your project to the Cairo graphics library: https://www.youtube.com/watch?v=oAVWwBA2K0U
Everything you need is in the "cairo" folder of this repository.
-
Copy the cairo.dll file from the cairo folder of this repository to the "Support files" folder of where Adobe After Effects is installed in your computer (C:\Program Files\Adobe\Adobe After Effects 2021\Support Files).
-
Install OpenCV 3.4.15 from this link: https://opencv.org/releases/. Extract it to a folder you prefer. I recommend your D drive.
Refer to "option 1" in this tutorial if you need any help along the way: https://www.youtube.com/watch?v=eDGSkdeV8YI
-
Create a new project in Visual Studio, choose Static Library (.lib) in C++, and place it in the same folder as Pattern. Name it "Color".
-
Make sure to change the configuration of the static library project to x64 from x86:
-
Link OpenCV to your static library by adding the path to "include" and "lib" in your OpenCV folder under "Include Directories" and "Library Directories" of this project:
-
Now add the code from Color.h and Color.cpp to the Color static library.
-
Download the Image Dataset from this link: https://www.kaggle.com/nithishakumar/pattern-plugin-image-dataset and place it in the same folder as the Pattern plugin. DO NOT RENAME ANY OF THE IMAGES!
-
Copy the path to the ImageDataset and assign this value to the path string in Color.cpp:
-
Link OpenCV to your Pattern plugin by adding the same paths to "include" and "lib" in the OpenCV folder under "Include Directories" and "Library Directories" of your Pattern project.
-
Include the path to your Color static library folder under "Include Directories" in Pattern.
-
Include the path to color static library folder << x64 << Debug under "Library Directories" in Pattern.
-
Under Linker << Input << Additional Dependencies, add Color.lib and opencv_world3415d.lib to Pattern:
-
Replace the code in Pattern.cpp and Pattern.h to the one from this repository.
-
Add Draw.h, Draw.cpp, Draw_Tiling.cpp to Pattern.sln.
-
Run Visual Studio as administrator and build the plugin by clicking on "Local Windows Debugger". You can find the plugin at Effect << Motion Graphics Plugins.