Page 1 of 2

What is the % used for ?

Posted: 08.03.2007, 08:02
by Cham
I just discovered an option I didn't knew, after all this time passed with Celestia ! Shift-5 = %. It changes the colors of all the stars. Why ? What is this ? Apparently, it's not even declared in the menus.

The blue stars gets a stronger blue tone, while the red and orange stars gets a stronger tone of color. I'm puzzled ! :oops:

Posted: 08.03.2007, 09:02
by t00fri
ChangeLog:

* Bound % key to toggle between star color tables

cf. starcolors.cpp
in src/celengine directory.

and the key definition in src/celestia/celestiacore.cpp

Code: Select all

 case '%':
        {
            const ColorTemperatureTable* current =
                renderer->getStarColorTable();
            if (current == GetStarColorTable(ColorTable_Enhanced))
            {
                renderer->setStarColorTable(GetStarColorTable(ColorTable_Blackbody_D65));
            }
            else if (current == GetStarColorTable(ColorTable_Blackbody_D65))
            {
                renderer->setStarColorTable(GetStarColorTable(ColorTable_Enhanced));
            }
            else
            {
                // Unknown color table
            }
        }
        break;


Bye Fridger

Posted: 08.03.2007, 18:25
by Cham
This code doesn't explain anything to me. :evil:

Posted: 08.03.2007, 18:36
by buggs_moran
One is for pure blackbody colors based on star type and one is for enhanced coloring if I remember correctly... but I don't know what is being enhanced. :?

Posted: 08.03.2007, 18:41
by Cham
buggs_moran wrote:One is for pure blackbody colors based on star type and one is for enhanced coloring if I remember correctly... but I don't know what is being enhanced. :?


That's what I'm wondering. What is the enhanced colors actually means ? Is this just a way to reveal the color differences between stars ?

Posted: 08.03.2007, 18:43
by t00fri
buggs_moran wrote:One is for pure blackbody colors based on star type and one is for enhanced coloring if I remember correctly... but I don't know what is being enhanced. :?


Right. The two color tables may be explicitly inspected in src/celengine/starcolors.cpp

The above code I thought should be readable without being a C++ Guru:

It says: in case of the '%' key being pushed:

-- if the current color table = ColorTable_Enhanced, then switch to ColorTable_Blackbody_D65

--if the current color table = ColorTable_Blackbody_D65,
then switch to ColorTable_Enhanced

No other action possible after hitting '%'.

Was this so hard??

Bye Fridger

Posted: 08.03.2007, 18:46
by Cham
t00fri wrote:Was this so hard??

Bye Fridger


Fridger, don't you understand that this code doesn't answer the question at all ? What does the second table means ?? Was it that hard to understand the question in the first place ?

Posted: 08.03.2007, 18:50
by t00fri
Cham wrote:
t00fri wrote:Was this so hard??

Bye Fridger

Fridger, don't you understand that this code doesn't answer the question at all ? What does the second table means ?? Was it that hard to understand the question in the first place ?


Sorry this was NOT the question you asked when I wrote the above answer! At that point you had just stated

Cham wrote:This code doesn't explain anything to me.


My previous post was just an answer to this and only this point. I had also told you the files (starcolors.cpp), where you can take your time and study the differences in the color assignments.
That's all I can tell you. Chris entered these two tables.

Bye Fridger

Posted: 08.03.2007, 18:52
by Cham
t00fri wrote:That's all I can tell you. Chris entered these two tables.


Then you don't know yourself what the second table is. There's a mystery to solve here :wink:

Posted: 08.03.2007, 18:59
by t00fri
Cham wrote:
t00fri wrote:That's all I can tell you. Chris entered these two tables.

Then you don't know yourself what the second table is. There's a mystery to solve here :wink:


I dont know /exactly/ what the enhanced color table means. My common sense tells me --knowing how a blackbody color map looks like-- that enhanced probably means enhanced colors relative to blackbody.

If I was interested in that point myself, I would just inspect the color map in starcolors.cpp relative to the blackbody table. It's all human readable and all RGB color assignments are specified there.

Another heuristic way would be to find out empirically how "enhanced" looks like by trying it out in Celestia, knowing the action of the % key toggles between "enhanced" and "blackbody". What else would one want to know??

There are plenty of such colormaps for stars in the net. It's probably one such example. Chris did not comment about this in more detail in the dev list.

