Bug 324332 - Unified Curves Filter
Summary: Unified Curves Filter
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Filters (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Dmitry Kazakov
URL: http://www.cambridgeincolour.com/tuto...
Keywords:
: 290429 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-08-31 22:49 UTC by Diego Gangl
Modified: 2016-05-02 16:30 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Gangl 2013-08-31 22:49:29 UTC
Currently Krita has two curves filters, one for colors (individual channels) and another one for brightness/contrast (all channels). It would be better if they were a single filter (like in Photoshop, GIMP, Painter, etc.). 
The filter would be more efficient (for instance, you'd need only one filter mask to make a basic vintage effect, instead of two). And it'd be easier for users switching from other editors.

The brightness and contrast filter could then be replaced by the one in this request: https://bugs.kde.org/show_bug.cgi?id=138009
Comment 1 Paul Geraskin 2014-07-31 10:00:11 UTC
+1 We need to merge RGBACurve and LightnessCurbe.
PS, Gimp, Natron, Blender have a merged Curve.
Comment 2 Halla Rempt 2014-07-31 10:11:59 UTC
This would be purely a gui thing: we'd still need to apply two transforms to every pixel, and the question is, which one would be applied first, the color channel transform or the brightness/contrast transform.
Comment 3 Paul Geraskin 2014-07-31 10:33:32 UTC
Boud, could you check how it does in Natron or in Gimp?
In Gimp it works perfectly.
Actually i dunno know what goes first.. Lightness or RGBA...

Here is how it's done in Natron:
https://github.com/devernay/openfx-misc/tree/master/RGBLut
MasterCurve(in Natron) is Lightness Curve(in Krita).

if you want i  can even make some tests. To check what does first.
Comment 4 Paul Geraskin 2014-07-31 10:39:50 UTC
Ok, i tested in Gimp.

First Go RGB, then goes Lightness.
Alpha is separeted and does not dependent of Lightness.
Comment 5 Paul Geraskin 2014-07-31 14:13:05 UTC
I have just tested PS. In PS - Firstly RGB is modified, then Lightness is modified. The same as in Gimp.
Comment 6 sghpunk 2015-02-17 17:18:07 UTC
In Rawtherapee http://rawtherapee.com/ present four curve modes: Standard, Weighted, Film-like, Saturation and Value blending. And another curve for Lightness.
Now in Krita Birghtness/Contrast curve is working like Lighness or Saturation and Value blending.
I wan't it all in Krita.
Comment 7 sghpunk 2015-02-17 17:19:21 UTC
And another curve mode like in Photoshop.
Comment 8 Halla Rempt 2015-05-21 09:55:05 UTC
*** Bug 290429 has been marked as a duplicate of this bug. ***
Comment 9 Halla Rempt 2015-05-21 10:06:49 UTC
sghpunk: do you mean drawing a freehand curve?
Comment 10 sghpunk 2015-05-29 16:19:52 UTC
(In reply to Boudewijn Rempt from comment #9)
> sghpunk: do you mean drawing a freehand curve?

No, I mean curve modes, I don't know how to explain correctly...
It is a way like curves affect different components of color/lightness/hue/value what else is in it?
If you use Rawtherapee, you can see how it works.
Comment 11 Paul Geraskin 2015-05-29 16:28:08 UTC
I guess he means something like HueShift in Nuke. https://i1.creativecow.net/u/61655/lookfamiliar.jpg
This Curve tool makes changes according Color/Hue values.

But right now we just need Curves tool like in PS/Gimp.
Comment 12 sghpunk 2015-05-29 17:33:03 UTC
(In reply to Paul Geraskin from comment #11)
> I guess he means something like HueShift in Nuke.
> https://i1.creativecow.net/u/61655/lookfamiliar.jpg
> This Curve tool makes changes according Color/Hue values.

No, you wrong. Although Hue Shift is great tool (Rawtherapee have it too), but now I mean another thing. Here is some examples (same curve but in different modes).

Source picture: http://i.imgur.com/8dRWzYv.jpg
RT blend: http://i.imgur.com/TU5gwc2.jpg
RT Film Like: http://i.imgur.com/ih4Se4i.jpg
RT Standard: http://i.imgur.com/XYmH3pz.jpg
RT Wightened: http://i.imgur.com/dWd6CbX.jpg
RT Lightness (Luminocity): http://i.imgur.com/56VgdHl.jpg
Krita: http://i.imgur.com/xIVckXL.jpg

How you can see, now Krita works in Lightness(Luminocity) mode.
I want to add all RT modes. It all is very useful for me.
Hope you understand me now. Thanks.
Comment 13 Dmitry Kazakov 2015-05-30 22:15:25 UTC
Git commit 45d4e30d35c9e027021b1a6ff585c9687cf1de83 by Dmitry Kazakov.
Committed on 30/05/2015 at 22:04.
Pushed by dkazakov into branch 'calligra/2.9'.

[FEATURE] Lightness curve for per-channel filter

Now the curves filter can do everything:

1) Correct colors directly by editing RGB curves
2) Correct 'Lightness' using a special curve. Please
   not that this is not a 'RGB' curve like in Photoshop,
   it is a real Lightness curve from Lab color space.
3) Edit a curve for alpha
Ref T352

M  +13   -0    krita/image/kis_cubic_curve.cpp
M  +2    -0    krita/image/kis_cubic_curve.h
M  +17   -0    krita/image/tests/kis_cubic_curve_test.cpp
M  +1    -0    krita/image/tests/kis_cubic_curve_test.h
M  +1    -0    krita/plugins/filters/colorsfilters/CMakeLists.txt
M  +156  -121  krita/plugins/filters/colorsfilters/kis_perchannel_filter.cpp
M  +7    -1    krita/plugins/filters/colorsfilters/kis_perchannel_filter.h
A  +62   -0    krita/plugins/filters/colorsfilters/virtual_channel_info.cpp     [License: GPL (v2+)]
C  +25   -21   krita/plugins/filters/colorsfilters/virtual_channel_info.h [from: krita/image/tests/kis_cubic_curve_test.h - 053% similarity]
M  +1    -0    libs/pigment/CMakeLists.txt
A  +62   -0    libs/pigment/KoCompositeColorTransformation.cpp     [License: GPL (v2+)]
A  +48   -0    libs/pigment/KoCompositeColorTransformation.h     [License: GPL (v2+)]

http://commits.kde.org/calligra/45d4e30d35c9e027021b1a6ff585c9687cf1de83
Comment 14 Paul Geraskin 2015-06-15 09:04:54 UTC
Hi.

I have just tested new curves.

Found one issue:
In Gimp/PS firstly go RGB then Master channel.
In Krita now goes Master then RGB.

I think it's better to make like in PS/Gimp.

Here is the test: http://youtu.be/oty6_LEFi1E
As you can see i get red image in Krita and black image in Gimp.
Comment 15 Halla Rempt 2016-01-24 15:42:24 UTC
It's in Dmitry's phabricator.
Comment 16 Dmitry Kazakov 2016-05-02 16:30:46 UTC
Git commit 4023a33a8680a8f3c92141fe009b820152c1428c by Dmitry Kazakov.
Committed on 02/05/2016 at 16:30.
Pushed by dkazakov into branch 'master'.

Fix the order of application of color correction curves in the "Curves" filter

Now the order of transformations fits the order of other popular
applications, including Gimp:

1) Apply per-channel color curves
2) Apply composite RGB color curve, which changes all the channels
   at once
3) Apply the lightness curve in the end

CC:kimageshop@kde.org
Fixes T2083

M  +2    -2    plugins/filters/colorsfilters/kis_perchannel_filter.cpp

http://commits.kde.org/krita/4023a33a8680a8f3c92141fe009b820152c1428c