Star textures in celestia.cfg

Discussion forum for Celestia developers; topics may only be started by members of the developers group, but anyone can post replies.
Topic author
chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Star textures in celestia.cfg

Post #1by chris » 06.12.2007, 22:14

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

BobHegwood
Posts: 1803
Joined: 12.10.2007
With us: 17 years 1 month

Post #2by BobHegwood » 06.12.2007, 23:20

For what it's worth...

I very much LIKE this idea. :wink:

Thanks, Brain-Dead
Brain-Dead Geezer Bob is now using...
Windows Vista Home Premium, 64-bit on a
Gateway Pentium Dual-Core CPU E5200, 2.5GHz
7 GB RAM, 500 GB hard disk, Nvidia GeForce 7100
Nvidia nForce 630i, 1680x1050 screen, Latest SVN

Avatar
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 10 months
Location: Montreal

Post #3by Cham » 06.12.2007, 23:23

Thanks Chris, I think this new feature, in the config file, is a great thing.
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"

ElChristou
Developer
Posts: 3776
Joined: 04.02.2005
With us: 19 years 9 months

Post #4by ElChristou » 07.12.2007, 00:00

Yep, that's cool!
Image

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

Post #5by chris » 07.12.2007, 00:13

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

Avatar
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 10 months
Location: Montreal

Post #6by Cham » 07.12.2007, 00:21

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. Image
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"

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

Post #7by chris » 07.12.2007, 00:36

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. Image


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

Avatar
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 10 months
Location: Montreal

Post #8by Cham » 07.12.2007, 00:39

Thanks, I'm recompiling.

But why is the new starTextures block defined twice in your config file ?
Last edited by Cham on 07.12.2007, 00:41, edited 1 time in total.
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"

BobHegwood
Posts: 1803
Joined: 12.10.2007
With us: 17 years 1 month

Post #9by BobHegwood » 07.12.2007, 00:39

chris wrote:Anyhow, I've uploaded a zip file containing all the changed files:

http://www.celestiaproject.net/~claurel/celest ... tartex.zip

--Chris


Much appreciated by the Brain-Dead... :wink:

Thanks, Bob
Brain-Dead Geezer Bob is now using...
Windows Vista Home Premium, 64-bit on a
Gateway Pentium Dual-Core CPU E5200, 2.5GHz
7 GB RAM, 500 GB hard disk, Nvidia GeForce 7100
Nvidia nForce 630i, 1680x1050 screen, Latest SVN

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

Post #10by chris » 07.12.2007, 00:40

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

Avatar
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 10 months
Location: Montreal

Post #11by Cham » 07.12.2007, 00:43

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 !
Last edited by Cham on 07.12.2007, 01:03, edited 1 time in total.
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"

Avatar
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 10 months
Location: Montreal

Post #12by Cham » 07.12.2007, 00:59

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.
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"

Avatar
Fenerit M
Posts: 1880
Joined: 26.03.2007
Age: 17
With us: 17 years 7 months
Location: Thyrrenian sea

Re: Star textures in celestia.cfg

Post #13by Fenerit » 07.12.2007, 01:03

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. 8):?:
Never at rest.
Massimo

Avatar
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 10 months
Location: Montreal

Post #14by Cham » 07.12.2007, 01:12

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 ! :mrgreen:
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"

Avatar
Fenerit M
Posts: 1880
Joined: 26.03.2007
Age: 17
With us: 17 years 7 months
Location: Thyrrenian sea

Post #15by Fenerit » 07.12.2007, 01:17

Cham, do you have some screenshots?
Never at rest.
Massimo

ajtribick
Developer
Posts: 1855
Joined: 11.08.2003
With us: 21 years 3 months

Post #16by ajtribick » 07.12.2007, 13:53

Perhaps the grading should be extended to allow different textures on different luminosity classes.

Guckytos
Posts: 439
Joined: 01.06.2004
With us: 20 years 5 months
Location: Germany

Post #17by Guckytos » 07.12.2007, 18:52

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

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

Post #18by chris » 08.12.2007, 20:07

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

Avatar
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 10 months
Location: Montreal

Post #19by Cham » 08.12.2007, 20:09

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 ?).
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"

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

Post #20by chris » 08.12.2007, 20:30

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


Return to “Ideas & News”