New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linear and Spectral Pigment Features #957

Merged
merged 1 commit into from Jan 26, 2019

Conversation

Projects
None yet
2 participants
@briend
Copy link
Contributor

briend commented Jan 26, 2019

It's about time we put the "paint" into MyPaint. This PR makes a new layer mode the default. "Paint Mode" is a spectral upsampled 30 channel weighted geometric mean compositing mode that does a pretty good job emulating the appearance of paint and pigments.

image

The reference space is also linearized and rendered with a generic 2.4 OETF.

This represents a pretty serious paradigm shift. All the old layer modes will now render in a linear way, considered more "correct" by color experts. The Normal brush mode is also linear now, which may not be desirable since we're so used to the old non-linear blending. Fortunately, the "Paint/Pigment" brush mode is non-linear and a superior replacement to the old non-linear Normal mode.

Some brushes such as the Air Brush and very large brushes will use quite a bit more CPU. If this happen you may want to slide the Pigment slider off to go back to the Normal brush mode (albeit linear). You can also change the layer mode back to Normal and that will improve performance as well.

Old files will composite layers differently, using the linear reference space. Some files may look better, some worse, and some will look the same. At the moment if you desire the old rendering mode you should open the file in an old version of MyPaint or another program like GIMP or Krita. We could also add a preference to control the OETF power function. In a pinch one could switch the 2.4 power function with 1.0 in the src code.

MyPaint is still an sRGB unmanaged application, although it won't take much more to replace the OETF with a call to LCMS to correct the color for a display. The reference colorspace should remain Rec 709, however, until a point where we can manage the spectral upsampling to include arbitrary colorspaces.

needs_backdrop_removal = True
if srclayer.mode == DEFAULT_MODE and srclayer.opacity == 1.0:
if srclayer.mode == lib.mypaintlib.CombineNormal and srclayer.opacity == 1.0:

This comment has been minimized.

@houndci-bot

houndci-bot Jan 26, 2019

line too long (85 > 79 characters)

@briend briend merged commit 1b88e98 into mypaint:master Jan 26, 2019

2 of 4 checks passed

Hound 1 violation found.
continuous-integration/tea oops, something went wrong
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment