Date
1 - 5 of 5
tips/tricks for drawing color-managed color picker controls?
Jeremy Selan <jeremy...@...>
Are you doing this in qt or pyqt?
toggle quoted message
Show quoted text
-- Jeremy On Mon, Dec 19, 2011 at 2:00 PM, Paul Miller <pa...@...> wrote: I'm working on a new set of color picker controls that are properly managed with OCIO. |
|
Paul Miller <pa...@...>
On 12/19/2011 4:04 PM, Jeremy Selan wrote:
Are you doing this in qt or pyqt?My UI is Qt. If I can get away with pre-transforming/clipping my colors and then just feeding them to a QGradient, I'd be happy. But I can render everything into a floating-point backing buffer and clip to the screen if I have to. |
|
Jeremy Selan <jeremy...@...>
You should not need a floating-point backing buffer. You can pretransform a lattice of float colors (or per-pixel for 1d gradients), and then clip + convert to a QColor gradient for drawing.
toggle quoted message
Show quoted text
The big subtlety is that if your gradient interpolation space is scene-linear (and you apply a scene-linear to display view transform), the gradient will look terribly non-uniform. I.e. Artists will hate it. The workaround is that you essentially want to separate a view transforms 1D + 3D components, where the 3D part of the view transform is applied, but the 1d part is not. This is what the COLOR_PICKER role is for. We have pyqt code that is a nice example of this, let me see if I can get permission to post it. -- Jeremy On Mon, Dec 19, 2011 at 2:10 PM, Paul Miller <pa...@...> wrote:
|
|
Paul Miller <pa...@...>
On 12/19/2011 4:27 PM, Jeremy Selan wrote:
You should not need a floating-point backing buffer. You canAh yes I noticed my gradients were not looking uniform. If you have an example of using the picker role, that would be awesome. |
|
Paul Miller <pa...@...>
On 12/19/2011 4:27 PM, Jeremy Selan wrote:
You should not need a floating-point backing buffer. You canJeremy - any luck getting some sample code that shows how to avoid the extra display transform? |
|