New Tour of Mars Script.

All about writing scripts for Celestia in Lua and the .cel system
ANDREA
Posts: 1543
Joined: 01.06.2002
With us: 22 years 8 months
Location: Rome, ITALY

Post #41by ANDREA » 30.12.2003, 01:03

selden wrote:Andrea, You wrote
And the same for the Lowell's Mars Channels, obviously.
Obviously you do show them, right? ;)

Not yet Selden, I need some time to understand how to convince Celestia that it must load the alternate texture. :roll:
There is no information in Don's manual about the use of alternate textures in scripts. :cry:
Before using my final system, i.e. to create the tenth Solar System planet, Mars2, same size and characteristics of Mars but with Lowell's texture and another position along the same Martian orbit, :twisted: I'll better check your last posts in order to try to understand if it's possible to use both alttextures and normal textures using scripts, or not. :?:
By soon

Andrea
"Something is always better than nothing!"
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB-WIN 11 PRO

Harry
Posts: 559
Joined: 05.09.2003
With us: 21 years 4 months
Location: Germany

Post #42by Harry » 30.12.2003, 01:53

ANDREA wrote:Not yet Selden, I need some time to understand how to convince Celestia that it must load the alternate texture. :roll:
There is no information in Don's manual about the use of alternate textures in scripts. :cry:


How about the "setsurface" command? 8)

Code: Select all

setsurface { name "Name of AltSurface as shown in Menu" }


Harald

don
Posts: 1709
Joined: 12.07.2003
With us: 21 years 6 months
Location: Colorado, USA (7000 ft)

Post #43by don » 30.12.2003, 06:32

Andrea and Harald,

Sorry, this is new to me and I was not sure exactly how to activate an Alternate Surface.

I believe the Alternate Surface must first be defined in the solarsys.ssc file, such as the Limit of Knowledge surfaces are defined for each object:

Code: Select all

AltSurface "limit of knowledge" "Sol/Mercury"


Where "limit of knowledge" would be the file name of the alternate texture (no path), and "Sol/Mercury" is the object name that will have the alternate texture associated with it.

Then, you can use the setsurface command in a .CEL script to activate the pre-defined surface.

Does this work for you Andrea? Please let us know so I can add it to the Scripting Guide.

Cheers,

-Don G.

ANDREA
Posts: 1543
Joined: 01.06.2002
With us: 22 years 8 months
Location: Rome, ITALY

Post #44by ANDREA » 30.12.2003, 11:21

don wrote:Andrea and Harald, Sorry, this is new to me and I was not sure exactly how to activate an Alternate Surface. I believe the Alternate Surface must first be defined in the solarsys.ssc file, such as the Limit of Knowledge surfaces are defined for each object:

Code: Select all

 AltSurface "limit of knowledge" "Sol/Mercury"

Where "limit of knowledge" would be the file name of the alternate texture (no path), and "Sol/Mercury" is the object name that will have the alternate texture associated with it. Then, you can use the setsurface command in a .CEL script to activate the pre-defined surface. Does this work for you Andrea? Please let us know so I can add it to the Scripting Guide. Cheers, -Don G.

Hello Don, I followed your information as follows: 8)

Here are the data in my solarsys.ssc:

AltSurface "plmars2v3" "Sol/Mars"
{
Texture "plmars2v3.jpg"
#BumpMap "marsbump.*"
#BumpHeight 2.5
}

And here is how I applied them in the Bob's script:

#---------------------------------------------------------------------
# Select Mars as our destination and approach.
#---------------------------------------------------------------------
#
select {object "Sol/Mars"}
setsurface {name "plmars2v3.jpg"}
timerate {rate 1000.0}
goto {time 3.0 distance 4.5}
wait {duration 4.0}
print {text "In the past times astronomers saw on Mars\nregular channels, evidenly artificially created by intelligent beings.\nBut the realty is very different, surely without Martians ready to invade the Earth" row -5 column 1}
wait {duration 12.0}
preloadtex {object "Mars-Shaded-16K.dds"}
setsurface {name "Mars-Shaded-16K.dds"}
timerate {rate 1000.0}
goto {time 8.0 distance 5.0}
print {text "Welkome to the Mars Tour.\nEverything you'll see here is absolutely real,\nobtained by photographs taken in the last years by satellites and probes" row -5 column 1}
wait {duration 8.0}

The result is that, after a few seconds, before showing the first text, the 16k texture appears, without showing the Percival Lowell's drawing. 8O
Then the show goes on without problems. 8O
Where did I mistake? :oops:
Thank you Don for your patience. :wink:

