[2D painting application] Animatoon

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
User avatar
[blendman]
Enthusiast
Enthusiast
Posts: 297
Joined: Thu Apr 07, 2011 1:14 pm
Location: 3 arks
Contact:

[2D painting application] Animatoon

Post by [blendman] »

Hi

Update : June 2021 (version 0.5.9.8).

Animatoon is open-source since 2017, I have send the source on github (zip and raw files):

Sources :
https://github.com/blendman/animatoon


Old Sources :
https://github.com/blendman/Purebasic/t ... /animatoon

Videos

https://www.youtube.com/watch?v=5iDwApsKkZM


Last pictures I have made with animatoon (colors, and in some case the line) :

2021 :
Image

Image

Image

Image

Image

Image

Image




Old message (20 june 2015) :
In 2011, I have developed a painting application. I have stoped it because the framerate and the lag with canvas/image wasn't good to work with this application.
In 2015, I have made some new tests to see if I could continue to improve my application :
- Canvas + image with Tiles : not so bad
- Screen+ sprite (for th the real time) + images : very good

With the second technic (screen+sprite+Images), I have a really good framerate ! I can paint on 2000*2000 with 20 layers without lag ! It's fluid and cool, yeah :D.
So, the 29th may 2015, I have totally recode my application, from beginning ^^ (I've taken some codes/procedures from my old code of course).


Description
Animatoon is a software for drawing and digital painting (made in purebasic). The goal is to provide to the users somes tools for simulating the traditional painting tools (ink, watercolor, pencil, felt pen, charcoals, brush and more ...), and some editing features.

Actual Version (with screen) : 0.30 (20th june 2015)
The actual features :
- Open (doc(animatoon format (old, new), image (png, jpg, bmp)), save (doc(*.ani), image (png, jpg,bmp), export (all layer in png/zip, selected layer).
- Brush engine : size (max, min, random), size width & heigth, pressure size, alpha, pressure alpha, random alpha, scatter, rotation, random rotation, rotation in function of the angle, color mixing (3 modes of mix : classic, old, ), viscosity of the color, wash, hardness & softness of the brush, smooth, intensity (more or less dark), pas (space between two dots), stroke, change image.
- Colormix option : all layer under, only the current layer, all layers
- Tools : Brush, Eraser, move layer (mouse + arrow), scale layer, Rectangle Selection, clear layer.
- Canvas : pan, zoom.
- View : zoom (50,100,200,300,400,500%), reset view, center View.
- Layers : add, delete, change position (up, down), merge with bottom, merge all, duplicate, view, lock, lock alpha (keep transparency), name, miror (horizontal/vertical), some blendmode (normal, add, multiply, screen, clearlight)
- Edit : cut, copy, paste, Fill (with BG color, with pattern, with color only alpha)
- Image : resize document, resize canvas, crop, adjustement (inverse color, desaturate)


Screenshots

version 0.29 :
Image
Line is a scan (made by me), colors in animatoon.

Video

V 0.255
https://www.youtube.com/watch?v=deYI2myO3Ak


Images made with animatoon (new version)

v0.29
Image

v0.28
Image

V 0.26 (start in 0.20, colors in 0.26)
Image
In bigger : http://www.dracaena-studio.com/animatoo ... julius.jpg

V 0.256
Image

v 0.255
Image

v0.24 (new : symetry)
Image

v0.23
Image

V 0.20
Image


Download
No version to test for the moment. The old version aren't no more available.
More information on my patreon (https://www.patreon.com/animatoon?ty=h)


Thanks
- A big Thank you to Fred, and the PB team developper for the purebasic which is so great :).
- A big thanks to Danilo for the Tablet Pressure Code !

A big thank you to some French Users (french forum) :
- G-rom, Dobro, LSI (le sodat inconnu), Falsam, Kernadec, Kwanjeen, Attomo, Djes and all those who contributed directly or indirectly or help.

English Forum :
- Idle, ApplePy, Infratec, Netmaestro, BasicalyPure, Syntax Error, Rashad, and a lot of other guys !


***************** Old message - [Old canvas version] (2011-2012) ******************
I'm developping a little application for painting in 2D.

Description
Animatoon is a software for drawing and digital painting (made in purebasic). The goal is to provide to the users somes tools for simulating the traditional painting tools (ink, watercolor, pencil, felt pen, charcoals, brush and more ...), and some editing features.

Actual Version : 0.29

Screenshots
version 0.151 :
http://www.dracaena-studio.com/animatoo ... n0.151.jpg

Viscosity (the painting stay on the brus a few and mix with color less quickly) :
Image

Watercolor (the colors blend together, based on a percentage. If it's zéro, it's like adding water on the painting)
Image

Features
All is not yet available:)

1. Interfaces
started but not completed:
- Menu> started: open / save a document animatoon. OK: import an image on a layer (jpg, png, bmp, tiff, tga), export to jpg, png.
- Tabs with splitter : not finished > Editor brush, swatches, options, layers, channels (if I can), brush presets...
- Canvas area and gadgets (not finished) / Add the zoom on the canvas, and the "pan" by hand
- Color Picker (ok, but to review) : see the color picker

2. Tools
Started :
- Painting tools (watercolor, viscosity, ink ...)
- picker : take the color is on the roughboard (left click), either directly on the canvas (ctrl + left click)

In reflexion :
- Painting tools: pencil, charcoal, pen, marker, ink brush ...

Not Started:
- Drawing tools (line, "smooth" line, speedline ..), patterns, Paint, "Spay" and pen tools, "Shapes" (type shapes round, square, etc. ..), Addition of water, water drop, Gum

3. Tools Settings
Ok :
- Change the size, rotation, transparency, width and height of the brush, mix, viscosity, size minimum
- Add random : size, rotation
- watercolor mode (to be reviewed a little)

Not Started:
- Random vs. pressure, random_vs_time (the "paint fades slowly), Change the space of the brush (PAS), brush with "line"

4. Layers:
Started but not finished (only the interface)
- Create and delete layer, Option (opacity view, blocked ..), Blending mode, Simple filters (code ok : blur, pixelisation (LSI)), Adjustment layer (> code OK (some are by LSI) : light, contraste, color balance, saturation)

5. Edition (simple editing functions):
Not finished :
- Clear the canvas

Not started at all :
- Copy / paste, Undo / redo (if I can), Resize an image, a layer

Langage
For the moment, the langage are :
- English, French

Note : The langage files are in the directory : text\lang\ (fr.ini and eng.ini)

Thanks
- A big Thank you to Fred, and the PB team developper for the purebasic which is so great :)

A big thank you to some French Users (french forum) :
- Kernadec, Kwanjeen, G-rom, LSI (le sodat inconnu), Dobro, Attomo, Djes, Falsam, and all those who contributed directly or indirectly or help, and all those who contribute or contribute directly or indirectly

English Forum :
- thanks to Netmaestro, Syntax Error, Rashad,
Last edited by [blendman] on Mon Jun 07, 2021 8:57 am, edited 6 times in total.
User avatar
[blendman]
Enthusiast
Enthusiast
Posts: 297
Joined: Thu Apr 07, 2011 1:14 pm
Location: 3 arks
Contact:

Re: [2D painting application] Animatoon

Post by [blendman] »

Hi

Here is a new version : Animatoon 0.156

Screenshots
Image

News
- the layers are active : you can create a layer and draw on it, make it visible or not, you can lock a layer (right click), change its opacity (you can not change its position for the moment, but I'm working on that :) )
- New tools: gums (circular and "shaped" brush) (menu > tools/eraser)
- shortcut : key "E" (circular brush), paint brush is key "B"
- Edit menu: Ctrl + X deletes now the active layer
- Export: you can export the full image (visible layers) in png (with transparency) and jpg, and then export only the active layer in png (transparent)
- Import: now, when importing an image (a png for example), this image is loaded on the active layer
- The "pipette" (color select) was not working, It's ok now : ctrl+left click on the canvas to take the color
- Canvas: I added a border, depending on the size of the document to center the canvas
- panel >Tab "gen" (general) : most checkbox works now. The checkbox disables the mix (blend of painting) (but I have to correct it to reverse that:))
- when we exit the soft, I save now (in the preference file : options.ini) : width / height of the brush, if the checkbox is checked mix and other things
- Bug fixes and some optimization

For now, it's not optimized at all, so beyond a 1500 * 1500 pixels document and with more than 3 or 4 layers, it "lag" a lot.

Note and Todolist
Brushes :
- preset brushes and bank of preset brushes : watercolor, charcoals, crayon, ink, markers...
- brush with line between the "points"

And in general UI :
- a better select color
- zooming, pan
- saving /opening the document with the layers : For now, to change the size of the document, you must change the file options.ini (doc_W and doc_H), it's temporary, I'll change that soon.

Layers :
- The blendmode will not be long to come (multiply and add for now is ok, but I have a problem with overlay*: When I delete the alpha channel of a layer, the color of the layer isn't eraser or is in black (it's logical). I have to find how to make the layer transparent really, because the overlay mode is based on gray levels. So I have to create an overlay technic that "takes into account" the alpha > 0, not only the color.
- move the layer position


Optimization

1. Changing brushes
For the effects of the brushes for dynamic, I do an update to each loop, and I re-create several times the brush (point(), alpha() and plot() is great but not "quick", if we use it a lot at each loop :)).

Since there is an incompatibility between the openscreen() or openwindowedscreen() and graphics tablets, I can not use the screen and sprites3D :( What a pity, because drawing on the screen with 3D sprites will be really quick !

But against, I thought I could do the operations (dynamic changing of the brushes (size, rotation) on a screen located in -WindowHeight(0) and then copy the sprite image created to my brush.
I think gaining a little speed, I will do tests to see if it works.

2. Layers, image and canvas.
I would like to optimize it all, especially the display of the layers, but I don't know how exactly.
I have some ideas in mind, and I hope to successfully implement them :).

For now, here's how I do it:
- First I draw a picture (my current layer)
- Then I update the canvas by drawing all the layers above the current layer + changed with this code:

Code: Select all

StartDrawing (CanvasOutput (# canvas))
DrawingMode (# PB_2DDrawing_Default)
  Box (0.0, doc_w, doc_h, RGBA (255,255,255,255))
  If backgroundCanvas = 1 if has background in the background, for example, a checkker to paint or paper)
    DrawImage (ImageID (# canvasBG), 0.0)
  EndIf
And then I draw each layer
  DrawingMode (# PB_2DDrawing_AlphaBlend)
  Layers ForEach (); the list of my layers
    If layers () \ = 1 and visible layers () \ opacity> 0
      DrawAlphaImage (ImageID (layers () \ id), 0.0, layers () \ opacity)
    EndIf
  Next
  StopDrawing ()
As I make an update on each loop, necessarily, that a train with 2000 * 2000 image with 5 layers: (.
It'll be faster to draw directly on the canvas but the canvas TPAS're "multi-layer" or transparent).

If I did not blendmode, it would be easier to optimize :
- I will create three image s: top, current layer and bottom. Top : an image is created for all layers located above the current layer, and ditto for below.
- I will do only the "update" of the current layer when I draw on this layer. Then I will make a final update to the canvas with these three images (instead of all my layers.) It's like if I had never more than three layers for my document.
- The two other "layers" would be recalculated when I change a parameter of the other layer (on the panel tab layer) or I will change the current layer for example.
- But I can "merge" (on an image) the layers above and below the current layer with a "normal" mode, not with another blendmode, because the effects of blendmode of each layer are calculated in real time on all layers. So this idea doesn't work anymore with blendmode.

So, I think putting an option to update the other layers as current, to an update based on a loop connected to a timer (the options:)).

But I would like to especially provide work only on the pixels on the screen for the layer of these effects blendmmode.

If you have ideas for the optimization of this sort of software, you're welcome :)

Thank you.
Last edited by [blendman] on Sat Jun 20, 2015 9:14 am, edited 2 times in total.
eesau
Enthusiast
Enthusiast
Posts: 589
Joined: Fri Apr 27, 2007 12:38 pm
Location: Finland

Re: [2D painting application] Animatoon

Post by eesau »

I don't have any suggestions right now but this looks great and works pretty well. I was able to make some really nice watercolour-y drawings in just a few minutes! Well done :)
User avatar
[blendman]
Enthusiast
Enthusiast
Posts: 297
Joined: Thu Apr 07, 2011 1:14 pm
Location: 3 arks
Contact:

Re: [2D painting application] Animatoon

Post by [blendman] »

eesau wrote:I don't have any suggestions right now but this looks great and works pretty well. I was able to make some really nice watercolour-y drawings in just a few minutes! Well done :)
Thank you ;)

It was my first goal : to simulate the water color effect painting, because I'm a water color drawer. I use it a lot on my traditionnal drawing and comics.

For a next release, I will add, if I can :
- papers : to draw not only on a white surface, but with paper background
- water effect : I don't knwo how I would do that but I would like to propose a system for adding water on the layer, and the color would be diluted/washed with the water.
User avatar
[blendman]
Enthusiast
Enthusiast
Posts: 297
Joined: Thu Apr 07, 2011 1:14 pm
Location: 3 arks
Contact:

Re: [2D painting application] Animatoon

Post by [blendman] »

Hi

Here is a new version of animatoon

The news

Interface
- Improving the interface and adding animation (keyframes addition, changes in the timeline)
- New window animation properties, with few options

Painting
- new options for the paiting (time fall-off, random rotation, size..)

Animation
- new animation système (not finish at all).For now, we can just make animations tests, but there are some bugs and limitations. In fact, the system isn't good, because each frame adds a layer (instead of adding an image)
- The timeline works (change the length of the animation, position the frame, etc. ..)
- Playback of the animation (preview) functions and the buttons associated with the animation (play, stop, loop ..)
- Addition of animation layers (not completed and not functional): normal, object, camera, light, background, particles.
We can currently only test on a single layer of animation (as others are not really active, it is for now, just to test the interface)

Screenshot
Image

If you want to help me improving this application (zoom for example), I can send you the code ;).

Thank you.
Last edited by [blendman] on Sat Jun 20, 2015 9:15 am, edited 2 times in total.
jamirokwai
Enthusiast
Enthusiast
Posts: 771
Joined: Tue May 20, 2008 2:12 am
Location: Cologne, Germany
Contact:

Re: [2D painting application] Animatoon

Post by jamirokwai »

[blendman] wrote:Hi

Here is a new version of animatoon
http://dracaena-studio.com/animatoon/do ... 82_win.zip
Wow, looks great and promising.
If you need someone to compile and/or test a Mac-version, you can contact me.
I may also translate to German, if you like!
Regards,
JamiroKwai
marc_256
Enthusiast
Enthusiast
Posts: 735
Joined: Thu May 06, 2010 10:16 am
Location: Belgium
Contact:

Re: [2D painting application] Animatoon

Post by marc_256 »

Hi Blendman,

I just love your work,
great stuff you made here.

If you like, I can try to help you with your Scale/Zoom stuff.

I just looked to your other question,
here http://www.purebasic.fr/english/viewtop ... 13&t=50400
I think I have a good solution...
I needed some stuff (Curve/bezier) for my CAD/CAM/CAE program.

Greatings,
Marc
- every professional was once an amateur - greetings from Pajottenland - Belgium -
PS: sorry for my english I speak flemish ...
User avatar
Kukulkan
Addict
Addict
Posts: 1348
Joined: Mon Jun 06, 2005 2:35 pm
Location: germany
Contact:

Re: [2D painting application] Animatoon

Post by Kukulkan »

Wow, this looks very nice. Well done! :D
User avatar
[blendman]
Enthusiast
Enthusiast
Posts: 297
Joined: Thu Apr 07, 2011 1:14 pm
Location: 3 arks
Contact:

Re: [2D painting application] Animatoon

Post by [blendman] »

Hi

thank you for your answer :)

Here is a new video to show some of the work in animatoon :
https://vimeo.com/45491718

jamirokwai wrote:Wow, looks great and promising.
If you need someone to compile and/or test a Mac-version, you can contact me.
I may also translate to German, if you like!
Yes, A german version would be great, I'm not very good in German (Ich habe nicht Deutsch gesprochen seit 10 Jahren ^^)

For the langage, here is the text (ini file) :
http://dracaena-studio.com/animatoon/doc/eng.ini

For the mac, I'm waiting for a more stable version, because I have some bugs anoying.
I have some codes which are not portable too (window Api).
if you want the actual code, you can pm me ;).
The code isn't great, it's very "simple", and will change soon, to be improved.
marc_256 wrote:Hi Blendman,

I just love your work,
great stuff you made here.

If you like, I can try to help you with your Scale/Zoom stuff.

I just looked to your other question,
here http://www.purebasic.fr/english/viewtop ... 13&t=50400
I think I have a good solution...
I needed some stuff (Curve/bezier) for my CAD/CAM/CAE program.
Hi Marc :)
thank you.

yes, i'm very interested about your proposition :).
Do you want my email or you can pm me.
Thank you a lot !

Wow, this looks very nice
Thanks, it's not finished at all :).
jamirokwai
Enthusiast
Enthusiast
Posts: 771
Joined: Tue May 20, 2008 2:12 am
Location: Cologne, Germany
Contact:

Re: [2D painting application] Animatoon

Post by jamirokwai »

[blendman] wrote:For the langage, here is the text (ini file) :
http://dracaena-studio.com/animatoon/doc/eng.ini
Please find the German version here: http://pb.quadworks.de/ger.ini

I hope, I got all things right.
And I must admit, my French is a bit rusty, too. It's more like using hands and feet in addition to French :-)
[blendman] wrote:For the mac, I'm waiting for a more stable version, because I have some bugs anoying.
I have some codes which are not portable too (window Api).
if you want the actual code, you can pm me ;).
The code isn't great, it's very "simple", and will change soon, to be improved.
If there is not too much Windows-API, I could give it a try. If you say, 50% of the code is Windows-API ...
Your logiciel reminds me of Toon Boom Studio. They charge about 200 Euros and more for something similar... :-)
Regards,
JamiroKwai
User avatar
[blendman]
Enthusiast
Enthusiast
Posts: 297
Joined: Thu Apr 07, 2011 1:14 pm
Location: 3 arks
Contact:

