A lot of folks (including me) have been interested in adding new textures to existing stars or to new fictional stars they've just made up. It can be done. Here is an example of a new texture overlaid onto Gliese 581, a red dwarf about 20 LY from Earth.
A lot of folks have been confused on how to do this. At present, there is no current ability in Celestia 1.5.1 or 1.4.1 to "modify" a star entry in the database to add a texture. To do so, you have to create an add-on that contains the texture, and a star file called an ".stc" file, which tells Celestia what texture to add to a particular star. The process is not difficult, but can be confusing and a bit time-consuming, so I am offering this to you to explain how to do it. So ... here goes:
To Add a Different Texture to an Existing Star:
1. Create a folder for the texture add-on, name it whatever you want, and place it into your extras folder.
2. Create a sub-folder inside that named "textures".
3. Create a sub-folder inside the "textures" folder named "medres". Into it, place the star texture you wish to use. Make sure that texture is in the correct size format.
4. Copy these lines (in the quote box below) into a text file, and name it "starname.stc", where starname is the name of the star you are modifying. Substitute new values for each of 7 lines (including the top line)
5. Save the file in the add-on folder as an ".stc" file, next to the textures folder. Launch Celestia. Your new texture should be displayed on that star.
74995 "name" --- # the number is the HIP # for the star, and the name in quotes is any name you wish to add. If you don't wish to add a name, leave it out (list only the number)
{
RA 229.86478 --- # Right Ascension in decimal coordinates specific to the star - obtained from the Hipparcos database (see below), or from "stars.txt" (see below)
Dec -7.7220383 --- # Declination in decimal coordinates specific to the star - obtained from the Hipparcos database (see below), or from "stars.txt" (see below)
Distance 20.446777 --- # Distance in Light Years specific to the star - obtained from the Hipparcos database (see below), or from "stars.txt" (see below)
AppMag 10.56 --- # specific to the star - obtained from the Hipparcos database (see below), or from "stars.txt" (see below)
SpectralType "M3V" --- # specific to the star - obtained from the Hipparcos database (see below), or from "stars.txt" (see below)
Texture "Gliese581.png" --- # the texture name you want to use. Texture must be in the medres folder.
}
6. To obtain data for the star you are interested in, you can get it several ways, as follows:
a) Download the stars.txt data file that Celestia uses for its stars (most preferred). You can find it at: http://celestia.svn.sourceforge.net/viewvc/*checkout*/celestia/branches/ver1_5_1/celestia/data/stars.txt. Once downloaded and saved, look up your star by HIP #. The data will be listed in the order, HIP #, RA, Dec, Distance, Apparent Magnitude, SpectralType This is the preferred database to use, since this is the data Celestia is using.
b) Alternatively, go to the Hipparcos website at: http://webviz.u-strasbg.fr/viz-bin/VizieR?-source=I/239 and click the button labelled "I/239/hip_main". Type the HIP # or name of the star into the "target" field and submit the query. All the data you need for the STC file will be listed. Note you should use the RA and Dec "decimal" readings for position. The Spectral Type will sometimes be listed as an Spectral letter, or will be listed not as a letter such as O or B or M, but as a number called the "B-V". This number represents a numeric color index used to classify the color of stars. Celestia does not accept B-V numbers. In the STC file, you must convert it to a spectral class letter. To do so, use this H-R Diagram (copy and paste it somewhere convenient):
For example, a B-V Index of 1.600 would visually be about an M3 - M6 spectral class. There must be a "calculation" to directly convert B-V Indexes to Spectral Class letters (Celestia must use it internally), but I'm not sure how to do it. If anyone does know, please post a reply below. Thanks.
b) A 3rd alternative is to get the spectral class letter directly from the SIMBAD website at: http://simbad.u-strasbg.fr/simbad/sim-fid. You can enter the star HIP # or name in the Identifier field. You can also use this catalog for other stc values. However, before you do, open the "Output Options" tab menu, and change the "Coordinates" field to read "Decimal" instead of "sexagesimal" This will cause the RA and Dec to be displayed in decimal form, which you can use directly. Also note that the SimBad database does not always exactly match the stars database Celestia uses. If they are not a very close match, you may wind up with two stars in that spot, offset a bit from each other. For example, for Gliese 581, stars.txt lists it at RA 229.86478 degrees. Hipparcos lists it the same, as 229.86477439. SIMBAD lists it at 229.86177. In the SIMBAD query results, Magnitude will be listed as Apparent Magnitude under "Fluxes". Choose the "V" value.
Distance is listed as Parallax value. Take that value, and plug it into this formula: Distance = parallax angle from Simbad/1000 * 3.2616341. Use the result in your STC file. SpectralType in SIMBAD is listed directly.
To add a texture to a new fictional star, repeat the steps above, except simply make up values for the 7 lines of code in the stc file. You do not need to fool with catalogs or databases. Just be cautious that you do not place a fictional star on top of an existing star by accident. Choose a HIP number that is larger than say ... 400000.
I hope this has helped. I will try to create a WIKI posting of these instructions ASAP. Thanks again to the others on the forum who gave me help on how to do this.
Regards
Frank