Updated SolarSystemTour_v1.2.celx ready for download

Description: All about writing scripts for Celestia in Lua and the .cel system

TimMc
Topic author
TimMc
Topic author
Posts: 48
With us: 13 years 6 months
Location: Danbury, London, U.K.

#1by TimMc » 10.03.2004, 08:36

Hi folks.

I managed to reproduce the problem that some of you had when running the original script - that nothing happened after all the object textures were loaded. The script was reading an empty field in the pos_table, created by my sloppy programming of the filltable() function. Finding an empty line in a table does not seem to bother Celestia 1.3.1 final - it just moved the pointer on to the next row in the table, but it does seem to upset some of the more recent pre-releases of 1.3.2

I've now re-coded the filltable() function and added object numbering during the tour. I hope this will eliminate the problem under Celestia 1.3.2. Please let me know if the problem remains.

http://myweb.tiscali.co.uk/timmcmahon/SolarSystemTour_v1_2.zip

Thanks for testing this script.
Regards, Tim Mc

TERRIER
TERRIER
Posts: 714
With us: 14 years 4 months
Location: West Yorkshire, England

Re: Updated SolarSystemTour_v1.2.celx ready for download

#2by TERRIER » 11.03.2004, 02:15

TimMc wrote:Hi folks......
.... I hope this will eliminate the problem under Celestia 1.3.2. Please let me know if the problem remains.

http://myweb.tiscali.co.uk/timmcmahon/SolarSystemTour_v1_2.zip

Thanks for testing this script.
Regards, Tim Mc


I've just tried this out with your 'default' tour of the Solar system, Saturnian system and 61 Cyg A, and it is definately working ok for me!

AWSOME :!: , the 14 minute tour I've just had of Saturn was breathtaking, it is well worth downloading all of Jestrs moons, and installing Grants new rings to witness the most spectacular of visual tours! :D 8)
It also ran at very good framerates for me with just the odd stutter past my larger planet textures. It mainly ran at 60fps with AA@4x, AF@2x and image settings set at High Performance. :D

And to think, you can adapt this script to tour any system you want,

FANTASTIC :!:

regards
TERRIER

PS
This script also helped me to discover I had a Jupiter aurora texture installed that I had completely forgotten about :lol:
1.6.0:AMDAth1.2GHz 1GbDDR266:Ge6200 256mbDDR250:WinXP-SP3:1280x1024x32FS:v196.21@AA4x:AF16x:IS=HQ:T.Buff=ON Earth16Kdds@15KkmArctic2000AD:FOV1:SPEC L5dds:NORM L5dxt5:CLOUD L5dds:
NIGHT L5dds:MOON L4dds:GALXY ON:MAG 15.2-SAP:TIME 1000x:RP=OGL2:10.3FPS

Bob Hegwood
Bob Hegwood
Posts: 1048
With us: 13 years 11 months
Location: Germantown, Ohio - USA

#3by Bob Hegwood » 11.03.2004, 05:47

Tim,

Just ran the Solar System Tour script and it ran fine this time. :lol:

I *still* don't understand it, but it worked fine. Can I ask though... Why does it ignore some objects, and accept others?

Just curious.

Thanks, Bob
Bob Hegwood
Windows XP-SP2, 256Meg 1024x768 Resolution
Intel Celeron 1400 MHz CPU
Intel 82815 Graphics Controller
OpenGL Version: 1.1.2 - Build 4.13.01.3196
Celestia 1.4.0 Pre6 FT1

TimMc
Topic author
TimMc
Topic author
Posts: 48
With us: 13 years 6 months
Location: Danbury, London, U.K.

Why some objects ignored by SolarSystemTour

#4by TimMc » 11.03.2004, 08:29

Bob,

The script always ignores "invisible" objects (for obvious reasons - these are usually just place-holders to provide orbit centres for other objects), and "spacecraft", because they are usually too small to render as anything other than a dot when zooming past at a few thousand km/h many km away. I've tried adapting the script to create "SpacecraftTour.celx", but a lot more than just tweaking will need to be done. I'll let you know if I get one working.

