It all started when a friend showed me some videos he shot in Bordeaux using a “technique” used by director Bruno Aveillan. He purchased “Close-up Macro lenses” supposed to be fixed on the lens to reduce its focus distance (and thus approach a macro lens). However, he didn’t used them as such, he cleared the lenses of their metal ring and placed these pieces of glass with particular optical properties in front, on the sides, against his lens.
And the result was really interesting. Visually.
This simple lens in front of the main lens brought so much to the image. It changed the depth of field, the focal length, added flares, reflections. The aesthetic of a shot was all shuffled, and the direction also. Each lens following its diopter, its shape, its coating, the incident light altered the image differently. This opened up an infinite field of possibility!
I also noticed that these visual effects became popular, the TV series becoming more and more cinematographic, we regularly found such optical effects: the dreamlike sequences of Vikings, the credits of True Detective, … Also in advertising, or moods. People liked to play with the image, “twist” it, these “optical glitches” pleased.
After purchased close-up lenses and having made my own experiments, I quickly came to a conclusion: this is all good and well, but it is very hazardous. In the particular case of the close-up macro lens in front of the main lens, the visual rendering depends on so many factors that it is difficult to anticipate. And so we often find ourselves orienting, positioning the lens in all directions to realize that no, this plan, in this configuration (camera orientation, light) gives nothing terrible with the diopter. Heck.
This is where I thought it would be interesting to better control this effect, and what more controllable than a post-production effect? I started on After Effects, I analyzed videos with those lenses to try to better understand what is happening visually and I came to convincing and interesting results!
Okay. I have something cool but it’s a shame because it remains a blight to animate as is with all the expressions and the different layers. A script would not work because it would not apply to a layer but a plugin…
It would be really cool… And much more convenient !
Mmmmmh… But I know nothing about it and it must be expensive, right? And is it really worth it to get engaged in it?
… (I imagine for a brief moment the list of effects of AE, my plugin is there)
Diopter was born
Well. No. Almost. The fetus was there, lodged somewhere between my neurons, my hopes and my ambitions. In short, this is Diopter :
patience, stress, doubt but ultimately and above all, pleasure
What follows draws roughly all my adventures in the elaboration of Diopter. I don’t know if it will interest someone but in my case, I think I would have liked to have such a summary of experience at the time. I’ve been looking for a “How to create its own plugin on AE” tutorial on the Internet, I didn’t found anything really relevant ^^. Let’s go :
STEP 1: How do we make a plugin for AE?
Of course it’s code, you know the mysterious and magical thing of our time, but which one and who can do it? Response through the ADOBE After Effects Development Center.
AE has its own development software (SDK) to help developers create new tools compatible with AE.
The code language used for plugins is: C / C ++
For such a project, I had neither the time nor the motivation to learn a new programming language. But, if you pay for the services of a provider …
Be aware that there are other “simplified” development software to create plugins! However they still require programming knowledge or can’t do advanced stuff.
STEP 2: Find a Programmer
Programmers, there are lots of them, but plugin programmers for After Effects or simply from ADOBE product familiar with the SDK, well there are … Not as much. At least according to my Internet researches.
Finding a plugin programmer is not the same as finding a graphic designer or craftsman. The big plugin companies make their own plugins and do not offer their service, the same for the few single people who have created them. I however found a company in India visibly specialized in the Adobe collections. They put forward their attractive price and skills. So I asked for a quote, specifying the function of my plugin and a detailed description of the interface.
$ 20 000. For 1 month of work.
I completely had a change of heart and moved to Freelancers. I discovered the site Freelancer.com which in addition to being simple and well done, had many programmers of all fields. I had nothing to lose to leave an offer and see who would respond.
At that time, I wasn’t ready to put more than $1000 in this adventure. So I posted an offer at $750. Every programmers ( who never worked on an ADOBE product before), ensured they could do my project.
A moment of thoughts … On one hand, I have a proposal at $20,000 and on the other at $750 and at the end my plugin programmed. Mmmh … Who to believe? I decided to split the difference and doubled my budget and reposted the offer for a price of $1900.
Finally a Chinese programmer (more of a group) replied and his profile mentioned he has already worked on a plugin for Photoshop! Better than nothing !
Well, always the same self-confident speech about accomplishing my project, but hey, I guess that’s the game on Freelancer.com to be chosen.
Ok… IT’S ON.
STEP 3 : The quest begins
Then began the longest phase of the whole process : programming (obviously) AND understanding. Because between a Chinese and a French both speaking on very precise matters as such this effect acting in such a way on the image, the layer, the composition … Well we can easily end up in a dead end.
That’s why, very quickly, I set up 3 simple rules in our exchanges:
- Always stay precise and concise, get to the point. Stay polite but direct.
- A picture is worth a thousand words, a screen recording 100 pictures, an AE project 10 screen recordings. Always illustrate the problem or point by an image, even the simplest things in order to avoid almost any problem of understanding. We put in bold, we use a color code, we underline, we put arrows, we highlight … In short, we spend time on every feedback, even the most insignificant. The remote control of the PC can be useful in some cases.
- Patience. I remain very, very patient. A freelancer certainly takes several jobs at the same time and sometimes the pace of work on your project is slowed down. It’s the game, you just have to regularly take some news of the progress and set up deadlines.
The concept of Freelancer.com may seem tricky. The freelancer responds to an offer from an employer, the employer chooses the freelancer. The freelancer gets a down payment (optional), and starts working. But they never see each other and have no real way of knowing the intentions, the involvement of the other. A freelancer can take several days to answer his employer and vice versa, each wasting the other’s time and possibly money. And don’t forget the 6 hours of time difference…
I am not going to describe all the adventures of almost one year of development. I will summarize them briefly:
First of all I provide the freelancer with a detailed PDF of the function and the UI of my plugin as well as an AE project illustrating its capabilities.
Before having a first version of the functional plugin (one that actually works in After Effects) at least 15 versions came out. AE didn’t load those versions. One reason could be because I didn’t empty the cache before I tried them. So before each version, I had this ritual to copy and paste the plugin, clear the AE cache and restart the computer. In order to be sure that there are no calculations of the old version remaining.
The versions kept coming out, sometimes there were simple problems and other times … they were more complicated: Bugs that visibly were not reproducible, occuring randomly, effects that under certain circumstances and only in combination with other effects were deactivated, certain values of some parameters also bugged the plugin, and sometimes only my machine had these problems… *CODE MAGIC*
As versions kept coming out, I also changed some settings and added others. That’s why my budget went from $1900 to $2415.
Finally a stable version arrived (the V75 I think) and so the compatibility tests and optimization began (Originally the plugin had to be available on CS4 but for the sake of time saving I decided to abandon this version). So here I am spending long hours trying in all possible ways the plugin on the trial versions of AE CS5, CS5, CS6, CC 2015, CC 2017 Mac and PC … To save time I Created a typical project with a check routine.
Once this long step was over, I added a little money to optimize a bit more the rendering speed and especially the Realistic Blur. This optimization reaches the limits of the knowledge (or motivation?) of my freelancer because although the plugin was slightly faster, it was not enough for my liking, my programmer assuring me that he had done everything he could.
Before I sent the last payment to the freelancer, I had this Beta version tested to the few people around me who knew how to work with AE, I even created a Google survey (in vain because nobody answered u_u ‘). Once the last tweaks were done, the plugin was ready.
STEP 4: “Communication” and documents
Once the plugin was finished, I wrote the user manual, created a page on my site, presets to help the user take control of the plugin, shot footage, edited the “tutorials” videos, wrote the English voiceover and recorded it on Fiverr ($30) wrote this article, translated it also on Fiverr ($20) and created my author account on AEScripts.com, the site where I sell my plugin.
For the price, the administrator of AEScripts advised me to sell it for $40. I must confess that for me, Diopter is not perfect, there are still so many things that I would like to improve or add. So I could not see myself selling it at such an expensive price. And then I figured that selling it at a small price would help sell it, so to make it known, and maybe to meet people interested to help me perfect it or even invest in it! So I was setting the price of Diopter at $ 15 to make a $ 10 margin after the AEScripts commission.
STEP 5 : End and beginning?
As I write these lines, I wander how users will welcome Diopter, if people will buy it (they must hear about it first, is the promotion on AEScripts enough ?). If people will like it and spend time on it. I would know it soon enough.
In any case, it has been a very rewarding experience on many points and I am proud of this plugin that I can, as dreamed 2 years ago, see in the effects list of my After Effects…
Do you think it’s over and I lived happily ever after?
Because right after completing this stable and functional version of Diopter, I sent it to aescripts.com (the site selling scripts and plugins for After Effects). A few days later, they replied that Diopter was too slow and not optimized enough.
SO they couldn’t sell it on their site..
SO I had done all this for nothing. (sell it by myself would be significantly less effective, then I would have to create a product page on my site, etc)
SO the game was over …
* Heavy sigh, head in both hands *
Why is it so slow ?! Come on, it must be possible to make it faster, to match the standards of aescripts.com! (Which are otherwise entirely justified)
And that’s where the guys at aescripts.com were brilliant (Lloyd Alvarez and Tobias Fleischer), although I was completely new, they took the time to analyze, summarize and explain what can be done to improve Diopter. But really, I do not know what I would have done without them!
Here are some improvements:
– SEPARATE AE AND PLUGIN SDK FILES (they were visibly mixed) This allows you to upgrade the plugin even if the AE SDK is updated.
– PRIVILEGING ALGORITHMS THAT USE THE MULTI-THREADING to increase speed of calculation.
– RENDER A PIXEL ONE TIME. In its old version, each Diopter effect calculated the same pixel in turn, whereas this calculation could have been simplified by rendering a single pixel with all the effects one time.
– OPTIMIZE THE ALGORITHMS, obviously. One way to do this is to avoid conditional expressions (if) as much as possible.
And here is a comment from the software engineer of aescripts.com, Tobias Fleischer, which in my opinion sums up rather well the coding of a plugin:
” That is unfortunately a common problem with development of a bit more complex designs/algorithms: design it nicely and in a clean way – expect it to get slow exponentially. Make it fast by optimizing the hell out of it, and you end up with messy code that is hard to debug and understand. Most developers face and realize this at some point and ideally find a compromise between these two extremes. And often that gets into “black magic” territory quite fast 🙂 “
Okay. $ 700 and 1 month later, the plugin was optimized and aescripts.com validated it!
THINK ONE MORE TIME AGAIN!
Each plugin on aescripts.com integrates the aescripts.com licensing framework … I thought that I could avoid it but in fact no … To tell the truth, I didn’t want to protect Diopter. As said before, I made Diopter more for the challenge and fun than for the money, so I wanted to leave it easily “shareable” while recovering a bit of my money. But OK. Not possible. And integrating the license system would again cost me money and time …
The icing on the cake was, to make this simple integration (which is supposed to take nothing more than a day) my freelancer took me minimum $ 470. He didn’t take a job underneath … Oh no … I saw myself already posting another job on freelancer.com, finding a new coder more or less competent to do this little job explaining everything again…
* slightly lighter sigh but still head in both hands *
Suddenly miracle occurred : I asked Tobias, the software engineer of aescripts.com (he made the licensing framework) if he could do it and at what price. And against all odds he accepted!
But he didn’t only integrate the system, but it made a looooot of file structure cleanup to make it way more understandable and futureproof than it was, he made it compatible with 16 and 32 bits and he rewrote the code of the renderer to prevent it from crashing! Crazy! A Christmas miracle! A $ 235 miracle but a miracle anyway !!
This was it, FINALLY. Diopter was ready. Aescripts.com put it for sale.
Well. Not at the price I wanted. I was told that $ 15 was too cheap. Rather $ 50 – $ 80! Due to credibility issue, technical assistance if Diopter need to be updated and financial issue. I managed to drop to $ 40 with a launch price of $ 20 for a few weeks. Aescripts.com has a say on the sale price.
Here is the same previous report but updated:
patience, stress, doubt but ultimately and above all, fun
It was a great ride and I am proud to have completed it. I hope Diopter will please you. Of course it can be improved, optimized but I did the best I could with what I had, I learned a lot, and if you like it, there will certainly be other versions 😉
Thank you for reading these lines, and if you buy Diopter,
I hope you like it!
I am not a specialist in the plugin creation, however, do not hesitate to ask me your questions!