Page 1 of 3
Celestia Start-Up Location
Posted: 24.10.2007, 13:16
by BobHegwood
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
Posted: 24.10.2007, 13:29
by selden
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.
Posted: 24.10.2007, 13:51
by selden
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.
Posted: 24.10.2007, 21:42
by BobHegwood
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.
Posted: 24.10.2007, 22:23
by BobHegwood
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
Posted: 24.10.2007, 22:28
by Cham
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.
Posted: 24.10.2007, 23:56
by BobHegwood
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.
Posted: 25.10.2007, 06:36
by chris
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
Posted: 25.10.2007, 09:54
by chris
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:
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
Posted: 25.10.2007, 10:27
by ElChristou
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?
Posted: 25.10.2007, 10:56
by selden
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.
Posted: 25.10.2007, 11:04
by chris
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
Posted: 25.10.2007, 11:12
by ElChristou
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.
Posted: 25.10.2007, 11:25
by cartrite
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
Posted: 25.10.2007, 11:28
by selden
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.
Posted: 25.10.2007, 11:50
by cartrite
chris,
I still get the white flash on startup even with the new build and all the changes. KDE-version 10252007.
cartrite
Posted: 25.10.2007, 12:37
by BobHegwood
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
Posted: 25.10.2007, 13:20
by selden
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.
Posted: 25.10.2007, 14:49
by cartrite
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
Posted: 25.10.2007, 16:30
by chris
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