Re: [2D painting application] Animatoon

Post by [blendman] »

jamirokwai wrote:Please find the German version here: http://pb.quadworks.de/ger.ini

I hope, I got all things right.
And I must admit, my French is a bit rusty, too. It's more like using hands and feet in addition to French :-)
Thanks a lot ;).
The german users will be happy to have a better translation than mine.

[blendman] wrote:If there is not too much Windows-API, I could give it a try. If you say, 50% of the code is Windows-API ...
In fact, for the moment, I try to not use use too much windows api.

I only use in some things/fonctions :
- the rotate Image procedure (By LSI & Djes), I haven't find a multiplateforme rotation procedure (the speeder as possible :)) :
http://www.purebasic.fr/english/viewtop ... 51#p300251
- Toolbarplus : http://www.purebasic.fr/english/viewtop ... oolbarplus
Your logiciel reminds me of Toon Boom Studio. They charge about 200 Euros and more for something similar... :-)
I know Toon Boom, but it's bigger than Animatoon with a lot of features ;) :
- vector layer
- camera 3D
- easy animation with squelet & bones (FK)
...

But, I hope that Animatoon will grow and have some cool feature. For the moment, Animatoon is more like pencil.
But I have to find a solution for the drawing system, because it's not optimised at all.

I would like to find a way to work on big image (4000*4000 for exempla), with a lot of layers (20).
I was thinking about using the sprite3D and drawscreen(), but I can't :
- draw on a sprite with #pb_sprite_alpha
- save a sprite with alpha chanel

