MyPaint 1.x and 2.x inconsistency in rendered strokes

Please fill out the topic template below so we can help you faster.

Description of the Problem, or Question?

I have recently started porting some old MyPaint 1.3 code to MyPaint 2.x. I’ve found a few inconsistencies with how the strokes are being rendered, but the most striking one is that MyPaint 2 strokes are darker? I’ve tried messing around with brush thickness and stuff like that in case there was some change in scaling but I can’t seem to find where the discrepancy is from.

I can’t post pictures because I’m a new user, but the images are in the Colab notebooks.

Basic System Details

MyPaint version: 1.2.1 vs 2.0.0-alpha.10

Found under Help → About MyPaint

Please Tell Us How to Reproduce the Problem in Steps.

I have included Colab notebooks for both environments so they are entirely reproducible.

MyPaint 1.3/Python 2.7: Google Colab

MyPaint 2.x/Python 3.6: Google Colab

I would also appreciate any advice for improving the code, I’m not too intimate with the codebase so I’m sure there are better ways to do what I want to. (generate strokes on white background)

Related discussion: https://community.mypaint.org/t/seeking-feedback-pigment-setting-options/1865/20

Long story shorter (first):

  • New default layer type
  • New brush option changing the color mixing (enabled by default)
  • Output is adjusted to accomodate these new defaults

Long story short:
There is a new color mixing method that yields results more similar to mixing real paint.
The relevant brush option is called Pigment. In order for the results of this mixing to look better, the rendering in 2.0 adjusts color channels by raising them by an exponent of 2.2.
Setting this exponent to 1.0 (“disabling” it) and setting the Pigment (internally: paint_mode) setting to 0 will give you the old mixing.

The new mixing is really nice for emulating traditional paint, but one of the consequences of the model is that dark colors are really overpowering.

I’m currently implementing compatibility behavior and settings that address this. It should be done by the end of the week (Sunday).

Thanks! I was able to set the pigment by b.brushinfo.set_base_value('paint_mode', 0), but it now seems too light. Presumably this is because the exponent is not yet set to 1.0. How do I do this?

UPDATE: Okay I tried b.brushinfo.EOTF = 1.0. Sadly this does not revert back to 1.x behavior and actually makes the resulting color even more different.

The EOTF value is used in a lot of places, and they all have to match up to work correctly.

What you can do in the current master branch is to use the setting “display.colorspace_EOTF”.
Set that to 1.0 (in your settings.json file) and turn the pigment off - this will give you the legacy behavior.

Note: that specific setting may be removed before 2.0.0 is released, so don’t rely on it. However, there will be better ways of switching between the old and the new rendering modes.