Atmospheres: old vs new

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 8 months
Location: Seattle, Washington, USA

Post #21by chris » 07.08.2006, 22:04

Christophe wrote:
chris wrote:Strange . . . Could you send or post the contents of shaders.log?

http://epicycle.free.fr/celestia-shaders.log

Ah . . . the combination of atmospheric scatter, cloud shadows, and the night texture map are using up all available interpolants. Interpolants are the values passed written in the vertex shader and passed on to the pixel shader. I can change a few things around so that this particular shader will run, but we'll run past the limit again if there's another light source. I need to add some code to use multiple passes--one per light source--in those cases.

chris wrote:
And except at sunrise and sunset, the sky appears black.
It does? One of those images looks like a midday scene with a blue sky.

You're right, the problem is not linked to the position of the Sun in the sky but to the altitude of the point you're looking at. The sky is always black at the zenith, even at midday.


That's another known problem . . . The atmospheric scattering model only accounts for single scattering, i.e. light that was only affected by a single scattering event on it's way from the light source to the viewer. Multiple scattering is going to be too slow to simulate in real-time. It's similar to the problem simulating multiple bounces of light between solid surfaces--in interactive rendering, it's almost always just direct lighting that is considered. My workaround will probably be similar: adding an ambient factor that's a catch-all for light from second and higher order scattering.

--Chris

Avatar
selden
Developer
Posts: 10190
Joined: 04.09.2002
With us: 22 years
Location: NY, USA

Post #22by selden » 07.08.2006, 22:28

...we'll run past the limit again if there's another light source.


Oops. Exactly one of the situations I was hoping to test.
Selden

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

Post #23by symaski62 » 08.08.2006, 00:03

Christophe

h?© t?©l?©chager celestia "BETA" ?

Geforce 5200 FX et DXT 9.0c

:wink:
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.

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

Post #24by chris » 08.08.2006, 07:47

Christophe wrote:Chris, I tried the new code, with the atmosphere settings you posted. Here is what I get:

Turning off clouds or cloud shadows fixes it.


I just checked in a fix for this . . . We've got one extra interpolator now :) It's still possible to end up with a shader that's too complex, however. I've got some other things I'll be changing to reduce the number of interpolators.

--Chris

Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 8 months
Location: Nancy, France

Post #25by Vincent » 08.08.2006, 09:28

Chris,

The last CVS version crashes at start up on my system. That happens when Celestia loads the solarsys.ssc file. I know my graphics card can't display your great new atmosphere rendering. Celestia should start as well, though...
Last edited by Vincent on 08.08.2006, 15:40, edited 1 time in total.
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

danielj
Posts: 1477
Joined: 15.08.2003
With us: 21 years 1 month

Post #26by danielj » 08.08.2006, 15:11

Very cool!When will be available?


phoenix wrote:wow 8O
first the new specular-rendering and now this, incredibly fast and beautiful development chris ;)

Avatar
selden
Developer
Posts: 10190
Joined: 04.09.2002
With us: 22 years
Location: NY, USA

Post #27by selden » 08.08.2006, 15:16

Daniel,

If you can build from the source code that's on the SourceForge CVS server, it's available now.

I suspect it'll be at least several weeks before the official Windows prerelease will be available, though. There are several bugs that need to be fixed first, at least one of which causes a crash.
Selden

danielj
Posts: 1477
Joined: 15.08.2003
With us: 21 years 1 month

Post #28by danielj » 08.08.2006, 15:20

I am not a developer.I only post here because some foruns don??t update its posts and only useless Linux stuff have been posted there,recently.There is more than an week that nothing new is posted in Textures and Addon foruns.Bugs is to be posted in Bugs forum and not in Addons foruns.
selden wrote:Daniel,

If you can build from the source code that's on the SourceForge CVS server, it's available now.

I suspect it'll be at least several weeks before the official Windows prerelease will be available, though. There are several bugs that need to be fixed first, at least one of which causes a crash.
Last edited by danielj on 08.08.2006, 15:24, edited 1 time in total.

Avatar
selden
Developer
Posts: 10190
Joined: 04.09.2002
With us: 22 years
Location: NY, USA

Post #29by selden » 08.08.2006, 15:23

Daniel,

You don't have to be a developer to build from source code, although it does take a substantial amount of work to install the compiler and get it to work properly.
Selden

phoenix
Posts: 214
Joined: 18.06.2002
With us: 22 years 3 months
Location: Germany - Berlin

Post #30by phoenix » 08.08.2006, 15:43

instructions for building the cvs-source

but you could also try this windows-compiled celestia of today's cvs ;)

