ColorPicker: Add an intensity slider to all modes for HDR#103583
Conversation
|
From looking at this, it appears that the intensity slider is the exposure stops (log2/pow2). So an intensity of 0 is +0 stops, which uses the RGB values as-is. If my understanding is correct, I think this is a little confusing to users who are not familiar with stops. Even though I'm used to working in stops, I was still a bit confused and assumed the intensity slider was simply a multiplier on the RGB values -- This meant that I expected an intensity of 1.0 to result in no modification of the RGB values. (But this is not the case because this is actually +1 stops, not a 1.0 intensity multiplier). I think having the |
6be098d to
4d01943
Compare
|
pow 2 is better than multiplier as it's easier to control the appearence of glow. Unity's intensity slider also uses pow 2. If we want to allow negative intensity, more works need to be done. |
My apologies, I did not mean to suggest it should be a multiplier. The functionality should definitely be in stops, as implemented in the PR. I only brought up intensity multiplier because the current GUI of this PR makes me think this is how it behaves (even though it doesn't behave that way). |
I don't think this is strictly needed, but allowing negative stops is very much a standard convention for this sort of a slider, as shown in the Photoshop example I posted. |
4d01943 to
b56102d
Compare
|
Added support for negative intensity. |
|
#102240 adds |
I was also thinking about whether having the slider max at +6.0 or +4.0. I believe +6.0 is nice because it results in 0.0 being placed in the center of the GUI, which gives a pleasant appearance that reinforces that a value of 0.0 is "neutral" (as in, makes no difference to the colour value). But I agree that in practice, the user shouldn't need to go higher than +4.0... |
This looks great to me, thank you! Is it possible to use the prifix property on the spinbox to add a |
b56102d to
c515505
Compare
allenwp
left a comment
There was a problem hiding this comment.
My review of the code was not very thorough, but the user experience of this PR looks great to me, now that the intensity slider extends to negative stops and the +/- signs are shown on the intensity value.
Thanks!
c515505 to
c7ba215
Compare
14a2df3 to
be8dad9
Compare
Calinou
left a comment
There was a problem hiding this comment.
Tested locally, it works as expected.
I find the "stop count" UX more difficult to wrangle around when I want to set precise color values though, like Color(2, 0, 0):
It seems the exact stop count I need to use is a bit less than +2.31, so I can't enter the exact value due to rounding.
This could be alleviated if the raw color field wasn't read-only when it had Color() values and you could enter those directly.
|
Thanks for trying out linear/gamma conversions. I like how the colour bars for the sliders show how this is a linear encoding mode.
Additionally, with this behaviour, the "RAW" mode tab must be renamed to "HDR" because it is no longer a RAW editing mode. "RAW" suggests to the user that they are directly editing the raw values for I believe that some users would still want the RAW editing mode, especially because script shaders with the I hope that all of this isn't bloating the colour picker too much. It is something that's packed in every default export template, if I'm not mistaken, and so any changes will affect all games/apps that use it... |
|
Hey! I just checked it in engine and I'd like to bring forth 2 requests
Other than that, everything is great! Thank you for working on this. |
I'm OK with these. I will try to acheive it then. |
5dac5a1 to
0d3dc41
Compare
8883083 to
198e764
Compare
198e764 to
db6f4ac
Compare
804be56 to
ee88616
Compare
|
I have integrated #105729 into this PR in advance because I have sufficient bandwidth to do this now. |
4d0bb44 to
fce71de
Compare
Add intensity slider to all color modes. Replace raw mode by linear mode, which uses linear color space. When color is overbright, automatically switch hex text to script text. Allow executing expression in script text field to set color. Add the "script" icon to the default theme.
fce71de to
8a94092
Compare
|
Thanks! |





Close #99366
This PR adopts a relatively simple approach, without storing extra intensity field in Color class.
Adds an intensity slider and limit the max value of RGB to 1 in ColorPicker raw mode. Intensity is inferred from raw RGB and may change after switch color mode. The final color is calculated as
color * pow(2, intensity).Also keep the hex LineEdit always visiable and switch it to code if RGB exceeds the valid range.
Edit:

Depends on #102240 to allow greater values.
Edit:
Now the intensity slider is added to all modes and should work.
I modified the ColorMode and ColorPickerShape so that they only handle colors which the intensity has not been applied.