Skip to content

Gradient and Texture features and smudge engine update

Peter Schatz requested to merge voronwe/krita:voronwe/gradient4.3 into krita/4.3

This is the mostly final version of all of the updates I've been working on, including lightness support in the smudge engine, lightness support in textures, gradient map support in pixel engine brushes, gradient map support for textures, and foreground color/background color support for custom gradients. I've done it on the latest version of 4.3 (as far as I can tell), so merging should be pretty simple.

Some things to note: currently the Gradient mode does not work with the colorsmudge brush. It doesn't crash, it just uses it like a regular alpha mask, but it is slow because of a color profile mismatch issue I haven't tracked down yet. While GIMP gradients with foreground/background colors are supported, GIMP gradients with Foreground (transparent) or Background (transparent) colors are not. Those colors will be treated like fixed colors instead (for now). I did not add support in the ASL reader for Adobe Photoshop gradients that use foreground/background colors, because I couldn't find any documentation on how to do that. Performance with brushes in Gradient mode is pretty slow unless precision is turned down, and even then it can be slow with complicated Segment Gradients. I don't know of a good solution to that, other than to make a note of it in any documentation of the feature. I suspect most brushes using this feature will be stamp brushes with large spacing (that's my intended use for it, anyway), so I don't think it will be much of an issue most of the time.

Test Plan

Try using the DA_OilRGBA or other custom RGBA brushtips with smudge engine brushes to test the smudge engine lightness support. Test any of the texture brushes with texturing mode set to Lightness Map Test any of the texture brushes with texturing mode set to Gradient Map (and try it with several different gradients) Try using any of the RGBA brushtips in Gradient mode (with a pixel engine brush). Here's a link to a brushtip that shows off the gradient map well: gradientBrush2 Try creating custom gradients with Foreground or Background colors, and using them in the various gradient tools. Try importing a gradient from GIMP that has Foreground or Background colors in it.

Formalities Checklist

  • I confirmed this builds.
  • I confirmed Krita ran and the relevant functions work.
  • I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!)
  • I made sure my commits build individually and have good descriptions as per KDE guidelines.
  • I made sure my code conforms to the standards set in the HACKING file.
  • I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per KDE Licensing Policy.
Edited by Peter Schatz

Merge request reports