just replace it with your current celestia.exe (don't forget to backup the old one)
most recent celestia win32-SVN-build - use at your own risk (copy over existing 1.5.1 release)

Avatar
selden
Developer
Posts: 10190
Joined: 04.09.2002
With us: 22 years
Location: NY, USA

Post #31by selden » 08.08.2006, 15:50

Unfortunately, just putting the CVS exe into the Celestia v1.4.1 folder won't work. You also need to download the newest shader routines from
SourceForge
.
Selden

phoenix
Posts: 214
Joined: 18.06.2002
With us: 22 years 3 months
Location: Germany - Berlin

Post #32by phoenix » 08.08.2006, 15:58

ah ok...
sorry i missed that :oops:
*edit* updated the zip to include the shaders
most recent celestia win32-SVN-build - use at your own risk (copy over existing 1.5.1 release)

rra
Posts: 171
Joined: 17.07.2004
With us: 20 years 2 months
Location: The Netherlands

Post #33by rra » 08.08.2006, 17:11

phoenix wrote:ah ok...
sorry i missed that :oops:
*edit* updated the zip to include the shaders


tried that one but now it says it is missing the intl.dll file.
How can I get hold of this dll ??


Ren?©

Avatar
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Post #34by cartrite » 08.08.2006, 17:44

right here look at the last post from chris.
http://www.celestiaproject.net/forum/viewtopic ... ht=winlibs

don't forget to look at 5.0: Solar System Construction. at http://www.lepp.cornell.edu/~seb/celest ... notes.html.
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

phoenix
Posts: 214
Joined: 18.06.2002
With us: 22 years 3 months
Location: Germany - Berlin

Post #35by phoenix » 08.08.2006, 17:46

added the required libs to the zip waiting for the next files missing :lol:
most recent celestia win32-SVN-build - use at your own risk (copy over existing 1.5.1 release)

rra
Posts: 171
Joined: 17.07.2004
With us: 20 years 2 months
Location: The Netherlands

Post #36by rra » 08.08.2006, 18:20

I got it running , it actually needed only 2 DLL's (the one's you added already), nothing more.

Thanks very much.

Ren?©

DonAVP
Posts: 109
Joined: 01.12.2005
With us: 18 years 10 months
Location: SF BayArea

Post #37by DonAVP » 09.08.2006, 03:24

I am not a chemist or physis but maybe the lack of water vapor is effecting the inverse coloring you mentioned. Maybe someone with the above major could chime in on the effect.

Don
Don't know anything

Avatar
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Post #38by cartrite » 10.08.2006, 18:56

In the last few days most of my time was spent either starring at my screen 8O :P in awe at the stunning results of this new code or trying to understand this same code to see if I can get a clue as to how it works.
The veiw from space is incredible but I wondered if the view from near the surface could be improved. I get a sky overhead that is nearly black and the surface has no light just before sunset or after sunrise. Some sreenshots.

Image

Image

Image

Image

I've looked though the code and tried some experiments but had dissappointing results. Not shown here. I wondered if it were possible to increase the light duration on the lit side so the planet stays lit for about a half hour after sunset or before sunrise. Also if the sunangle could be used to control the skycolor where the sunangle at 12 o'clock lets the full skycolor in and gradually gives way to the effect of the scattering code during it's approach to sunset or from sunrise. By changing the skycolor and not the upper or lower atmosphere colors this should give the best of both if it were possible. All my attempts have failed.

cartrite
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

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

Post #39by chris » 10.08.2006, 20:06

cartrite wrote:I've looked though the code and tried some experiments but had dissappointing results. Not shown here. I wondered if it were possible to increase the light duration on the lit side so the planet stays lit for about a half hour after sunset or before sunrise. Also if the sunangle could be used to control the skycolor where the sunangle at 12 o'clock lets the full skycolor in and gradually gives way to the effect of the scattering code during it's approach to sunset or from sunrise. By changing the skycolor and not the upper or lower atmosphere colors this should give the best of both if it were possible. All my attempts have failed.

cartrite


For more background on simulating atmospheric scattering in computer graphics, you can have a look at this paper by Tomoyuki Nishita:

http://nis-lab.is.s.u-tokyo.ac.jp/~nis/ ... 93_nis.pdf

The code in Celestia is based upon this paper, though I've had to make some simplifications to make it fast enough for real-time. I'm still working on refining the code. The problem with skies being too dark at the zenith is one thing I'm trying to address. Another problem is that my approximations don't work so well with very thick atmospheres. I'll be able to overcome these limitations with some more effort (and hopefully not too much additional calculation in Celestia.)

The old atmosphere parameters--sky, lower, upper, and sunset colors--are ignored when the new atmosphere code is enabled. The new model is enabled for a model if the MieScaleHeight is set to something other than zero. I'll do something else for 1.5.0 final, possibly enabling new atmospheres for everything and having Celestia automatically convert the old parameters. Or rather, approximately convert them, since the two models are so different there's no way the new model can be made to give identical results to the old one.

I guess I should also mention that HazeColor isn't used when new atmospheres are enabled. HazeColor is a hack that's no longer necessary with physically based atmosphere modeling.

--Chris

Avatar
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Post #40by cartrite » 10.08.2006, 22:55

Chris wrote:
The old atmosphere parameters--sky, lower, upper, and sunset colors--are ignored when the new atmosphere code is enabled.


Mabey you should also have the height parameter ignored as well. I noticed that with the height parameter set below the value for MieScaleHeight these white marks around the planet's dark side go away. Now I have the height parameter set to 10. Before I left it set at 60. Now for some reason the skycolor overhead looks a little brighter. You can't make it too low, ie 2 for example, because the stars show through if you are above the height parameter. The low height setting also causes problems for the atmosphere in other rendering modes as one would expect.

Image

cartrite
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4


Return to “Ideas & News”