Experimenting with functions to create Brushes

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 !

This entry was posted in Krita, Open Source and tagged , , , . Bookmark the permalink.

2 Responses to Experimenting with functions to create Brushes

  1. Andre says:

    This is really cool! Reminds me of the Graphics experiments I did with the old borland graphics back in the day.

  2. Przemek says:

    It will be nice to have it in sliders to create custom brushes with them, or change others brushes :)

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>