Texture paint smear brush favors darker colors
Closed, ArchivedPublic

Description

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.

psy-fi (Antony Riakiotakis) added a comment.Via Old WorldSep 18 2012, 3:16 PM

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

psy-fi (Antony Riakiotakis) added a comment.Via Old WorldSep 18 2012, 3:28 PM

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.

niabot (Tobias Oelgarte) added a comment.Via Old WorldSep 18 2012, 3:30 PM

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.

madminstrel (Piotr Adamowicz) added a comment.Via Old WorldSep 18 2012, 6:49 PM

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.

psy-fi (Antony Riakiotakis) added a comment.Via Old WorldSep 18 2012, 7:10 PM

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.

ton (Ton Roosendaal) added a comment.Via Old WorldOct 19 2012, 6:59 PM

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

psy-fi (Antony Riakiotakis) added a comment.Via Old WorldOct 19 2012, 7:37 PM

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.

psy-fi (Antony Riakiotakis) added a comment.Via Old WorldMar 10 2013, 12:50 PM

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.

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

Add Comment