I will be updating about the progress of the project here
Weekly progress(18-25 May):
I submitted a PR regarding Automatic assignment of extension when rendering gets messed up after saving #830
After some final touch up and fixes the vectorizerpopup looks like this -->
Meanwhile I started with the first step of Centerline Vectorization process i.e centerline polygonizer
Now I will list down the classes(their main variables) and also their synfig equivalent( will keep adding as I keep discovering more)
main variable being TPoint m_position; We have synfig pointint that can replace Tpoint
class RawBorder final : public std::vector
main variable being TpointD We have synfig point that can replace TpointD
class PixelEvaluator //this is a template class
main variable being TRasterPT
main data being the functions
- Signaturemap(const TRasterP &ras, int threshold) and
- template <typename T> void readRasterData(const TRasterPT<T> &ras, int threshold);
Along with some other functions that directly or indirectly use data objects of mentioned classes
So in the next week, I will be focusing on creating Synfig equivalent of polygonizer
I appreciate any suggestions or improvements from anyone
EDIT: I will be adding ( ) to the one I have implemented.
Awesome! Keep up the good work!
I have this program maybe serves them of reference. It can work with flat colours.
@KonstantinDmitriev I have implemented 2 classes(see edited comment).
Please have a look at https://github.com/synfig/synfig/issues/735#issuecomment-496266744
Currently I’m stuck on the PixelEvaluator class. It uses pixel information and then decides whether it is can be categorized as a black pixel or a white one.
The problem is Synfig uses RGBA color scheme and Toonz uses RGBM color scheme so I’m not sure if can simply replace the A with M into the same formula.
I found that GIMP uses 5 different method for the same (in desaturate).
Out of them luminance is most accurate according to documentation. So I’m thinking of using it.
Weekly progress(26 -1 June):
- Changed the label alignment to right as per comment
Added centerlinepolygonizer.cpp and polygonizerclasses.h
ps: the filename will also include skeletonizer code so will rename it to centerlineclasses.h
- The classes implemented till now are RawBorderPoint, RawBorder, CenterlineConfiguration, vectorizerconfiguration, Newoutlineconfiguration
- The progress was slow this week as I overlooked the filesize for polygonizer which is actually not small also I encountered few doubts where @blackwarthog came to rescue me.
- for the next week I am looking for the following goals: read the pixel data from layer_bitmap, implement the remaining portion of polygonizer and implement the classes needed for next step i.e skeletonizer.
My top priority is to complete the polygonizer in 2-3 days and then proceed further
Weekly Progress(2 - 8 June):
- So I am finally on track as per my proposal
- Ported all the remaining functions and pixel related functions from Toonz to Synfig (thanks to @blackwarthog )
- Encountered a silly error which kept me and @KonstantinDmitriev busy for 3 hrs Xd
- And, I have completed the centerlinepolygonizer.cpp
- Few errors are present there, trying to rectify them
- For the next two weeks I will be working on next step of vectorization i.e Skeletonizer
I appreciate any feedback! [^_^]
Weekly Progress(9 - 15 June):
- Rectified the errors present in centerlinepolygonizer
- I was able to pass the output of centerlinepolygonizer to Toonz and got the output(which was rotated 90-degrees anticlockwise)
- Fixed the rotated input error mentioned in the above point
- Started the work on centerlineskeletonizer which is almost complete(at least the code is compiling successfully :p)
- Will try to check the output of centerlineskeletonizer by passing it results to Toonz.
- In the next week I look forward to making the centerlineskeletonizer working
That’s all for this week [^_^]
Would appreciate Suggestions and feedbacks
A comparison between the output of Skeletonizer from Toonz and Synfig can be seen here however the results are not exactly the same but of the same nature.
I need to cross check if I have made any silly error and cross verify them again(for this time I need to pass the output of synfig skeletonizer to toonz to see if the result is varied which I am still figuring out a way on how to do that).
Have started working on the next step which is creating the complete skeleton using joints and sequence from separate straight skeletons.
feedback and suggestions are always welcome
Weekly Progress(16 - 22 June):
- This week I was able to complete the Skeletonizer that output a straight skeleton.
- And then I started working on organizegraphs() which joins the straight skeletons into sequences and joints. And I was able to achieve the same
@KonstantinDmitriev helped me understand the concept of frame in calculating thickness ratio and that
m_thicknessRatio = 1.0in our case. (see discussion here)
- The next step is storing the corresponding color for a sequence in the skeleton for which I the plan is to extract the original RGBA color from the bitmap layer and then apply the color as a “Stroke” ( as they say in Toonz) but we do not have strokes so Outline layer will be used.
Any suggestions or feedback are welcome