Andrea :D
"Something is always better than nothing!"
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB-WIN 11 PRO

Harry
Posts: 559
Joined: 05.09.2003
With us: 21 years 4 months
Location: Germany

Post #45by Harry » 30.12.2003, 16:35

ANDREA wrote:setsurface {name "plmars2v3.jpg"}

I think here you have to use the name of the texture instead of its filename.

ANDREA wrote:preloadtex {object "Mars-Shaded-16K.dds"}


preloadtex takes the name of the object as its argument, not the texture itself. In this case that would be "Mars" (Don, I think this is an error in your guide)

Harald

ANDREA
Posts: 1543
Joined: 01.06.2002
With us: 22 years 8 months
Location: Rome, ITALY

Post #46by ANDREA » 30.12.2003, 18:30

Harry wrote:
ANDREA wrote:setsurface {name "plmars2v3.jpg"}
I think here you have to use the name of the texture instead of its filename.
ANDREA wrote:preloadtex {object "Mars-Shaded-16K.dds"}
preloadtex takes the name of the object as its argument, not the texture itself. In this case that would be "Mars" (Don, I think this is an error in your guide) Harald

Hello Harald, I'm sorry but I haven't been able to make it work. :oops:
Anyhow now I have the script starting as I prefer, showing first Mars with Lowell's channels, and later on with TRUE Mars texture. :D
I installed in the solsys.ssc the Mars2 planet, and it works OK. :wink:
Now I'm trying to solve another problem regarding the Sojourner Rover on Mars. :?
When done, I'll post the full script and the solarsys mod. :twisted:
By soon.

Andrea :D
"Something is always better than nothing!"
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB-WIN 11 PRO

ANDREA
Posts: 1543
Joined: 01.06.2002
With us: 22 years 8 months
Location: Rome, ITALY

Post #47by ANDREA » 30.12.2003, 22:09

