Thursday, 30 June 2016

New Gradient Engine for Omber

I've been dreading it for a while, but I've come to realize that I couldn't hide from the problem any longer. I was able to produce some great art using Omber, but the underlying gradient engine couldn't produce images with a high enough quality at a fast enough speed for Omber to be usable for real artists. The gradient engine would need to be rewritten.

After many months of looking over the gradients produced by Omber and brainstorming possible fixes, I felt like I was coming closer to a possible solution, but it seemed really tricky to implement. And it was very tricky to implement. I had to pull down pages and pages of computational geometry resources and I had study them and restudy them. Many of the algorithms I needed were missing key implementation details and had delicate behaviors that had to be gently teased and massaged to customize them to my needs. Even when I had the core pieces of the solution put together, I had to spend weeks dealing with brutal corner cases.

But it's done now. I was able to squash a bunch of other performance bugs while I was digging through the code too. The results should speak for themselves. Omber is now super-fast at generating complex gradients. Even when loading in complex drawings for the first time, it can converge to a usable image in only a few seconds. The resulting gradients are not only faster but exhibit much fewer artifacts than the previous algorithm did.

Being a new algorithm, I will likely need a few months to work out all the kinks and learn how to handle its new behavior characteristics. But the new engine is now much more impressive than before. It can generate much higher quality gradients in a fraction of the amount of time needed by the previous engine. It will be a strong base on which I can add some exciting new features.

No comments:

Post a comment