Celestia Start-Up Location

Report bugs, bug fixes and workarounds here.
Topic author
BobHegwood
Posts: 1803
Joined: 12.10.2007
With us: 17 years 1 month

Celestia Start-Up Location

Post #1by BobHegwood » 24.10.2007, 13:16

Hey there, it's me again...

No matter what I do to the start cel file, my version of Celestia
(1.5 Pre3) continues to begin life inside the Sun. Could we possibly
start Celestia from somewhere outside the Sun, say a distance of 20
radii away?

This is annoying because all I ever see when Celestia starts is a white
screen. This (I assume) is what the inside of the Sun is supposed to
look like?

At any rate, just another thought from 'ol Brain-Dead.
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

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #2by selden » 24.10.2007, 13:29

Bob,

Since you are the current caretaker of start.cel, for you to decide on a more appropriate starting point would be quite reasonable.

I think the real problem is that Celestia always starts at xyz = [0,0,0] which usually, but not always, is inside the Sun(*). An immediate goto with a minimal time duration might prevent an initial flash of a white screen.

p.s. Actually, seeing white means that you're outside the Sun and looking at its surface. The Sun is not visible from viewpoints which are inside it. Similarly, you can't see the Earth when your viewpoint is inside it.

____
* -- In Celestia v1.5.0, the Solar System's barycenter is defined to be [0,0,0] and the Sun orbits around it.
Selden

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #3by selden » 24.10.2007, 13:51

Bob,

I just verified that replacing the inital goto Sun by

Code: Select all

  select {object "Sol/Earth"}
  goto   {time 0.0  distance 60.0}
  wait   {duration 0.01}

prevents the initial white screen flash on my XP system.

That initial goto Sun was introduced because it was thought that it'd be best to always see the sunlit side of the Earth when Celestia starts. In older versions of Celestia, the solar system was not at [0,0,0] so as the Earth moved in its orbit, starting Celestia would cause the initial goto to approach the Earth from its night side for about half of the year.

Now that v1.5.0 has [0,0,0] at the Solar System's Barycenter, the initial approach to the Earth will always be toward its sunlit side, although there will be some unnoticable libration effects as the Sun moves around the barycenter.
Selden

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

Post #4by BobHegwood » 24.10.2007, 21:42

selden wrote:Bob,

p.s. Actually, seeing white means that you're outside the Sun and looking at its surface. The Sun is not visible from viewpoints which are inside it. Similarly, you can't see the Earth when your viewpoint is inside it.

____
* -- In Celestia v1.5.0, the Solar System's barycenter is defined to be [0,0,0] and the Sun orbits around it.


Not the case again, Selden. My Sun texture is dark now, almost orange via
Runar's add-on. I see WHITE, so it could be that star thing again. You know,
where sunspots disappear when they get to the center of the Sun. At any
rate, I'll see what I can do via the start cel. Thanks for the advice - again.
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
BobHegwood
Posts: 1803
Joined: 12.10.2007
With us: 17 years 1 month

Post #5by BobHegwood » 24.10.2007, 22:23

Selden?

Are you certain that we're using the SAME version of Celestia? No matter
what I do to 1.5 pre3, I simply CANNOT get away from the surface of the
Sun via a cel script. I tried your example, and I also tried using the
GOTOLONGLAT function to get away from the Sun prior to anything being
shown.

I still get the white screen no matter what I do. Just FYI.

If it were as simple as you made it sound, I would have changed it in
the code I already sent to you.

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

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

Post #6by Cham » 24.10.2007, 22:28

I have the same as Bob. Celestia is always starting at the Sun, with a large white screen, and it's annoying as hell ! Celestia is very agressive when it's starting.

Please, Chris, we need to change this ! 1.4.0 was better in this respect.
"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
BobHegwood
Posts: 1803
Joined: 12.10.2007
With us: 17 years 1 month

Post #7by BobHegwood » 24.10.2007, 23:56

Cham wrote:I have the same as Bob. Celestia is always starting at the Sun, with a large white screen, and it's annoying as hell ! Celestia is very agressive when it's starting.

Please, Chris, we need to change this ! 1.4.0 was better in this respect.


