Star colors from temperature

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
makc
Posts: 18
Joined: 09.01.2007
With us: 17 years 10 months

Star colors from temperature

Post #1by makc » 11.01.2007, 16:32

searching on my own I came down to celestia-1.4.1\src\celengine\starcolors.cpp where it jumps to http://www.vendian.org/mncharity/dir3/blackbody/ where, in its turn, following is said:
These values show color chromaticity (hue and saturation), but ignore brightness.
what code handles that, or does celestia simply use RGB values from StarColors_Blackbody_2deg_D65 table to plot stars?

p.s.: StarColors_Enhanced is commented as "Approximate colors used by older versions of Celestia", I would like to know how were these values obtained, thanks.

p.p.s.: reading further at http://www.vendian.org/mncharity/dir3/b ... erent.html and http://www.vendian.org/mncharity/dir3/b ... eters.html one can come to conclusion that RGB values vary pretty much and constant color values should rather be stored in XYZ without any conversions done to them; then, one could calculate whitepoint based on Y values in the whole picture and then do conversion (this would lead to stars normally fading out when you're getting closer to some bright star or planet and, I think, if implemented properly, could cancel any need for users to manually adjust magnitude limit (I mention this because I once tried to do cel script zooming in from outside of Milky Way down to Earth, and it was very annoying to adjust that limit here and there :roll: )).
Last edited by makc on 11.01.2007, 17:25, edited 1 time in total.

symaski62
Posts: 610
Joined: 01.05.2004
Age: 41
With us: 20 years 6 months
Location: france, divion

Post #2by symaski62 » 11.01.2007, 17:12

windows 10 directX 12 version
celestia 1.7.0 64 bits
with a general handicap of 80% and it makes much d' efforts for the community and s' expimer, thank you d' to be understanding.

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Re: Star colors from temperature

Post #3by chris » 11.01.2007, 17:22

makc wrote:searching on my own I came down to celestia-1.4.1\src\celengine\starcolors.cpp where it jumps to http://www.vendian.org/mncharity/dir3/blackbody/ where, in its turn, following is said:
These values show color chromaticity (hue and saturation), but ignore brightness.
what code handles that, or does celestia simply use RGB values from StarColors_Blackbody_2deg_D65 table to plot stars?

Yes, Celestia just uses colors from this table.

p.s.: StarColors_Enhanced is commented as "Approximate colors used by older versions of Celestia", I would like to know how were these values obtained, thanks.


I simply chose values that I thought looked right. There's obviously an opportunity to do something more sophisticated here based on how the human eye responds to the blackbody colors.

--Chris

Topic author
makc
Posts: 18
Joined: 09.01.2007
With us: 17 years 10 months

Post #4by makc » 11.01.2007, 17:27

oops I edited my post without realizing that it has been answered (see above)

abusing edit button again: I do realize that full-blown XYZ support might be an overhead, but I think at least some sort of pre-computed RGB->RGB correction based on Y value would be worth of having.

Topic author
makc
Posts: 18
Joined: 09.01.2007
With us: 17 years 10 months

Post #5by makc » 11.01.2007, 17:43

Now when I tracked it down to Renderer::renderBodyAsParticle() I see this is a bit more complicated than just a color thing, right :? I will experiment a bit and get back with something, if anything, tomorrow......


Return to “Development”