Page 1 of 4
Star textures in celestia.cfg
Posted: 06.12.2007, 22:14
by chris
Since there have been a lot of complaints about the appearance of stars, I want to add a new block to celestia.cfg to allow setting the default star textures for stars of various spectral classes. This would also remove some of the hardcoded texture names in stars.cpp, e.g. astar.jpg and browndwarf.jpg.
The new block would look like this:
StarTextures
{
A "astar.jpg"
B "bstar.jpg"
WD "whitedwarf.jpg"
Default " astar.jpg"
L "browndwarf.jpg"
T "browndwarf.jpg"
... etc ...
}
The default texture would be applied to all spectral types not explicitly assigned textures. There's only one white dwarf texture, but the appearance of white dwarfs probably varies strongly based on their temperature. My proposal doesn't address this; I think that white dwarfs should be rendered with a featureless white texture modulated by a color determined by their blackbody spectrum.
--Chris
Posted: 06.12.2007, 23:20
by BobHegwood
For what it's worth...
I very much LIKE this idea.
Thanks, Brain-Dead
Posted: 06.12.2007, 23:23
by Cham
Thanks Chris, I think this new feature, in the config file, is a great thing.
Posted: 07.12.2007, 00:00
by ElChristou
Yep, that's cool!
Posted: 07.12.2007, 00:13
by chris
Here's a patch file that you can test:
http://www.celestiaproject.net/~claurel/celest ... s/startex/
It includes a modified celestia.cfg file. Note that if you are using a custom celestia.cfg, you need to add new the new StarTextures block from celestia.cfg if you want to avoid getting completely featureless stars:
Code: Select all
#------------------------------------------------------------------------
# Default star textures for each spectral type
#
# The default textures may be overridden in individual star definitions.
#------------------------------------------------------------------------
StarTextures
{
# This texture will be used for any spectral type not listed
# in this block.
Default "astar.jpg"
O "bstar.*"
B "bstar.*"
A "astar.*"
F "astar.*"
G "gstar.*"
K "gstar.*"
M "mstar.*"
# carbon stars
C "mstar.*"
R "mstar.*" # former subclass of carbon star
N "mstar.*" # former subclass of carbon star
S "mstar.*" # roughly between M and C
# Wolf-Rayet stars
WC "bstar.*"
WN "bstar.*"
# brown dwarfs
L "browndwarf.*"
T "browndwarf.*"
# stellar remnants
WD "astar.jpg"
NeutronStar "astar.jpg"
}
The latest CVS code also has star coronas re-enabled. A future HDR version of Celestia will make them unnecessary, but for now they are back. I may add some setting to disable them for those (like myself) who prefer to not see them.
--Chris
Posted: 07.12.2007, 00:21
by Cham
Please Chris, include in your patch directory the complete cpp edited file, so I can compile it easily. Currently, I simply don't know how to apply a patch.
Posted: 07.12.2007, 00:36
by chris
Cham wrote:Please Chris, include in your patch directory the complete cpp edited file, so I can compile it easily. Currently, I simply don't know how to apply a patch.
You should just be able to go into your Celestia directory (the one containing celestia.cfg, the src directory, etc.) and run patch < startex.patch from the command line.
Anyhow, I've uploaded a zip file containing all the changed files:
http://www.celestiaproject.net/~claurel/celest ... tartex.zip
--Chris
Posted: 07.12.2007, 00:39
by Cham
Thanks, I'm recompiling.
But why is the new starTextures block defined twice in your config file ?
Posted: 07.12.2007, 00:39
by BobHegwood
Much appreciated by the Brain-Dead...
Thanks, Bob
Posted: 07.12.2007, 00:40
by chris
Cham wrote:Thanks, I'm recompiling.
But why is the new starTextures block is defined twice in your config file ?
Oops. That was an accident.
--Chris
Posted: 07.12.2007, 00:43
by Cham
chris wrote:Cham wrote:Thanks, I'm recompiling.
But why is the new starTextures block is defined twice in your config file ?
Oops. That was an accident.
--Chris
Hehee, I have a fast eye !
EDIT : actually, the starTexture block is repeated four times, not just twice !
Posted: 07.12.2007, 00:59
by Cham
Something is wrong, or there's something I don't understand.
The compilation went fine. But most (not all) stars are now featureless : no textures are showing on most stars, they are just glowing balls (with their new atmosphere, though). Editing the config file doesn't help yet.
Re: Star textures in celestia.cfg
Posted: 07.12.2007, 01:03
by Fenerit
chris wrote:
...
I think that white dwarfs should be rendered with a featureless white texture modulated by a color determined by their blackbody spectrum.
--Chris
If i do not presume too much, together with the HDRI, this sound as a path toward the procedural shading of the stars.
:?:
Posted: 07.12.2007, 01:12
by Cham
Cham wrote:Something is wrong, or there's something I don't understand.
The compilation went fine. But most (not all) stars are now featureless : no textures are showing on most stars, they are just glowing balls (with their new atmosphere, though). Editing the config file doesn't help yet.
Okay, I've found the bug : the star textures are only recognized if they are located in the
medres folder, NOT in the
hires folder. Now it's working. But why that limitation to the
medres folder ? It's a bit inconsistent with the rest.
By the way, try this : Jupiter's texture applied on a G2 star !
Posted: 07.12.2007, 01:17
by Fenerit
Cham, do you have some screenshots?
Posted: 07.12.2007, 13:53
by ajtribick
Perhaps the grading should be extended to allow different textures on different luminosity classes.
Posted: 07.12.2007, 18:52
by Guckytos
This sounds really, really good!
Finally the coronas are back AND the custom star textures for stellar families.
But I think Cham is right, it needs still some finetuning, so that high-res textures can also be loaded IF you have them in High-res folder AND switched to high-res mode.
I gather it from Chams post that that is not the case at the moment?
Now, if there would be a feature to tune the atmosphere and/or emissive spectra of a star, it would be perfect.
Changing the emissive spectra by defining prozentual absorption lines in the blackbody spectra perhaps?
So you could simulate stars at different ages, even while they are still within the main branch.
My 2 cents.
Regards,
Guckytos
Posted: 08.12.2007, 20:07
by chris
chaos syndrome wrote:Perhaps the grading should be extended to allow different textures on different luminosity classes.
Yes, that would be a good extension. What luminosity classes? I, II, III, IV, V, and VI (subdwarf)? I don't think it should be necessary to split it any more finely than that, e.g. Ia and Ib.
--Chris
Posted: 08.12.2007, 20:09
by Cham
Chris,
what about the folder used for the textures ? Currently, it's only the medres folder, and it's inconsistent with all the rest (can't use the lores and hires folders ?).
Posted: 08.12.2007, 20:30
by chris
Cham wrote:Chris,
what about the folder used for the textures ? Currently, it's only the medres folder, and it's inconsistent with all the rest (can't use the lores and hires folders ?).
Already fixed. I just haven't posted a new version of the patch yet.
EDIT: The changes are now checked into CVS.
--Chris