Thanks Martin...

At least now I know that it ain't just ME needing to go to the psycho ward.
Not just YET, anyway.

Thank Pal.
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

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

Post #8by chris » 25.10.2007, 06:36

Cham wrote:I have the same as Bob. Celestia is always starting at the Sun, with a large white screen, and it's annoying as hell ! Celestia is very agressive when it's starting.

Please, Chris, we need to change this ! 1.4.0 was better in this respect.


Celestia 1.4.1 appeared better only because the origin (and starting point for the camera) happened to fall ~200AU from the Sun. In Celestia 1.5.0, the origin was moved to the solar system barycenter, which is much closer to the Sun. The real problem (in all versions of Celestia) is that there's no way for a script to move the camera before the first frame is rendered. I'll work on fixing it.

--Chris

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

Post #9by chris » 25.10.2007, 09:54

Well, I haven't looked at the situation with cel scripts, but it looks like it might be very easy to have a cleaner startup sequence with celx scripts. I changed this line in celx.cpp:

Code: Select all

scriptAwakenTime(0.1),


I simply replaced 0.1 with 0.0. It works fine on Windows; if someone running Celestia on another OS would like to verify it there, I'll check in the fix.

Here's a nice start script to try out--a nice variation on the usual Earth zoom. You'll have to save it as start.celx, then InitScript in celestia.cfg to be start.celx instead of start.cel.

Code: Select all

-- Title: Spiral approach to object
-- Author: Chris Laurel


-- constants
km = 1.0/9460730.4725808
sec = 1.0/86400
deg = math.pi / 180

target = celestia:find("Sol/Jupiter")
sun = celestia:find("Sol")

startdist = 1000000*km
enddist = 250000*km

-- moveduration = 10*sec
-- startangle = 0
-- angle = math.pi


function smoothstep(x)
   return (3 - 2 * x) * x * x
end


function spiral_approach(params)
   local obs = celestia:getobserver()

   -- Get the parameters
   local target = params.target or celestia:find("Sol/Earth")
   local sun = params.sun or celestia:find("Sol")
   local duration = params.duration or 10*sec
   local startangle = params.startangle or 0
   local endangle = params.endangle or math.pi
   local startdist = params.startdist or target:radius()*km * 20
   local enddist = params.enddist or target:radius()*km * 4

   obs:follow(target)
   celestia:select(target)

   -- Get the sun direction
   local dir = sun:getposition():vectorto(target:getposition())
   dir = dir:normalize()

   -- Get the orbital velocity vector for the target
   local vel = target:getposition(celestia:gettime() + 0.1) - target:getposition()
   vel = vel:normalize()

   local start = celestia:gettime()

   local v = celestia:newvector(0, 0, 0)

   -- set the observer position over the duration
   while celestia:gettime() < start + duration do

      -- smoothly interpolate distance and angle
      local t = (celestia:gettime() - start) / duration
      t = smoothstep(t)
      local dist = startdist + t * (enddist - startdist)
      local theta = startangle + t * (endangle - startangle)

      v = -math.cos(theta) * dir + math.sin(theta) * vel

      obs:setposition(target:getposition() + v * dist)
      obs:lookat(target:getposition(), celestia:newvector(0.0, 1.0, 0.0))

      wait(0)
   end
end

celestia:find("Sol/Earth"):preloadtexture()
celestia:find("Sol/Earth/Moon"):preloadtexture()

spiral_approach{
       target = celestia:find("Sol/Earth"),
       sun = celestia:find("Sol"),
       startdist = 300000*km,
       enddist = 30000*km,
       startangle = 180*deg,
       endangle = 0*deg,
       duration = 10*sec
    }




--Chris

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

Post #10by ElChristou » 25.10.2007, 10:27

chris wrote:...Here's a nice start script to try out--a nice variation on the usual Earth zoom. You'll have to save it as start.celx, then InitScript in celestia.cfg to be start.celx instead of start.cel...


Despite changing the cfg file (I use a celx at start since some time now), the script only work via the script menu on osX... someone confirm?
Image

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #11by selden » 25.10.2007, 10:56

