Gimp warp tool: Midterm report

Already the midterm of the Google Summer of Code, and I didn’t post updates like I wanted. I guess thinking and hacking is still more easy and fun for me than writing. However, let’s correct that.

The least I can say is that the warp tool is in better shape than the cage tool the same time last year. The reason is simple, I learned a lot last year, and the warp tool need similar skills, and even reuse some part of the code.

That said, here is the report:

  • All the tool’s infrastructure is here and functional.
  • We can apply stroke and deform the canvas.
  • 7 behaviors are supported for now:
    • moving pixels
    • growing an area
    • shrinking an area
    • swirl clockwise
    • swirl counter-clockwise
    • erasing a transformation
    • local smooth of a transformation
  • Actions on the canvas are done with a round brush, with a gaussian like influence curve.
  • Tool’s options are strength, size and hardness.

A quick screencast:

Each actions on the canvas are implemented as a Gegl operation that produce a relative coordinate buffer, that is inserted in the render graph. The final image is computed with a map-relative render operation.

This is what still need to be handled:

  • Performances need enhancement. For now, for each stroke on the canvas, each operation already computed are re-rendered (cache does not work correctly), and this for the complete surface of the selection (the legagy code wasn’t designed for that). Other areas for improvement exist, such as the implementation of copy on write (COW) for GeglBuffer. The ultimate goal is to perform actions interactively.
  • A good tweaking is needed. For now, behaviors are not consistent.
  • UI implementation, as specified by Peter Sikking and his team.
  • Undo implementation.

As I’m more confident this year, I’m going a bit deeper and I work on related things, especially in Gegl. An interresting thing is that the warp tool is structurally close than a paint core, and is therefore a step closer to a paint core based on Gegl in Gimp.

24 Responses to “Gimp warp tool: Midterm report”

  • chrismonstah:

    really really nice!

  • YAFU:

    I can not wait to try it.
    Thank you very much!

  • Gortim:

    J ai hate de voir ça quand ça sortira. Tu le precises pas mais la brosse on pourra changer le motif ou non ? Ca serait bien pratique pour faire des choses irrégulieres. Et est ce que la qualité de la deformation est meilleur que celle de l iwarp actuel ou pas ? Comme plus on deforme plus la qualite diminue.

    • Michael:

      Pour l’instant, il n’y a pas moyen de changer la forme de la brosse. C’est une brosse completement calculé, pas de motif ou autre.
      Par contre, comme le code derrière est _très_ similaire à un moteur de dessin classique (dans sens pinceau, brosse…), il sera très probablement factorisé avec le futur moteur de dessin basé sur GEGL, et donc profitera des capacités de celui là (motifs pour les brosse, gestion de la pression..). Mais là, c’est un travail bien plus long qu’un summer of code.

      Pour ce qui en est de la qualité de déformation, il n’y a plus de problème de perte d’information. Les pixels ne sont mélangés qu’en toute dernière étape. Par contre, c’est actuellement plus lent …

  • Kevin Brubeck Unhammer:

    You don’t say this explicitly, but is this operation completely non-destructive? It looks that way from the “erase” mode of the tool … (if this really is non-destructive editing, why aren’t you shouting it out? =D)

    • Michael:


      All the developpement based on GEGL are non-destructive editing, high bit depth, and a lot of other cool feature enabled. Gimp is going to roxx a lot in the future.

      • Michael:

        I just realized that i must rephrase a bit. The tool himself is non-destructive and high bit-depth, but GIMP’s internal are not for the moment.

        That mean that as long as your are using the tool, you have this properties, but as soon as you commit the result or swith tool, the result is stored in the tile-manager of GIMP and you lose theses properties.

        But this will be corrected as soon as GIMP swith his internal code to GEGL.

  • Shawn:

    Ok I am disappointed that this will not be in the 2.8 update. This is one of the tools I was hoping for.

  • user:

    completely agree with shawn, I’ve been waiting for so long for this feature.

  • Mariachiara:

    Vorrei sapere,come si scarica GIMP e come si fa lo sfondo colorato perfavore!

  • Mariachiara:


  • Gimped! Gimp tutorials:

    FANTASTIC!!! I cannot WAIT for this feature!!!

  • What hardware did you use for screencast? Yes, I’ve read the part about performance, just interesting :)

  • J’attends avec impatience de pouvoir tester les nouvelles fonctionnalités. Je continue à suivre ton blog !

  • pepe:

    Hi this fuction is esential to allow use gimp as UV maping tool; example adapting a pic of a face to a 3d model. i have tried the photoshop tools for it and i have to say that i fount that they lack of a funtionality that maybe you could bring. the capability of select parts of the layer that will NOT be afected for the warp. Think in it as if you were extending a latex suit over a manequim, in some parts you would like to grab of the latex surface, but in others you would like that remain in the position.
    Photoshop still dont do it perfectly, it would be nice that gimp could do it, the graphical interface to show it could be as pins that you could stick in diferent parts of the layer map. Thanks for this great tool.

  • Bonjour Michael, je ne parviens à trouver un mél valide te concernant. Peux tu me contacter par courriel pour une demande d’interview que j’aimerais te faire pour linuxfr, merci d’avance ! Tu peux effacer ce message après l’avoir lu…

  • Merci Michael!
    J’avoue que tout ça est largement au dessus de mon niveau, mais il y a quand même quelques infos à piocher pour moi.
    Merci encore, bonne continuation.

  • ciekawy:

    What about the feature? Is there any progress?

  • En effet, c’est pas mal. Alors quelle a été la suite du projet ?
    Vous avez participé à d’autres Google Summer of Code ?

  • It is great the perfect time to have plans in the future as well as it time for you to be happy. I have got learn this particular article in case I’ll merely I must advise an individual number of attention-grabbing items or tips. You may can compose up coming posts in regards to this document. I must study more troubles about it!

  • After exploring a number of the blog articles on your blog, I honestly like
    your way of writing a blog. I saved as a favorite it to my bookmark website list and will be checking back soon.
    Take a look at my website as well and let me know
    your opinion.

  • JaKi:

    Any news on this? I’d love to see this in Gimp, the current iwarp has such a bad preview. Gimp deserves an iwarp were you can actually *see* what you do, in sharp details – not just roughly guess where you are in the picture…

    What’s needed to get this into Gimp?