FEATURE: Make granularity of warp\cage\liquify transforms dependent on size of working area
Needs RevisionPublic

Authored by Ultrar on Jul 22 2016, 11:56 AM.

Details

Reviewers
dkazakov
Group Reviewers
Krita
Summary

Then working with pixelart some of transforms look ugly and their preview differs too much from the result, especially in case of warp transform. The quality of warp,cage and liquify transform can be adjusted by setting different pixel precision. So I made pixel precision dependent on size of working area. Now all transforms have best quality(granularity 1 pixel) for areas less than 512*512 and worst(same as before) for areas bigger, than 2560*2560.
Warp preview had 32 pixel precison, cage preview had 16 pixel precision and everything else had 8 pixel precision.
https://bugs.kde.org/show_bug.cgi?id=344210

Test Plan

Draw a small figure on big canvas, select area bigger than 2560*2560 and transform it, you shall get the same quallity as before.
Then select a smaller area, transform it and you shall get better quality than before. Difference is the biggest for warp transform.

Diff Detail

Repository
R37 Krita
Lint
Lint Skipped
Unit
Unit Tests Skipped
Ultrar updated this revision to Diff 5428.Jul 22 2016, 11:56 AM
Ultrar retitled this revision from to FEATURE: Make granularity of warp\cage\liquify transforms dependent on size of working area.
Ultrar updated this object.
Ultrar edited the test plan for this revision. (Show Details)
Ultrar added reviewers: Krita, dkazakov.
Ultrar set the repository for this revision to R37 Krita.
Ultrar added a project: Krita.
Restricted Application added a subscriber: woltherav. ยท View Herald TranscriptJul 22 2016, 11:56 AM
dkazakov requested changes to this revision.Jul 23 2016, 8:48 AM
dkazakov edited edge metadata.

Hi, @Ultrar!

There are at least two regressions in the patch :( See the attached video for demonstration:

  1. The preview for bigger images is extremely slow :(
  2. When zooming in preview mode, an assert happens. That assert means that the precalculated grid values are out of sync with the current state of the grid. For example, the grid was initially precalculated with the step 8, but then it is requested for values with step 16, which is highly unexpected for it.

I guess the patch should be modified in a way that the choice of the precision would happen at the topmost level of the hierarchy, that is the transform-tool-strategy. That will allow us both 1) having full control over the current precision level; 2) regenerating everything when the precision level changes.

This revision now requires changes to proceed.Jul 23 2016, 8:48 AM