Chris' new celx startup script works for me in that the viewpoint spirals in on the Earth when Celestia starts.

Unfortunately, I still get a white flash when Celestia starts when using the celx init script.

I do *not* see a flash when using the .cel script which has a 0 delay in the first of two goto Earth commands.

I'm guessing that this is related to system performance and how soon the system starts displaying graphics after Celestia starts.

Possibly the celx script takes slightly longer to start moving the viewpoint on my system than does the .cel script: some systems will see the flash with both scripts and some will not see it with either.
Selden

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

Post #12by chris » 25.10.2007, 11:04

selden wrote:Chris' new celx startup script works for me in that the viewpoint spirals in on the Earth when Celestia starts.

Unfortunately, I still get a white flash when Celestia starts when using the celx init script.

I do *not* see a flash when using the .cel script which has a 0 delay in the first of two goto Earth commands.

I'm guessing that this is related to system performance and how soon the system starts displaying graphics after Celestia starts.

Possibly the celx script takes slightly longer to start moving the viewpoint on my system than does the .cel script: some systems will see the flash with both scripts and some will not see it with either.


Selden,

Do I understand correctly that you see the white flash even after making the modification to celx.cpp that I mentioned?

--Chris

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

Post #13by ElChristou » 25.10.2007, 11:12

I suppose my problem is due to the loading time of textures... I get sometime part of the script but not the nice spiral seen when loaded from script menu... memory problem for sure.
Image

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

Post #14by cartrite » 25.10.2007, 11:25

I also get a white flash on startup. I even renamed start.cel so there it would not be used. But I noticed the approach to earth was different so the celx script had to be used. I made the change to celx.cpp, , deleted file celx.o and celestiacore.o, recompiled, and used the code for start.celx. I was using KDE ver 09/09/20007. I am going to try a complete rebuild ver 10/25/2007.
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

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #15by selden » 25.10.2007, 11:28

Chris,

Sorry: I forgot to do that.

After changing the script awaken time to 0 and recompiling, I see no flash!

p.s. Still, I'm sure there are system performance issues which would still let the flash be seen. There is a barely noticable pause on my system between the time the outline of Celestia's graphics window appears and the time the first graphics appears within it. Some systems may display a flash during the interval when I don't see any graphics.
Selden

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

Post #16by cartrite » 25.10.2007, 11:50

chris,
I still get the white flash on startup even with the new build and all the changes. KDE-version 10252007.
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
BobHegwood
Posts: 1803
Joined: 12.10.2007
With us: 17 years 1 month

Post #17by BobHegwood » 25.10.2007, 12:37

While - admittedly - I don't know what the hell I'm doing here, I don't see
a "flash." On my new system, I see a white screen for approximately 3
seconds before ANY kind of script starts displaying Celestia from the
viewpoint selected. Personally, I LIKED the 200 au away approach. Was
lots cleaner and allowed your start scripts to take you from a nice, star-
filled scene to the Sun for a quick look, and then to the Earth.

Was a lot better that way. Just my opinion though.
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

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #18by selden » 25.10.2007, 13:20

Bob,

Which version of Nvidia graphics drivers is installed?]
The current version for Vista is 163.69, released about 6 weeks ago.

I seem to recall you mentioning how slow some types of graphics are, which might be related to how long you're seeing the Sun when Celestia starts, and which might be improved in the current version of ForceWare if you don't have it yet.
Selden

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

Post #19by cartrite » 25.10.2007, 14:49

With the windows version, after the splash screen disappears, a transparent window appears for a second and then starts at a distance from the sun. No white screen in the beginning. I guess that the kde version is rendering the white screen while the windows version's screen is transparent.
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

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

Post #20by chris » 25.10.2007, 16:30

cartrite wrote:With the windows version, after the splash screen disappears, a transparent window appears for a second and then starts at a distance from the sun. No white screen in the beginning. I guess that the kde version is rendering the white screen while the windows version's screen is transparent.


That seems likely: that the white you see at startup with the KDE version is actually the background color of the window, and not the Sun. It seems like it should be easy to set a window property that makes the background color black. I'm glad to hear that the flash is eliminated on the Windows version.

--Chris


Return to “Bugs”