Symmetry Painting #208

Closed
aseprite-bot opened this Issue Aug 20, 2014 · 8 comments

Comments

Projects
None yet
2 participants

From arekusan...@gmail.com on February 12, 2013 13:38:26

What do you need to do? Implement symmetry tool for pencil.

Symmetry painting like in ProMotion. It's quite easy to implement. I can make you a C++ class if you need it. :)

Original issue: http://code.google.com/p/aseprite/issues/detail?id=208

aseprite-bot added this to the v1.0 milestone Aug 20, 2014

From davidcapello on February 12, 2013 09:19:34

Well, it would be great if only one C++ class is needed, but there are several things that must be done for a symmetry painting mode:

  1. This drawing mode modifies the geometry, not colors (as blur/transparency/inks). So this is a new concept. A drawing tool should support special modes with customized "regions of modified pixels". E.g. tiled drawing mode is integrated to inks (PointShape::doInkHline) in master branch (as a rectangle) and now is integrated to ToolLoopManager::calculateDirtyArea() in my local dev branch (as a real gfx::Region, not yet pushed to upstream). Anyway this will not be enough for a symmetry painting mode, we should think a little more about the design/interfaces of this kind stuff (the communication between Editor <-> ToolLoopManager <-> ToolLoop).
  2. UI settings for the tool: the drawing mode on/off checkbox and a way to specify the axis/locations of the symmetry (which I whink will be a special EditorState, like SelectBoxState).
  3. The logic to create the symmetry of the shape (which I think is the "simple part") and the modified region to refresh all editors in real-time.

I don't know why you say "it's quite easy to implement". If you have some idea to do it in a simple way (as a fully functional feature completely integrated to current aseprite UI/design) I would love to hear about it.

Owner: davidcapello

From arekusan...@gmail.com on February 12, 2013 12:00:36

When I said one class I meant just one class for calculating symmetry points which could easily be incorporated with a pencil tool. I guess I made a mistake since you would need to add UI configuration for symmetry too which would result in more stuff being added since you have 2 types for symmetry painting: circular and mirror mode :)

When it comes to actual drawing on canvas, only thing you would need to modify modify is pixel placement. Let's say you have one pixel position on the screen with X1 and Y1 coordinates. You input those coordinates into symmetry class and it returns an array of X and Y coordinates for mirror/circular reflection points. The only thing which is tricky is when drawing with wider brush (but if you just use pencil method which draws on X, Y for each coordinate I don't think it should be a problem).

Technically speaking you can do even more by implementing drawing mirrored ellipses just by sending X and Y coordinates of each part of Ellipse Rect into symmetry class.

I don't know if you are skilled in Free Pascal Language since I already made a class like that so you can see what I'm talking about :) https://code.google.com/p/pixeller/source/browse/trunk/PixellerLazarus/symmetry.pas There is also a C# version of the class (if that would be more understandable): https://code.google.com/p/pixeller/source/browse/trunk/Pixeller/Pixeller/Tools/Symmetry.cs I made a C++ class file with an example but haven't tested it with real pixel drawing so I'm not sure if it works completely like the pascal version. I guess it could be optimized a bit too, but I'm not that good with C++.

Attachment: SymmetryCpp.zip

From arekusan...@gmail.com on February 12, 2013 12:43:02

Here is C# painting version as proof. :D

It only draws a pixel or a line of width 1 when mousedown + mousemove event is executed. You can set number of axes and type of symmetry. I set it to max of 360 because I don't see any point of making it bigger.

Attachment: SymmetryTest.zip

From davidcapello on February 13, 2013 13:57:01

Thanks for the code Aleksandar! I'll put this for 1.0 (next to 0.9).

Status: Accepted
Labels: -Priority-Medium Priority-Low Milestone-1.0

From davidcapello on November 21, 2013 07:00:30

Labels: -Milestone-1.0

From DocHoncho@gmail.com on November 21, 2013 21:45:43

Issue #252 has been merged into this issue.

From davidcapello on June 26, 2014 19:41:53

Labels: Milestone-1.0

@dacap dacap modified the milestone: v1.3, v1.0 Aug 31, 2014

dacap self-assigned this Sep 26, 2015

@dacap dacap modified the milestone: v1.1, v1.3 Sep 26, 2015

Owner

dacap commented Sep 26, 2015

There are too much people requesting this feature so I'll try to implement it for v1.1.

dacap removed the low priority label Oct 20, 2015

dacap closed this in 56854cd Oct 26, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment