Color Intensity in the Color Dialog

I’ve pushed a change to the SDK (master, so not in your releases yet), which changes the behavior of the color dialog.
The reason was that I was asked on how to increase the intensity of a light to be > 1. jMonkeyEngine unfortunately handles that by like multiplying the color with a scalar. In code you would do ColorRGBA.Blue.mult(2) to have a blue light with twice the intensity. This means however for the SDK there is no way to distinguish between a grey with an intensity of > 1 and white, e.g.:

Grey (0.5, 0.5, 0.5) is multiplied with the intensity of 2, so you get (1, 1, 1). When loading, the SDK cannot guess if that is white or a grey of intensity 2, thus it tries to apply a best guess so that the intensity is as low as possible (normalizing the largest component to 1), e.g.: (2.0, 0, 1.0) becomes (1.0, 0, 0.5) with intensity 2, but it could’ve also been (0.5, 0, 0.25) with intensity 4.

Just be aware that this means the color might look odd to you when applying an intensity, but a very bright black actually is white… There is nothing broken, it’s really just the same.

1 Like

I don’t like the sound of this behavior, personally I think it should be just be clamped in the SDK view, or not apply intensity to the view.

Well since the new dialog has a slider for intensity which you can drag up I have to extract the intensity out of the color, which is the problem for everything. If I was to clamp it, you’d loose information and still don’t know if (1.0, 1.0, 1.0) now is white or a high itensity grey, even when you have (10.0, 10.0, 10.0) and it’s clamped to (1.0, 1.0, 1.0), makes it even worse.

Actually the design is somewhat flawed as intensity != color, but that’s the thing we have to work with.

I think without a frame of reference, intensity will be very hard to convey via a colour information alone.

My 2 ideas are only for the display in the SDK, note the final stored colour, my thinking behind the 2 options:

  • Clamping, to me, makes sense: as I make the color more and more intense, it pushes towards white, I understand this since I dont have an HDR monitor and I have no baseline to reference my new colour against.

  • Not appying intensity to the colour view in the SDK doesn’t let me visualize the final outcome, but since I’m using intensity, I understand my final colour will be Intensity x colour.