Texture paint smear brush favors darker colors
Closed, ArchivedPublic


As of r50372, the texture paint smear brush will always let darker colors win out for some reason.

Smearing a dark color into a bright color is easy, while smearing a bright color into a dark one is very difficult. As I understand it, this tool is supposed to reliably create a transition between two colors. See attached picture for an example. Note the brownish discoloration (increased saturation) in the fringe.


To Do

Hi, a test file would help a lot. Apart from that, investigating

Hi, I think this has to do (again) with linearization of colors not happening on 8-bit images. Can you try painting on a float image instead? It behaves correctly for me.

I am not sure what the status is with 8-bit images and colour correction, maybe Sergey knows? Last time I checked we were not doing color correction at all due to precision errors.

Did you use a 8-bit oder 32-bit float image to do the test? The issue might affect both formats, but should be much less significant for float images due to higher precession. If it still happens, then it has to do with either a faulty implementation (most likely a typo/rounding error), wrong application of (not) premultiplied transparency (some related bugs are out there) or with an incorrect assumption about color management, depending in which color space the brush is applied.

Indeed, while painting on a float image the smear brush works as expected.

I'm not sure what exactly you mean by test file, but if what you want is a .blend that exhibits this behavior then I've attached one.

Thanks for the file. I also confirmed the issue here by painting half image with a color and the other half with the same color with reduced value.

Assigned to Antony... can you confirm it's on your desk?

It's possibly a non issue because we do not enforce colour correction for byte images anyway. Maybe with open colour IO colour management this is supposed to change in the future? I am not aware of the plans though. I will check up with Sergey on this and maybe mark as TODO if we are to support it correctly in the future. Keeping open though.

Hi, update here, there's no easy way to fix this. Conversion to and from linear space will be expensive and there will be precision issues. We are already facing issues with premultiplied alpha painting on our texture painting pipeline. A proper solution is to convert the paint systems to use a linear premultiplied 16bit format sometime in the future (It will solve both performance issues and avoid conversion on the fly), but right now there's little we can do for this. Marking as TODO.

Antony Riakiotakis (psy-fi) closed this task as "Archived".Mar 10 2013, 12:50 PM