Planetside Software Forums

Support => Terragen Support => Topic started by: N-drju on April 27, 2020, 04:47:11 AM

Title: Default shader "diffuse colour" setting living on its own...
Post by: N-drju on April 27, 2020, 04:47:11 AM
There seems to be a bug in the default shader which causes RGB values to always jump by a point or two in R, G or B when using the colour floating window (after you click on the colour sample in the shader).

I tried entering various colours into the RGB dialogue boxes, but every time I check on them again, they differ a little from what I have entered.

It may not be much, but I'd really like to have that sorted out and be able to enter the exact RGB values that I aim for in the default shader. I didn't try it, but I guess this may well be the case with all the other shaders that accept RGB as a colour value...
Title: Re: Default shader "diffuse colour" setting living on its own...
Post by: raymoh on April 27, 2020, 07:53:53 AM
This is a behavior that I have noticed since several Terragen updates. If you type in RGB values and call them up again a little later, they sometimes differ by a few points. I have noticed this, but did not pay attention to it any further, because the differences are not noticeable on the screen (unless you have an "absolute" sense of color). I can imagine some internal rounding errors. In my case, the values only differ by 1 or 2 digits (e.g. 200 goes to 219 or 222).
Title: Re: Default shader "diffuse colour" setting living on its own...
Post by: sboerner on April 27, 2020, 12:53:47 PM
I may be wrong about this, but I think that while the sliders in the color picker are gamma corrected, Terragen works in linear space. So there may be rounding errors, particularly when it's converting floating point back and forth to 8-bit (0-255). Probably unavoidable.

Maybe try setting your colors in decimal (0-1)? Not sure if that would matter, but the values would be more precise to start with.
Title: Re: Default shader "diffuse colour" setting living on its own...
Post by: N-drju on April 27, 2020, 02:43:15 PM
Thanks for your inputs raymoh, sboerner, because that was really puzzling me. I agree that such differences would not be visible, unless you are a mantis shrimp. But I can still think of a situation or two, when that could play a role.

I think you may well be right sboerner. I never thought that RGB values could be a subject to rounding though. The more you know.

I need to try other input formats indeed, although I'm not sure if that will work or the same would take place. I'd have to make sure if other formats are available though, because I use Wikipedia "shades of..." pages and didn't notice what other formats do they cover.
Title: Re: Default shader "diffuse colour" setting living on its own...
Post by: WAS on April 27, 2020, 03:15:47 PM
Yeah I've noticed this too. For example, selecting a full RGB value, and TG inputs the value at 0.98 instead of 1. Easily fixed by just adjusting the value though, as the hue is still locked in.
Title: Re: Default shader "diffuse colour" setting living on its own...
Post by: raymoh on April 27, 2020, 03:44:16 PM
There are many different RGB measurement methods. macOS has a built-in Digital Color Meter.
Here are the measured results for the same blue color as an example:

Blue.jpg

"Generic RGB" of course!
Title: Re: Default shader "diffuse colour" setting living on its own...
Post by: WAS on April 27, 2020, 04:19:13 PM
Quote from: raymoh on April 27, 2020, 03:44:16 PMmacOS has a built-in Digital Color Meter.

That's really handy. Wow.  +1 for MacOS
Title: Re: Default shader "diffuse colour" setting living on its own...
Post by: sboerner on April 27, 2020, 05:53:30 PM
Quoteunless you are a mantis shrimp
:)
Title: Re: Default shader "diffuse colour" setting living on its own...
Post by: raymoh on April 28, 2020, 01:16:22 AM
@WAS: To be more precise: The macOS Digital Color Meter is an app, like the Color Picker, only that it can measure in different measuring systems. This assumes that you know in which system you want to measure. Sometimes one is still guessing...
It is not a stand-alone device to calibrate a screen, for example!
Title: Re: Default shader "diffuse colour" setting living on its own...
Post by: raymoh on April 28, 2020, 01:40:50 AM
If we are right with our assumption that the Color Picker and the Shaders are measuring with different systems, this means that the values measured with the Color Picker and displayed in the Shader (slightly changed) should not be changed in the Shader, because then you would really change the measured color.
My example from above: The Color Picker value of e.g. 9 87 214 (Generic RGB) is then the same color as the values displayed by the Shader of e.g. 49 112 215 (Native). If you change then the Shader back to 9 87 214 you will have a different color!
But that doesn't make things easier...You would have to know about the measurements "under the hood". As already mentioned: Since the difference between the measured and displayed values is quite small, the effort is probably not really worth it.
Title: Re: Default shader "diffuse colour" setting living on its own...
Post by: sboerner on April 28, 2020, 10:51:20 AM
There are an awful lot of variables when it comes to displaying color information on a display screen. It's complicated stuff. Unless you're seeing noticeable color shifts I guess I wouldn't worry about it too much . . .
Title: Re: Default shader "diffuse colour" setting living on its own...
Post by: WAS on April 28, 2020, 01:54:18 PM
Quote from: raymoh on April 28, 2020, 01:16:22 AM@WAS: To be more precise: The macOS Digital Color Meter is an app, like the Color Picker, only that it can measure in different measuring systems. This assumes that you know in which system you want to measure. Sometimes one is still guessing...
It is not a stand-alone device to calibrate a screen, for example!

My Monitor uses True Color for it's 10bpc display, I can't even adjust the settings from what I've found. Lol Now that I got all the cords for it though I do like it over my old display. Colours are rich and I can really see what's going on in 32bit images.