So, I continue to search a good way for that :).
Last edited by [blendman] on Wed Jul 11, 2012 12:39 pm, edited 1 time in total.
marc_256
Enthusiast
Enthusiast
Posts: 735
Joined: Thu May 06, 2010 10:16 am
Location: Belgium
Contact:

Re: [2D painting application] Animatoon

Post by marc_256 »

Hi,

For my CAD/CAM/CAE program I use only the 'canvasgadget'
it is very versatile in its use.
And you can draw all objects directly on it.

First you can draw on some images, and then draw all the images on the canvasgadget.

Marc,
- every professional was once an amateur - greetings from Pajottenland - Belgium -
PS: sorry for my english I speak flemish ...
User avatar
kenmo
Addict
Addict
Posts: 1967
Joined: Tue Dec 23, 2003 3:54 am

Re: [2D painting application] Animatoon

Post by kenmo »

This looks very cool! :shock: I will try it out.
IdeasVacuum
Always Here
Always Here
Posts: 6425
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: [2D painting application] Animatoon

Post by IdeasVacuum »

Luis coded a cross platform Rotate (and Mirror/Flip). It works very well: http://www.purebasic.fr/english/viewtop ... 12&t=38975
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
User avatar
Danilo
Addict
Addict
Posts: 3037
Joined: Sat Apr 26, 2003 8:26 am
Location: Planet Earth

Re: [2D painting application] Animatoon

Post by Danilo »

Very nice start for a painting application (do you know Corel Painter, Project Dogwaffle Digital Painter Pro 5 (or Howler / Project Broomhead), ArtRage Studio Pro?).

- I would like image previews for the brushes (instead names only), there are too many brushes to remember names.
- What is the "Nuancier" palette for? It does not work here if i select a color in this palette.
- Will you add support for Win8 Surface Pro tablets with pen input?
- At least half of the GUI is french with german translation selected. I can only guess or try what it is.
- Is the source still available?
Post Reply