Since a while I have been writing an implementation of the Color Transformation Language (CTL) using llvm, called OpenCTL. Originally I started this effort because AMPAS’s CTL interpreter has a license which is incompatible with GPL (for the most sceptic, read here), but now I have found an other reason, working with llvm is kind of fun.
But back to the point, now that my implementation of CTL is becoming close to be complete, I wanted to have some real-life use of the library. And for this, I choose an use case for which CTL wasn’t intended, but sometimes ago, during a discussion on Krita’s mailing list, someone asked how easy it would be to experiment with various functions for creating brushes. Hence the idea of using CTL to creates brushes !
On this screenshot, the function use creates a gradient:
And for this one I used a cosinus to get a weird effect:
Well of course, if there was to be some sort of CTL-based brushes in a main stream Krita in a closed future, the docker would have to be hidden and the brushes would appear in the brushes selector, the whole thing is just an experimentation.
Did I mentioned that to be usable it needs to be fast ? While the function is compiled into native byte code and is executed really fast, the overhead of the OpenCTL library is so important, that the end result is really slow. But now I have a test case for optimizing the library !