Mirror strokes feature

David REVOY davidrevoy at gmail.com
Sun Oct 17 13:34:16 CEST 2010

> My idea is to mirror the output of the paint op.
> That's clear for Pixel brush. You stroke on the left side of the canvas
> and the right side has mirrored stroke.
My little idea (as an user) for mirror implentation in krita would be to 
use layers to do it.
There is already a "clone layer" button in Krita. Imagine if you could 
use this option to clone your drawing layer, but still apply independant 
basic transformations to this new cloned layer ( the dynamic way ): 
Translation/Grab/Move ,  Mirroring , Rotation ,  Scaling.

This could allow the user to do a mirror ( ex: clone layer > mirror the 
cloned layer on X axis > move the cloned layer ) ; but also 'mandalas' ( 
ex: multiple layers cloned and moved/rotated ) , as well as a lot of 
other possibilities . ( ex: a crowd of poeple , with a lot of characters 
cloned and scaled in a layer group ; paint on one and other are updated 
realtime ).

   In blender you can 'duplicate linked' object, this would be almost 
the same things with layers object and was my inspiration in this case. 
That was just my 2 cents in the brainstorming. I'm also open to all 
other solutions.

( PS : Thanks Lukas for the invitation and links on the mailing-list :)  )


> *LukasT.dev* 
> <mailto:kimageshop%40kde.org?Subject=Mirror%20strokes%20feature&In-Reply-To=>
> /Sun Oct 17 12:51:59 CEST 2010/
> Hello,
> I talked with Cyrille on IRC about mirror strokes feature, part of the 2.4
> feature list.
> The idea is inspired by Alchemy which is used on the DVD Chaos&Evolution.
> "The 'mirror' is for me the only reason why I switch to alchemy." deevad
> I want to implement it as it is hot feature for digital painters. The problem
> is how to implement it.
> My idea is to mirror the output of the paint op.
> That's clear for Pixel brush. You stroke on the left side of the canvas
> and the right side has mirrored stroke.
> Some ASCII art:
> stroke  | ekorts
> is here | ereh si
> But it is complicated for smudge, deform, maybe sketch:
> Should smudge paintop smudge the right side or copy the result of smudging to
> the right side? In the ideal world it could of course, but it's complicated
> when you want to implement it. And it is usable that way? Do you smudge in
> mirror mode? Or it is just nice to have?
> Currently in the first iteration (for 2.4) I plan to implement only mirroring
> of the output and if it will be easy enough or we find some nice solution
> together, I can work on it for 2.4.
> My analysis I did so far
> Where to implement it:
> o KisPainter
> You would have to implement mirroring in every bitBlt method. Some
> paintops need to know which rects has been changed in the layer (currently
> experiment paintop, but I suppose more animated paintops will be there ) so
> every bitBlt should return QVector<QRect>. I and Cyrille, we don't think it is
> nice. I don't like when low-level features like bitBlt knows fancy feature.
> Then bitBlt could be hard to optimize. Similar situation happened to composite
> ops. We solve there feature if the channel is active. When we tried to
> optimize composite ops with MMX/SSE, this feature was standing in the road
> AFAIR.GEGL is not doing that. That's just example why I think this kind of
> features should not be on that level.
> o KisPaintop
> The only drawback I see is that the author of the paintop is responsible for
> the implementation so more work for author of the paintop. There might be some
> code duplication from the beginning til I find some nice pattern in the code.
> Some mirroring (e.g. smudging/deforming both sides) might be complicated.
> Problem is UI, every paintop need to setup mirror axis X and mirror axis Y.
> Maybe freehand tool could have the UI and setup the paintop, but then
> every paintop needs to support mirroring.
> o KisTool(Freehand)?
> Cyrille, here you go and please explain what is your idea?
> I was thinking about creating two paintops in the freehand and mirror the
> input coordinate and give some flag to paintop that it is painting in the
> vertical/horizontal mirror mode so that the mask is mirrored? Drawback might
> be the performance as the paintops does not share some memory stuff that are
> shared in other cases like KisPaintop place. Just my guess what Cyrille might
> thought...
> == CUT HERE ==
> Brainstorm, feedback, constructive critique, creativity welcomed!
> "That's bad, don't do it" without arguments will be ignored ;)
> Mirror feature live in action at ~10:00 in the video
> http://www.youtube.com/watch?v=kGOtGDQ-K-g
> Mirroring implemented for the experimental paintop on the paintop level
> http://imagebin.ca/view/VmEHZT.html
> I will send the patch against trunk later if you are interested.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kimageshop/attachments/20101017/5a647e26/attachment.htm 

More information about the kimageshop mailing list