All other objects are ignored because they don't match the user's specified objects for touring - e.g. if you specify to tour "planets&moons", asteroids and comets will be ignored, if just "planets", all other objects will be ignored (except the planetary system's star). You can tour all objects (except for invisibles and spacecraft) by specifying "all".

Thanks for trying the script. Thanks for the feedback too Terrier!

Regards, Tim Mc

TERRIER
TERRIER
Posts: 714
With us: 14 years 4 months
Location: West Yorkshire, England

#5by TERRIER » 11.03.2004, 11:29

Tim Mc

Is it easy for us to adjust the speed of the fly-bys?

One problem I'm having with your script is when touring Mars, Celestia crahes :( .
I have Jestr's Olympus Mons model/ texture installed (plus another model/ texture he has recently sent me of Ascraeus Mons), which seems to be causing the trouble. Perhaps the texture / model / moon placeholder combination is confusing the script ?

Anyway, i'm off now for a tour of the Katalina system.

regards
TERRIER
1.6.0:AMDAth1.2GHz 1GbDDR266:Ge6200 256mbDDR250:WinXP-SP3:1280x1024x32FS:v196.21@AA4x:AF16x:IS=HQ:T.Buff=ON Earth16Kdds@15KkmArctic2000AD:FOV1:SPEC L5dds:NORM L5dxt5:CLOUD L5dds:
NIGHT L5dds:MOON L4dds:GALXY ON:MAG 15.2-SAP:TIME 1000x:RP=OGL2:10.3FPS

TimMc
Topic author
TimMc
Topic author
Posts: 48
With us: 13 years 6 months
Location: Danbury, London, U.K.

#6by TimMc » 11.03.2004, 16:27

Hi Terrier
TERRIER wrote:Is it easy for us to adjust the speed of the fly-bys?
Yes. Simply increase the base_speed_timestep on line 53 in the script to a higher value - e.g. 4

Code: Select all

   -- base_speed_timestep is the amount of time we would (at current speed)
   -- need to reach next target: Don't set this too small,
   -- or we will miss targets and possibly hang the computer
   -- base_speed_timestep = 1.333
   base_speed_timestep = 4

This is the time (in seconds) that the script uses to move the observer to the next position if the speed remains the same. A higher value means a longer time to move to the next position, so movement is slower, and smoother if the next object has a large texture. Consequently, the script will take longer to run, although the time to run is not linearly related to the base_speed_timestep value. Try different values to get a speed you like, but beware of Harald's warning in the comment lines about making the value too small - the script could crash Celestia if you do!

One problem I'm having with your script is when touring Mars, Celestia crahes .
I have Jestr's Olympus Mons model/ texture installed (plus another model/ texture he has recently sent me of Ascraeus Mons), which seems to be causing the trouble. Perhaps the texture / model / moon placeholder combination is confusing the script ?
There is an easy fix for this one, which also has the spin-off of tidying up how Jestr's fantastic Olympus Mons model is shown in the forms arising from right-clicking on Mars. Simply make the placeholder an "invisible" class object, and Olympus Mons itself a "spacecraft" class. I have updated Jestr's SSC to read as follows:

Code: Select all

"Olympus" "Sol/Mars"
{
    Class "invisible"  #An invisible dummy body to provide a suitable orbit centre

    Radius 1
    EllipticalOrbit {
         ... etc.

"Olympus Mons" "Sol/Mars/Olympus"
{
    Class "spacecraft"   #Spacecraft so that it does not appear as a moon

    Mesh "mons.3DS"
    Radius 420

    EllipticalOrbit {
        ... etc.

You can tweak the SSC for Jestr's Gusev model similarly, if you have that on your system:

Code: Select all

"Craterplace" "Sol/Mars"
{
    Radius 5
    Class "invisible"  #An invisible dummy body to provide a suitable orbit centre

    EllipticalOrbit {
              ...

"GusevCrater" "Sol/Mars/Craterplace"
{
    Class "spacecraft"    #Spacecraft to stop Gusev appearing as a moon

    InfoURL "http://marsoweb.arc.nasa.gov/"
    Mesh "gusev.3ds"
    Radius 177

    EllipticalOrbit {
          ...

SolarSystemTour should now run without crashing Celestia. A necessary requirement for a script really!

Regards, Tim Mc

Harry
Harry
Posts: 559
With us: 14 years
Location: Germany

#7by Harry » 11.03.2004, 17:09

TimMc wrote:Try different values to get a speed you like, but beware of Harald's warning in the comment lines about making the value too small - the script could crash Celestia if you do!
:?: It should never crash/hang Celestia. I am not sure where that comment is coming from (it's not in my current versions of the solarsystem tour), so if I wrote that it must have been quite some time ago.

[...]There is an easy fix for this one, which also has the spin-off of tidying up how Jestr's fantastic Olympus Mons model is shown in the forms arising from right-clicking on Mars. Simply make the placeholder an "invisible" class object, and Olympus Mons itself a "spacecraft" class. I have updated Jestr's SSC to read as follows:[...]
SolarSystemTour should now run without crashing Celestia. A necessary requirement for a script really!

Can you be more specific on what causes the crash? No script should be able to crash Celestia (however it can mess up the display by setting an invalid orientation for the observer).

Harald

don
don
Posts: 1709
With us: 14 years 2 months
Location: Colorado, USA (7000 ft)

Re: Updated SolarSystemTour_v1.2.celx ready for download

#8by don » 12.03.2004, 02:09

TimMc wrote:I've now re-coded the filltable() function and added object numbering during the tour. I hope this will eliminate the problem under Celestia 1.3.2.

Howdy Tim,

It now runs fine under 1.3.1 *and* 1.3.2 pre5. Thanks for the fix!

-Don G.

TimMc
Topic author
TimMc
Topic author
Posts: 48
With us: 13 years 6 months
Location: Danbury, London, U.K.

#9by TimMc » 12.03.2004, 08:51

TimMc wrote: ...the script could crash Celestia if you do!
Harry wrote: It should never crash/hang Celestia. I am not sure where that comment is coming from (it's not in my current versions of the solarsystem tour), so if I wrote that it must have been quite some time ago... Can you be more specific on what causes the crash? No script should be able to crash Celestia (however it can mess up the display by setting an invalid orientation for the observer).

Sorry Harald, to misrepresent you. I have checked the original script of SolarSytemTour_v1.1 that I have on my system and your comment lines read as follows:

Code: Select all

-- base_speed_timestep is the amount of time we would (at current speed)
-- need to reach next target:
-- Don't set this too small, or we will miss targets
base_speed_timestep = 1
I added the comment "and possibly hang the computer" in my script after experimenting with the base_speed_timestep value. I should not have attributed it to you.
I'm not sure what Terrier means exactly when he says the script "crashed Celestia", but whatever happened is not related to the value of base_speed_timestep. Rather, it would have occured because the script tried to cause a fly-by of a "moon" placed internal to the planet of Mars, set as a placeholder around which to orbit the Olympus Mons model in Jestr's SSC for Olympus. For some reason, SolarSystemTour_v1.2 (and SolarSystemTour_v1.1 I suspect) does not like touring such an object, and behaves "anomolously". The problem is eliminated if the placeholder is set as an "invisible" body.
I hope that gives you enough information to work out what is going on.

Regards, Tim Mc

Harry
Harry
Posts: 559
With us: 14 years
Location: Germany

#10by Harry » 12.03.2004, 14:43

TimMc wrote:I added the comment "and possibly hang the computer" in my script after experimenting with the base_speed_timestep value. I should not have attributed it to you.
I am not worried about the attribution, only about possible crashes. So I am curious what made you add this comment, i.e. did it really hang your computer, or has there just been problems with the script not working correctly?

For some reason, SolarSystemTour_v1.2 (and SolarSystemTour_v1.1 I suspect) does not like touring such an object, and behaves "anomolously". The problem is eliminated if the placeholder is set as an "invisible" body. I hope that gives you enough information to work out what is going on.

Using it with non-standard bodies may certainly produce strange results, the script doesn't use any solid algorithm to find its way :( But I am reluctant to work on this much more, a complete rewrite would probably be better.

Harald

TimMc
Topic author
TimMc
Topic author
Posts: 48
With us: 13 years 6 months
Location: Danbury, London, U.K.

False alarm on script hanging the computer

#11by TimMc » 12.03.2004, 15:31

Harald
I have just run SolarSystemTour_1.2.celx multiple times with ever decreasing base_speed_timestep values (down to 0.03), and have not once caused my system to hang. So I don't know what came upon me to add the words "or possibly hang the computer" to your comment line. Sorry to have raised a false alarm.
I also tried touring a lunar object deliberately placed inside a planetary object. But again the script handled it okay and did not stop/hang/crash. So I don't know what "crah" (sic) Terrier was referring to in his post above. I don't think this script raises any issues in the Celestia core code.
Regards, Tim Mc

TERRIER
TERRIER
Posts: 714
With us: 14 years 4 months
Location: West Yorkshire, England

Re: False alarm on script hanging the computer

#12by TERRIER » 12.03.2004, 23:36

TimMc wrote:So I don't know what "crah" (sic) Terrier was referring to in his post above.


The crah :oops: , crash :lol: , I am referring to happens everytime I run the script for touring Mars only, using the;

checkandvisit("Sol/Mars","planets&moons") option.

When I run the script, it starts OK, with the usual "compiling list of objects to tour"

Then it starts to go through the "including" and "ignoring" routine, most of which I'm unable to read because it goes through the list very quickly.
When the program is about to crash, the screen pauses on a very nice view of the Olympus Mons model !
Before the screen goes white and the famous "Celestia has encountered a problem and needs to close down. We are sorry for any inconvieniece. Send error report/ Don't send error report" appears.

The settings I'm using for the Olympus Mons model (when Celestia crashes) are;

Code: Select all

"Olympus" "Sol/Mars"
{
Radius 1
EllipticalOrbit {
Period 1e12
SemiMajorAxis 1060.064713 #71.8 degrees from North pole
Inclination 90
MeanAnomaly 90
}
}

"Olympus Mons" "Sol/Mars/Olympus"
{
Mesh "mons.3DS"
Radius 420

EllipticalOrbit {
Period  1.025956869125
SemiMajorAxis 3224.1 #71.8 degrees from North pole
MeanLongitude 1.2
}
Orientation [18 1 0 0]
RotationOffset 270
Albedo 0.15
}


However if I add the lines you suggested Tim, Class "invisible" , and Class "spacecraft" thus;

Code: Select all

"Olympus" "Sol/Mars"
{
Class "invisible" #*************
Radius 1
EllipticalOrbit {
Period 1e12
SemiMajorAxis 1060.064713 #71.8 degrees from North pole
Inclination 90
MeanAnomaly 90
}
}

"Olympus Mons" "Sol/Mars/Olympus"
{
Class "spacecraft" #****************
Mesh "mons.3DS"
Radius 420

EllipticalOrbit {
Period  1.025956869125
SemiMajorAxis 3224.1 #71.8 degrees from North pole
MeanLongitude 1.2
}
Orientation [18 1 0 0]
RotationOffset 270
Albedo 0.15
}


and then run the Mars only script, it does not crash any more. I just end up inside the planet, probably at one of the invisible placeholders, when the script finishes.

Hope this clears things up a bit ?
Also wondering if I'm the only one with this problem ? :?

Cheers,
TERRIER
1.6.0:AMDAth1.2GHz 1GbDDR266:Ge6200 256mbDDR250:WinXP-SP3:1280x1024x32FS:v196.21@AA4x:AF16x:IS=HQ:T.Buff=ON Earth16Kdds@15KkmArctic2000AD:FOV1:SPEC L5dds:NORM L5dxt5:CLOUD L5dds:
NIGHT L5dds:MOON L4dds:GALXY ON:MAG 15.2-SAP:TIME 1000x:RP=OGL2:10.3FPS

Harry
Harry
Posts: 559
With us: 14 years
Location: Germany

#13by Harry » 13.03.2004, 11:37

Celestia doesn't crash for me when using the defintion of Olympus you posted. So I don't know if it's a problem with the scripting code, or maybe a problem somewhere else only triggered by the scripting code :(

Harald


Return to “Scripting”

Who is online (over the past 5 minutes)

Users browsing this forum: 2 guests