[quote="ANDREA]
Now I'm trying to solve another problem regarding the Sojourner Rover on Mars. :? When done, I'll post the full script and the solarsys mod. :twisted: By soon. Andrea :D[/quote]

Well, it has been easier than what I supposed, even if it's not so elegant. :evil:
Here is the addition to the solarsys.ssc that must be inserted after Deimos data:

-------------------------------------------------------------------------------------

"Mars2" "Sol"
{
Texture "plmars2v3.jpg"
# Texture "mars8k.dds"
BumpMap "marsbump.*"
BumpHeight 2.5
Color [ 1 0.75 0.7 ]
HazeColor [ 1 1 1 ]
HazeDensity 0.45
Radius 3396 # equatorial
# Oblateness 0.0069

Atmosphere {
Height 30
Lower [ 0.8 0.6 0.6 ]
Upper [ 0.7 0.3 0.3 ]
Sky [ 0.83 0.75 0.65 ]
Sunset [ 0.7 0.7 0.8 ]
CloudHeight 10
CloudSpeed 0
CloudMap "mars_clouds_2Kx2k.dds"
# Slightly bluish sunset, as seen in true color pictures
# from Pathfinder
}

CustomOrbit "Mars2"
EllipticalOrbit
{
Period 1.8809
SemiMajorAxis 1.5237
Eccentricity 0.0934
Inclination 1.8506
AscendingNode 49.479
LongOfPericenter 236.041
MeanLongitude 355.453
}

RotationPeriod 24.622962
Obliquity 26.72
EquatorAscendingNode 82.91
RotationOffset 136.005

Albedo 0.150

}
-------------------------------------------------------------------------

And following is the script that I modified a bit in order to show Mars with the Lowell's channels, the Pathfinder/Sojourner Rover on Mars, and something else.: :)
--------------------------------------------------------------------------

{
#------------------------------------------------------------------------
# Mars.cel V5: Touring Mars
#
# Original script provided by Alan Federman.
# Highly modified and commented by S.Ball 20 Feb 2003.
# Modified by Bob Hegwood on 22 Nov 03. Corrected Longitudes/Latitudes
# for visited features, added more tourist traps and a look at the Moons.
# Some changes and additions by Andrea Pelloni on Dec 30th, 2003
#------------------------------------------------------------------------
#
# Set up Celestia for 800 x 600 display.
#
# Do not render the following objects...
renderflags { clear "orbits|constellations|comettails|boundaries|cloudmaps" }
renderflags { clear "eclipseshadows|pointstars|nightmaps|galaxies|markers" }

# Do not label the following objects...
labels { clear "planets|moons|spacecraft|asteroids|constellations|stars|galaxies" }

# Set Ambient Light Level (0.0 to 1.0 is a good Lo-Hi range)...
set { name "AmbientLightLevel" value 0.80 }

# Set Field of View (Celestia 1.3.1 dflt = 25)...
set { name "FOV" value 35.0}
#
#---------------------------------------------------------------------
# Select imaginary and real Mars as our destination and approach.
#---------------------------------------------------------------------
#
select {object "Sol/Mars2"}
timerate {rate 1.0}
goto {time 6.0 distance 9.0}
wait {duration 6.0}
print {text "Nel passato gli astronomi hanno creduto di\nvedere su Marte una rete di canali creati da esseri intelligenti.\nMa per fortuna la realta' e' molto diversa, e fortunatamente senza marziani pronti ad invadere la Terra" row -5 column 1}
wait {duration 10.0}
select {object "Sol/Mars"}
preloadtex {object "Mars"}
renderflags {set "cloudmaps"}
timerate {rate 1000.0}
goto {time 2.0 distance 5.2}
print {text "Benvenuti a questa visita di Marte!\nTutto quello che vedrete e' reale, basato\nsu foto riprese in questi anni da sonde e satelliti" row -5 column 1}
wait {duration 14.0}
#
#---------------------------------------------------------------------
# Repeat text in subsequent messages to keep the context for reader.
#---------------------------------------------------------------------
#
print {text "Marte e' molto piu' piccolo della Terra," row -5 column 1}
wait {duration 5.0}
print {text "Marte e' molto piu' piccolo della Terra,\n6.794 Km, ma ha molte caratteristiche simili ad essa. Infatti" row -5 column 1}
wait {duration 5.0}
print {text "Marte e' molto piu' piccolo della Terra,\n6.794 Km, ma ha molte caratteristiche simili ad essa. Infatti\nha le stagioni, le calotte polari, un'atmosfera con nuvole ed un giorno di circa 24 ore" row -5 column 1}
wait {duration 8.0}
print {text "Ora eliminiamo le nubi in modo da\npoter vedere piu' chiaramente le caratteristiche della sua superficie" row -4 column 1}
wait {duration 5.0}
renderflags {clear "cloudmaps"}
wait {duration 5.0}
#
#------------------------------------------------------------------
# Begin visiting the tourist traps, starting with the North Pole.
#------------------------------------------------------------------
#
gotolonglat {time 4 distance 3.0 longitude -135 latitude 90}
print {text "Ecco il Polo Nord." origin "center" column 8}
wait {duration 5.0}
print {text "Ecco il Polo Nord.\nNotate la superficie ghiacciata!\nEssa e' ampia perche' siamo in inverno" origin "center" column 8}
wait {duration 6.0}
#
#------------------------------------------------------------------
# Compare with the South Pole.
#------------------------------------------------------------------
#
gotolonglat {time 4 distance 3.0 longitude 0 latitude -90}
print {text "Ecco il Polo Sud." origin "center" column 8}
wait {duration 5.0}
print {text "Ecco il Polo Sud.\nQui c'e' veramente poco\nghiaccio, perche' ora siamo in estate!" origin "center" column 8}
wait {duration 7.0}
#
#------------------------------------------------------------------
# Display Olympus Mons.
#------------------------------------------------------------------
#
synchronous { }
print {text "Ora andiamo verso..." row -4 column 1}
wait {duration 2.0}
gotolonglat {time 2.0 distance 3.0 longitude 226 latitude 18.8}
wait {duration 4.0}
print {text "il fantastico Monte Olimpo..." row -4 column 1}
goto {time 4.0 distance 2.2}
wait {duration 4.0}
timerate {rate 100.0}
wait {duration 3.0}
print {text "Questo e' il piu' grande vulcano conosciuto\ndel Sistema Solare. E' alto quasi 27 Km ed ha un diametro" row -5 column 1}
goto {time 3.0 distance 1.7}
wait {duration 5.0}
print {text "Questo e' il piu' grande vulcano conosciuto\ndel Sistema Solare. E' alto quasi 27 Km ed ha un diametro\ndi oltre 500 Km, ed i suoi spettacolari fiumi di lava sono ben visibili a nord" row -5 column 1}
wait {duration 5.0}
#
#------------------------------------------------------------------
# Display the volcanoes on the Tharsis Plateau
#------------------------------------------------------------------
#
print {text "Altri tre enormi vulcani sono presenti" row -4 column 1}
gotolonglat {time 2 distance 3.2 longitude 247.5 latitude 1.2}
wait {duration 4.0}
goto {time 3.0 distance 2.3}
print {text "Altri tre enormi vulcani sono presenti\nnel Pianoro Tharsis. Essi sono, a partire dall'alto..." row -4 column 1}
wait {duration 5.0}
unmark {object "Sol/Mars"}
unmark {object "Sol/Mars/Ascraeus Mons"}
renderflags {set "markers"}
mark {object "Sol/Mars/Ascraeus Mons" size 40 color [0 0 0] symbol "plus"}
print {text "il Mons Ascraeus..." row -4 column 1}
wait {duration 5.0}
unmark {object "Sol/Mars/Ascraeus Mons"}
unmark {object "Sol/Mars/Pavonis Mons"}
mark {object "Sol/Mars/Pavonis Mons" size 40 color [0 0 0] symbol "plus"}
print {text "Il Mons Pavonis..." row -4 column 1}
wait {duration 5.0}
unmark {object "Sol/Mars/Pavonis Mons"}
unmark {object "Sol/Mars/Arsia Mons"}
mark {object "Sol/Mars/Arsia Mons" size 40 color [0 0 0] symbol "plus"}
print {text "ed il Mons Arsia, il cui cratere e' largo 110 Km!" row -4 column 1}
wait {duration 5.0}
unmark {object "Sol/Mars/Arsia Mons"}
renderflags {clear "markers"}
gotolonglat {time 5 distance 1.4 longitude 238.9 latitude -8.4}
wait {duration 8.0}
#
#------------------------------------------------------------------
# Display Vallis Marineris
#------------------------------------------------------------------
#
print {text "Ad est possiamo ammirare la stupenda Vallis Marineris" row -3 column 1}
gotolonglat {time 8.0 distance 3 longitude 290.8 latitude -10.8}
wait {duration 8.0}
goto {time 3.0 distance 2.3}
wait {duration 5.0}
print {text "Si suppone che nel passato di Marte" row -5 column 1}
wait {duration 5.0}
print {text "Si suppone che nel passato di Marte\nl'attivita' vulcanica abbia prodotto terribili inondazioni" row -5 column 1}
wait {duration 5.0}
print {text "Si suppone che nel passato di Marte\nl'attivita' vulcanica abbia prodotto terribili inondazioni\nche nel tempo hanno creato questa spettacolare serie di canyon e crepacci" row -5 column 1}
wait {duration 5.0}
print {text "La Vallis Marineris e' cosi' grande" row -6 column 1}
wait {duration 4.0}
print {text "La Vallis Marineris e' cosi' grande\nche la sua lunghezza potrebbe andare da" row -6 column 1}
wait {duration 5.0}
print {text "La Vallis Marineris e' cosi' grande\nche la sua lunghezza potrebbe andare da\nRoma a Dubai negli Emirati Arabi, ed ancora oltre!" row -6 column 1}
print {text "La Vallis Marineris e' cosi' grande\nche la sua lunghezza potrebbe andare da\nRoma a Dubai negli Emirati Arabi, ed ancora oltre!\nInfatti e' lunga oltre 4.000 Km, ed e' profonda fino a 7 Km" row -6 column 1}
wait {duration 5.0}
goto {time 3.0 distance 1.4}
wait {duration 5.0}
print {text "Su Marte rimane tuttora un grande" row -5 column 1}
wait {duration 5.0}
print {text "Su Marte rimane tuttora un grande\nmistero: dove e' andata a finire tutta l'acqua,\noltre a quella poca che e' rimasta nelle calotte polari?" row -5 column 1}
wait {duration 6.0}
#
#------------------------------------------------------------------
# Display the Galle crater, Happy Face on Mars
#------------------------------------------------------------------
#
print {text "Ed ora muoviamoci verso un cratere alquanto strano..." row -4 column 1}
gotolonglat {time 4.0 distance 3 longitude 329.1 latitude -50.9}
wait {duration 4.0}
goto {time 3.0 distance 1.90}
print {text "Se ci avviciniamo abbastanza, ed usiamo un po' di fantasia,\npossiamo vedere la cosiddetta -Faccia felice- di Marte, il cratere Galle" row -4 column 1}
renderflags {set "markers"}
mark {object "Sol/Mars/Galle" size 40 color [0 0 0] symbol "plus"}
wait {duration 5.0}
unmark {object "Sol/Mars/Galle"}
renderflags {clear "markers"}
wait {duration 5.0}
#
#------------------------------------------------------------------
# Display the Roddenberry Crater.
#------------------------------------------------------------------
#
print {text "Per gli appassionati di Star Trek..." row -5 column 1}
gotolonglat {time 4.0 distance 3 longitude 355.4 latitude -49.5}
wait {duration 5.0}
goto {time 3.0 distance 1.5}
wait {duration 5.0}
print {text "Per gli appassionati di Star Trek\necco il cratere Gene Roddenberry,\nil creatore della famosa serie televisiva" row -5 column 1}
renderflags {set "markers"}
mark {object "Sol/Mars/Roddenberry" size 40 color [0 0 0] symbol "plus"}
wait {duration 5.0}
unmark {object "Sol/Mars/Roddenberry"}
renderflags {clear "markers"}
wait {duration 4.0}
#
#------------------------------------------------------------------
# Display the Sagan Crater.
#------------------------------------------------------------------
#
print {text "E per noi appassionati di scienza ed astronomia..." row -4 column 1}
gotolonglat {time 4.0 distance 3 longitude 329.3 latitude 10.7}
wait {duration 5.0}
goto {time 3.0 distance 1.5}
wait {duration 5.0}
print {text "E per noi appassionati di scienza ed astronomia...\necco il cratere Carl Sagan, il noto planetologo americano" row -4 column 1}
renderflags {set "markers"}
mark {object "Sol/Mars/Sagan" size 40 color [0 0 0] symbol "plus"}
wait {duration 5.0}
unmark {object "Sol/Mars/Sagan"}
renderflags {clear "markers"}
wait {duration 4.0}
#
#------------------------------------------------------------------
# Display the Mars Soyourner Rover.
#------------------------------------------------------------------
#
select {object "Sojourner Rover"}
goto {time 1.0 distance 50.0}
wait {duration 1.0}
print {text "Abbiamo anche potuto vedere la superficie di Marte da molto vicino..." row -4 column 1}
wait {duration 3.0}
gotolonglat {time 4.0 distance 25 longitude 104.23155 latitude -5.36993}
synchronous { }
wait {duration 4.0}
timerate {rate 0.0}
goto {time 5.0 distance 12.0}
wait {duration 7.0}
print {text "grazie a sonde come il Mars Pathfinder\ned il suo minuscolo compagno a 6 ruote,\nil Soyourner Rover, arrivati su Marte nel 1998" row -5 column 1}
wait {duration 6.0}
#
#------------------------------------------------------------------
# Display the Moon Phobos
#------------------------------------------------------------------
#
print {text "Ed ora... diamo uno sguardo ai due satelliti di Marte" row -4 column 1}
wait {duration 5.0}
timerate {rate 500.0}
select {object "Sol/Mars/Phobos"}
goto {time 5.0 distance 7.0}
follow {}
wait {duration 5.0}
print {text "Ecco Phobos...Non proprio" row -5 column 1}
wait {duration 3.0}
print {text "Ecco Phobos...Non proprio\ncome ve lo aspettavate, vero?\nE' di appena 27 Km di diametro" row -5 column 1}
wait {duration 8.0}
#
#------------------------------------------------------------------
# Display the Moon Deimos
#------------------------------------------------------------------
#
print {text "Ed ora Deimos, l'altro satellite di Marte," row -4 column 1}
select {object "Sol/Mars/Deimos"}
goto {time 5.0 distance 8.0}
follow {}
wait {duration 5.0}
print {text "Ed ora Deimos, l'altro satellite di Marte,\nsoltanto 15 Km. Un altro oggetto dalla forma strana, siete d'accordo?" row -4 column 1}
wait {duration 8.0}
#
#------------------------------------------------------------------
# Back off for final display
#------------------------------------------------------------------
#
select {object "Sol/Mars"}
goto {time 10 distance 4.5}
renderflags { set "cloudmaps" }
print {text "Ed ora diamo uno sguardo finale a Marte..." row -3 column 1}
wait {duration 5.0}
timerate {rate 1000.0}
wait {duration 10.0}
print {text "Abbiamo cosi' potuto vedere che Marte e'" row -5 column 1}
wait {duration 5.0}
print {text "Abbiamo cosi' potuto vedere che Marte e'\nun pianeta dinamico, con una lunga storia geologica" row -5 column 1}
wait {duration 5.0}
print {text "Abbiamo cosi' potuto vedere che Marte e'\nun pianeta dinamico, con una lunga storia geologica\nche comprende impatti, vulcanismo, inondazioni ed altre attivita'" row -5 column 1}
wait {duration 10.0}
print {text "Ci auguriamo che abbiate gradito questo breve viaggio virtuale su Marte" row -4 column 1}
wait {duration 5.0}
print {text "E se la risposta e' si, come\nsperiamo, tornate ancora a trovarci,\nabbiamo ancora tante cose da mostrarvi. CIAO!" row -5 column 1}
wait {duration 5.0}

}

--------------------------------------------------

Sorry for the long text and for the Italian wording, but there are not so many changes to the original Bob's text and anyhow to translate everything was needing a long work. :oops:

If someone likes this script, it is loaded in my Celestia page :D
http://www.ara-frasso-sabino.org/andrea ... ia_bis.htm

Two important considerations.
First: this script works very well with powerful graphic cards, I think at least 32 Mb, because it needs a big Mars texture in order to allow the strong zooming I made on some features. :?
Second: you'll need the plmars2-texture-v3.jpg file, the drawing with the Mars Channels by Percival Lowell that you can find in Selden's page at
http://www.lns.cornell.edu/~seb/celesti ... 002.html#5
and moreover the Sojourner/Pathfinder models that you can find in Jack Higgins' page
http://homepage.eircom.net/~jackhiggins/celestia/

I hope to have given all the information you can need, but if you find something missing, wrong, not working or needing changes, please inform me. :lol:
Please inform me immediately if I made something wrong posting such a long message, I'll edit it immediately. :oops:
By soon and enjoy :wink:

Andrea :D
"Something is always better than nothing!"
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB-WIN 11 PRO

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

Post #48by selden » 31.12.2003, 00:21

Andrea,

There's a minor problem with your SSC entry.

A CustomOrbit is a subroutine within Celestia.
There is no CustomOrbit "Mars2", so Celestia uses the EllipticalOrbit. You might want to remove the CustomOrbit line to avoid confusion.

Also, since you are adding Mars2 and not changing the "real" Mars, you do not have to edit solarsys.ssc. You can define Mars2 by itself in a file named (for example) Mars2.ssc in an Addon directory, perhaps the one where you have your Mars.cel

I hope these suggestions are useful.
Selden

ANDREA
Posts: 1543
Joined: 01.06.2002
With us: 22 years 8 months
Location: Rome, ITALY

Post #49by ANDREA » 31.12.2003, 00:43

selden wrote:Andrea, There's a minor problem with your SSC entry.
A CustomOrbit is a subroutine within Celestia.
There is no CustomOrbit "Mars2", so Celestia uses the EllipticalOrbit. You might want to remove the CustomOrbit line to avoid confusion.
Thank you Selden, I'll remove it. :D

selden wrote:Also, since you are adding Mars2 and not changing the "real" Mars, you do not have to edit solarsys.ssc. You can define Mars2 by itself in a file named (for example) Mars2.ssc in an Addon directory, perhaps the one where you have your Mars.cel I hope these suggestions are useful.

I have not yet approached your description on how to root the Addon directory, and surely this is the next thing I'll do, because I need to open Celestia .cel files not from the main .exe, as I have done up to now, loading one Celestia for every script. :evil:
I'm sure that things will be a lot easier in this way, thank you again. :D
And about the Mars2, is there any other more elegant way to obtain the same results? :wink:
By soon

Andrea :D
"Something is always better than nothing!"
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB-WIN 11 PRO

ANDREA
Posts: 1543
Joined: 01.06.2002
With us: 22 years 8 months
Location: Rome, ITALY

Post #50by ANDREA » 31.12.2003, 15:58

Don, I found a very little imprecision that made me loose a lot of time. :cry:
In the manual it is written that the GOTOLONGLAT must be shown as follows:
Latitude is specified as a negative number for the Southern hemisphere, and as a positive number for the Northern hemisphere
It's not true, if latitude value is positive it must be without sign, otherwise generates an error. So not
longitude -122 latitude +47 :( is wrong,
longitude -122 latitude 47 :D is right.

I lost a lot of time because I changed many things in the same scripting session, so I had to start again inserting only one change at a time, until I found what was the offending command. :wink:
Hope this will help who finds the same problem. :D

By and Happy New Year :!:

Andrea :D
"Something is always better than nothing!"
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB-WIN 11 PRO

don
Posts: 1709
Joined: 12.07.2003
With us: 21 years 6 months
Location: Colorado, USA (7000 ft)

Post #51by don » 01.01.2004, 11:02

Howdy Andrea,

Sorry I've been away from my PC for a couple of days. As I mentioned in a message above, this is new to me, so I just spent 3 hours figuring this out, as well as discovering that the chase, follow and synchronous commands are broken in some instances.

I hope this helps to explain things.

-Don G.

Here is what the AltSurface entries should look like in the solarsys.ssc file (Selden, can these be added to a secondary .ssc file?):

Code: Select all

AltSurface "Percival Lowell's Mars" "Sol/Mars"
{
  Texture "plmars2v3.jpg"
}

AltSurface "16K Shaded Mars" "Sol/Mars"
{
  Texture "Mars-Shaded-16K.dds"
}


Here is how your .cel script code should look:

Code: Select all

{
  cancel {} # (Let go of any currently selected object)

  select { object "Sol/Mars" }
  setsurface { name "Percival Lowell's Mars" }

  follow {} # (To keep Mars in-place)

  goto { time 3 distance 4.5 }
  wait { duration 3 }
  timerate { rate 1000.0 }

  print { text "In the past times astronomers saw on Mars\nregular channels, evidenly artificially created by intelligent beings.\nBut the realty is very different, surely without Martians ready to invade the Earth"  row -5  column 1  duration 12 }
# Do the preloadtex while waiting. Otherwise, a wait is required after the command,
# especially for a 87 MB file like this one!
  preloadtex { object "Mars-Shaded-16K.dds" }
  wait { duration 12 }

  setsurface { name "16K Shaded Mars" }
  timerate { rate 1000.0 }

  goto { time 1.0 distance 5.0 }
  wait {}

  print { text "Welkome to the Mars Tour.\nEverything you'll see here is absolutely real,\nobtained by photographs taken in the last years by satellites and probes"  row -5  column 1  duration 8 }
  wait { duration 8 }


#----------------------------------------------------------------------------
# End of Script - Let the user know the script is done running ...
#----------------------------------------------------------------------------
  print { text "The script is finished."
          row -3  column 25  duration 5 }
  wait  { duration 5 }
}
Last edited by don on 01.01.2004, 11:22, edited 1 time in total.

don
Posts: 1709
Joined: 12.07.2003
With us: 21 years 6 months
Location: Colorado, USA (7000 ft)

Post #52by don » 01.01.2004, 11:09

ANDREA wrote:Don, I found a very little imprecision that made me loose a lot of time. :cry:
In the manual it is written that the GOTOLONGLAT must be shown as follows:
Latitude is specified as a negative number for the Southern hemisphere, and as a positive number for the Northern hemisphere
It's not true, if latitude value is positive it must be without sign, otherwise generates an error. So not
longitude -122 latitude +47 :( is wrong,
longitude -122 latitude 47 :D is right.

I am sorry you lost time Andrea. To me, a "positive" number is any value greater than 0. To my knowledge, a "positive" number is not preceeded by a "+" symbol. A "negative" number is any value less than 0, which must be preceeded by a "-" symbol.

Happy New Year!

-Don G.

ANDREA
Posts: 1543
Joined: 01.06.2002
With us: 22 years 8 months
Location: Rome, ITALY

Post #53by ANDREA » 01.01.2004, 20:30

don wrote:
ANDREA wrote:Don, ...longitude -122 latitude +47 :( is wrong, longitude -122 latitude 47 :D is right.
I am sorry you lost time Andrea. To me, a "positive" number is any value greater than 0. To my knowledge, a "positive" number is not preceeded by a "+" symbol. A "negative" number is any value less than 0, which must be preceeded by a "-" symbol. Happy New Year! Don G.

Don, Happy New Year to you too. :D
You are right regarding the positive number without sign. :oops:
My problem is born because I'm using many Internet professional astronomy facilities , where the sign CAN be present or absent, no problem, or MUST be present, in order to be sure that we are meaning a positive or negative number and we are not forgetting the sign. 8)
Sorry for this. Now it's clear. :wink:
Thank you.
By soon

Andrea :D
"Something is always better than nothing!"
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB-WIN 11 PRO

don
Posts: 1709
Joined: 12.07.2003
With us: 21 years 6 months
Location: Colorado, USA (7000 ft)

Post #54by don » 01.01.2004, 21:24

ANDREA wrote:My problem is born because I'm using many Internet professional astronomy facilities , where the sign CAN be present or absent, no problem, or MUST be present, in order to be sure that we are meaning a positive or negative number and we are not forgetting the sign. 8)

Howdy Andrea,

No need to be sorry. I wondered if there might be something in astronomy, or Europe, that might be "different" than here :)

Just to be on the safe side, in the guide everywhere it is mentioned that a positive or negative value does different things -- I added a side note that the "+" sign is not necessary.

Thank you Andrea!

-Don G.

PS. Did you also see my previous message regarding AltSurface and setsurface?

ANDREA
Posts: 1543
Joined: 01.06.2002
With us: 22 years 8 months
Location: Rome, ITALY

Post #55by ANDREA » 01.01.2004, 22:00

don wrote:
ANDREA wrote:... where the sign CAN be present or absent, no problem, or MUST be present, in order to be sure that we are meaning a positive or negative number and we are not forgetting the sign. 8)
Howdy Andrea,
No need to be sorry. I wondered if there might be something in astronomy, or Europe, that might be "different" than here :)
Just to be on the safe side, in the guide everywhere it is mentioned that a positive or negative value does different things -- I added a side note that the "+" sign is not necessary. Don G.
You are very kind as usual Don, thank you. :D

don wrote:PS. Did you also see my previous message regarding AltSurface and setsurface?

I'm working on it just now, I hope to have the results in a couple hours. 8)
By soon.

Andrea :D
"Something is always better than nothing!"
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB-WIN 11 PRO

ANDREA
Posts: 1543
Joined: 01.06.2002
With us: 22 years 8 months
Location: Rome, ITALY

Post #56by ANDREA » 01.01.2004, 22:39

don wrote: - Did you also see my previous message regarding AltSurface and setsurface?Don


I've modified the solarsys.ssc and the Mars Tour .cel files as you told, and I'm happy to inform you that now it works flawlessly. :D
Thanks a lot. :wink:

Andrea :D
"Something is always better than nothing!"
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB-WIN 11 PRO

don
Posts: 1709
Joined: 12.07.2003
With us: 21 years 6 months
Location: Colorado, USA (7000 ft)

Post #57by don » 02.01.2004, 03:41

Howdy Andrea,

Very glad it is working for you too. I LOVE good news! :D

-Don G.

Topic author
Bob Hegwood
Posts: 1048
Joined: 19.10.2003
With us: 21 years 3 months
Location: Germantown, Ohio - USA

MarsTour Revised Again

Post #58by Bob Hegwood » 25.01.2004, 10:05

Hi all...

Just wanted to let you know that I have revised the MarsTour script again. Added more tourist traps (i.e. - Spirit and Opportunity landing sites), and enclosed some really spectacular textures along with the script.

The new script is available at http://home.earthlink.net/~bobhegwood

By the way, I wish to repeat that MY machine can use no texture over 1024x1024, so don't get upset if I can't show you the Spirit and Opportunity Rovers from 500 feet above the surface okay?

For you rich scientist types with 12-Gigabyte graphics cards, you may wish to have a look at Mario Rossi's stunning image maps, available at http://www.space-graphics.com. Although these texture maps need to be adjusted for the Central Meridian correction, they are truly the best image maps I've ever seen.

Just thought I'd share that with you.

Take care, 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

don
Posts: 1709
Joined: 12.07.2003
With us: 21 years 6 months
Location: Colorado, USA (7000 ft)

Post #59by don » 25.01.2004, 19:28

Howdy Bob,

Thank you for sharing your updated script with us!

Not sure how your graphics card or monitor is set-up, but with mine, below are what some things look like. Setting a date/time for each stop, where the sun is shining on the object of interest might help.

-Don G.

Image

Image

Image

Image

Image

Topic author
Bob Hegwood
Posts: 1048
Joined: 19.10.2003
With us: 21 years 3 months
Location: Germantown, Ohio - USA

Post #60by Bob Hegwood » 26.01.2004, 03:07

don wrote:Not sure how your graphics card or monitor is set-up, but with mine, below are what some things look like. Setting a date/time for each stop, where the sun is shining on the object of interest might help.

-Don G.


Don,

This is the same script you've been using successfully before, the only difference is the texture map.

I have *no* idea why this is happening on your system. On mine, I get crystal clear images that are far superior to what we had before.

Just to refresh your memory, I have no special graphics adapter, and I can only use the Basic or Multitexture OpenGL functions. Does this have anything to do with your ATI card? Seems to me that you had this problem before, and then tweaked it somehow.

Sorry, but I just don't know what to tell you. I *did* set the date and time for this version too; mainly because I wanted Mars to come into view behind the viewing of Phobos.

All I can tell you is that it works great on my poor machine.

Take care, 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


Return to “Scripting”