Bye Fridger

Posted: 08.03.2007, 19:05
by ajtribick
It would be good to have some kind of message displayed on the key press to tell you which table is which!

Posted: 08.03.2007, 19:07
by Cham
The problem is, looking at numbers wont tell me anything special, except that the numbers are different in the tables used. What is the "physics" for the second table ? What information does it contains ?

I have the feeling there is none ! It's just a way to heighten the contrasts in colors, but I may be dead wrong here.

chaos syndrome wrote:It would be good to have some kind of message displayed on the key press to tell you which table is which!


Yes, I agree. A text message should be displayed.

Chris, please ?

Posted: 08.03.2007, 19:13
by t00fri
chaos syndrome wrote:It would be good to have some kind of message displayed on the key press to tell you which table is which!


Certainly ;-)

But one can really see what the enhanced table looks like. Go to some region with many stars. Adjust ' ] ' maximal and switch to "scaled disks" (CTRL+S) to have a clearer view. Then toggle between the 2 color tables and you will see --as expected-- that in "enhanced" mode red and blue stars appear with much more saturated colors.

So I don't see here much of a mystery...

The only remaining question could be where Chris copied this enhanced table from ?

Bye Fridger

Posted: 08.03.2007, 19:20
by ElChristou
chaos syndrome wrote:It would be good to have some kind of message displayed on the key press to tell you which table is which!


Yep, I asked this a long time ago in the dev list, but as nothing came out I suppose it's not a so important feature... :?

Posted: 08.03.2007, 19:21
by Cham
t00fri wrote:Then toggle between the 2 color tables and you will see --as expected-- that in "enhanced" mode red and blue stars appear with much more saturated colors.

So I don't see here much of a mystery...


Fridger, this is obvious and I already tested this as soon as I discovered the option, but it doesn't explain anything to me. My question is the information content of this mode. What does the "enhanced" colors actually means ? Why two modes of colors ? Which one is the accurate mode for the human eye ? (probably the first, but ...).

Posted: 08.03.2007, 19:24
by t00fri
ElChristou wrote:
chaos syndrome wrote:It would be good to have some kind of message displayed on the key press to tell you which table is which!

Yep, I asked this a long time ago in the dev list, but as nothing came out I suppose it's not a so important feature... :?


That's also my interpretation. Chris was experimenting really A LOT, when trying to improve his new star rendering. So essentially for testing purposes, he implemented these two alternative color tables, one being a classical blackbody, the other providing more intensive colors. As I said I knew a whole web site specializing on offering such different star color tables.

Bye Fridger

Posted: 08.03.2007, 19:27
by chris
ElChristou wrote:
chaos syndrome wrote:It would be good to have some kind of message displayed on the key press to tell you which table is which!

Yep, I asked this a long time ago in the dev list, but as nothing came out I suppose it's not a so important feature... :?


Sorry . . . You should file a bug on the SourceForge tracker so that the request doesn't get lost. It's a very easy fix, I just need to remember to do it when I'm working on the Celestia code.

--Chris

Posted: 08.03.2007, 19:29
by Cham
If there's no informational content in this mode (like what I currently believe), then it should be removed. It's puzzling to the user. At first, when I discovered it last night, I thought to myself that it was surely telling something (despite the absence of message).

Posted: 08.03.2007, 19:32
by t00fri
Cham wrote:The problem is, looking at numbers wont tell me anything special, except that the numbers are different in the tables used. What is the "physics" for the second table ? What information does it contains ?

I have the feeling there is none ! It's just a way to heighten the contrasts in colors, but I may be dead wrong here.



A color table in this context (as clearly commented in starcolors.cpp) maps the star surface temperatures to RGB colors. Obviously an INFINITY of such maps is possible and most are not even distinguished physically. Different maps may even account for different monitor characteristics if you want.

In stars.cpp there are the corresponding maps that associate the star luminosity classes with their surface temperatures. So for each luminosity class specified e.g. in the HIP catalog entry, eventually one associates a RGB color on the monitor. How this looks like, is specified by the respective color table.

Bye Fridger

Posted: 08.03.2007, 19:35
by Cham
Then the second table may be usefull after all, depending on the monitor used. Actually, I've found that the enhanced colors are pretty on my monitor, despite that they appears to be a bit too strong for my taste (not very realistic).