• Advertisement

Archived

This topic is now archived and is closed to further replies.

Wavelength to RGB

This topic is 5947 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Does anyone here know how to convert a visible spectrum wavelength to a corresponding RGB value? I know that 700nm is red(ish) in color but I would like to have an RGB value. FYI. I have a catalog of over 110000 stars, and I am trying to create a realistic sky dome texture. Thanks in advance D.V.

Share this post


Link to post
Share on other sites
Advertisement
Well, remember that the wavelength will only tell you the hue, not the intensity or saturation unless I''m horribly mistaken. In which case, I would investigate the HSB to RGB algorithms and check out how the Hue component affects the RGB colour. I''m sure HSB->RGB help will be more readily available. Although I''m not sure whether the Hue scale corresponds to the wavelength of a colour, in which case, I''m sorry

Trying is the first step towards failure.

Share this post


Link to post
Share on other sites
I''m certain that the set of wavelengths do correlate to the HSB - and equally certain it''s not a linear mapping and a far cry from 1-to-1.

I think it''d require a table of experimentally and qualitatively determined values. Or you can look at a wavelength color chart and make some @$#$ up. Stars are so small to the eye that you can just set the brightness high and give them a little bit of a hue and call it good enough. Or is this an astronomy project?



Magmai Kai Holmlor
- Not For Rent

Share this post


Link to post
Share on other sites
Here''s a clever link for you! (There''s C code!)

http://www.fourmilab.ch/documents/specrend/

Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.

Share this post


Link to post
Share on other sites
GDNet never ceases to amaze me.

Thanks. This is exactly the information I was looking for. I *was* looking for some ballpark estimate, but you guys came up trumps!

Thanks again.



D.V.

Share this post


Link to post
Share on other sites
Speaking of sky/space textures, are you aware of the SGI digital galaxy at the new Hayden planetarium? I''ve seen the software running at the SIGGRAPH conference in 2000. Just amazing to see this in real-time 3D.

http://www.sgi.com/features/2000/jan/haydn/
http://www.sgi.com/features/2000/jan/haydn/images/lg_galaxy.jpg
http://www.sgi.com/features/2000/jan/haydn/images/lg_mars.jpg
http://www.amnh.org/rose/digitaldome.html

Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.

Share this post


Link to post
Share on other sites
Never been but I would like to go one day. I''ll wait until my son is old enough.

BTW check this out:
http://space.jpl.nasa.gov/

The accuracy is astounding, they have a couple of generated images based on the time and location of real images taken from voyager, and they are nearly identical.



D.V.

Share this post


Link to post
Share on other sites
I think that is saturn.

try this:

http://mars.jpl.nasa.gov/mgs/realtime/mgsrt.html




D.V.

Share this post


Link to post
Share on other sites

  • Advertisement