On Sat, Dec 30, 2023 at 02:24:46PM -0800, Bill Kendrick wrote:
>
> Hi all, and happy new year!
>
> Just a heads-up that some development for the next version of
> Tux Paint has been done, and I've added a set of new drawing
> tools for drawing in 1-Point, 2-Point, and 3-Point perspective,
> as well as adjusting/positioning vanishing points.
Hi again! Over the past few days I added another set of tools,
similar to these (within the same plug-in source file, in fact):
* Isometric
* Dimetric
* Trimetric
* Oblique
These tools, as well as the N-Point Perspective tools, only allow you
to draw lines in certain directions. The perspective tools draw
different angles based on _where_ you draw the line (so for example,
in 1-Point perspective, your diagonal lines might always go
towards/away-from the center). With these tools, where you draw the
line doesn't matter.
For example, the Isometric tool lets you draw vertically (up/down; 90
and 270 degrees), and diagonally at 30 degree, 150 degree, 210 degree,
and 330 degree angles.
The Dimetric tool allows you to adjust the angle; it will be the
same on both sides (mirrored across the vertical axis).
The Trimetric tool allows you to adjust both angles.
The Oblique tool draws both vertically (90 & 270 degrees) and
horizontally (0 & 180 degrees), and at a single angle that you
can adjust.
Similar to the N-Point Perspective modes, when Tux Paint is in
"beginner" complexity mode, the angles of the Di- & Trimetric and
Oblique tool cannot be adjusted. However, similar to how that
mode provides two alternate versions of 3-Point Perspective,
two Oblique tools are made available -- one where the angle goes
45 (& 225) degrees ("up and to the right"), and another where it
goes 135 (and 315) degrees ("up and to the left").
Here are some example screenshots:
* Isometric
https://tuxpaint.org/latest/sshots/tuxpaint-0.9.32-iso-draw.png
https://sourceforge.net/p/tuxpaint/tuxpaint/ci/master/tree/docs/html/images/magic_examples/isometric_line.png
* Dimetric
https://sourceforge.net/p/tuxpaint/tuxpaint/ci/master/tree/docs/html/images/magic_examples/dimetric_draw.png
* Trimetric
https://tuxpaint.org/latest/sshots/tuxpaint-0.9.32-tri-draw.png
https://sourceforge.net/p/tuxpaint/tuxpaint/ci/master/tree/docs/html/images/magic_examples/trimetric_draw.png
* Oblique
https://tuxpaint.org/latest/sshots/tuxpaint-0.9.32-oblique-draw.png
https://sourceforge.net/p/tuxpaint/tuxpaint/ci/master/tree/docs/html/images/magic_examples/oblique_draw.png
All of these tools make heavy and constant use of trionometric
functions (COS(), SIN(), and ATAN2()), and I noticed they were a bit
slow on my Google Pixel 7 Android phone when I tried out a test build
Pere made (for other reasons).
I began looking into how to address performance issues in this
plugin, but I didn't get very far. I wonder how much of it is
general slowness of certain operations in Tux Paint (e.g., XOR'ing
pixels while clicking/dragging these tools -- they offer helpful
guides so you can line things up). I'd appreciate any help in this
department, as I'm be a bit burnt out now. :-D
Additionally, the tools would benefit from a grid-snapping feature,
which would help ensure things line up well (at the cost of some
fine positioning -- I feel if you're at that level of expertise
it might be time to switch to Krita or GIMP ;-) ).
However, in the dark and cold middle of the night, I threw a virtual
10x10 pixel grid on the canvas, by doing this to all mouse positions:
x = (x / 10) * 10;
y = (y / 10) * 10;
...but that was hilariously naive. While it's great for lining up
vertical and horizontal lines, these tools are all about helping you
draw diagonal lines. So the grids would need to be aware of the
valid angles!
e.g., sure I could lock to 10-pixel grid horizontally, but in
doing so my vertical grid would need to be based on the possible
angle(s) -- e.g., 30 degrees in Isometric, 45 (or user's choice)
in Dimetric and Oblique, 30 and 15 (or user's choices) in Trimetric.
My brain is done doing math, for the moment. I might just open
up a set of tickets for these issues, and punt them to a future
release. ;)
Speaking of which, I think it might be time for a new release soon!
I've added 9 new magic tools (not counting the various vanishing
point and angle editors for the ones noted in this thread).
I've already drafted the press release, and I THINK everything
else is in good order... (My efforts to reduce the size of
some sound files in the Stamps collection was able to shave
off 100MB, or about 40%(!), from the size of the Android APK
when it includes both TP & Stamps!)
Whew!
-bill!
|