DeepSpaceTour_v1.0.celx - Tour Deep Space Objects!

All about writing scripts for Celestia in Lua and the .cel system
Topic author
TimMc

DeepSpaceTour_v1.0.celx - Tour Deep Space Objects!

Post #1by TimMc » 08.03.2004, 21:30

***** NEW POST: DeepSpaceTour_v1.0.celx

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

Script based on Harald Schmidt's SolarSystemTour v1.1 script.
This script allows specification and touring of multiple deep-space objects.
Care needs to be taken not to allow Celestia to load too many Deep Spece Objects with large textures, or the script will run too slowly. Details are given in the ReadMe.

Comments, bugreports to: tim.mcmahon@tiscali.co.uk

[url]tim.mcmahon@tiscali.co.uk[/url]

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

Post #2by don » 09.03.2004, 06:43

Howdy TimMc,

Welcome! And thank you for sharing this great script with us! It looks like it will be a lot of fun, once I specify all of my add-ons.

It only recognized one of my 15 or so installed deep space add-ons, which is not a problem with the script, but rather seems to be showing a hole in the celestia:find() method.

Even though the script looks for M8 using 'obj = celestia:find("M8")', and I have it installed, it does not recognize it's DSC file entry of "M8 / NGC 6523 / Lagoon Nebula". Nor does it recognize my Black Hole entry: ' "Black Hole" "61 Cyg A" ', or M20: "M20 / NGC 6514", etc.

Harald, is it possible to make the find() method look a bit deeper? Or, would it be possible to add a command that returns a list of existing add-ons that Celestia found when it started up?

Thanks again Tim!

-Don G.

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

Post #3by chris » 09.03.2004, 07:23

don wrote:Even though the script looks for M8 using 'obj = celestia:find("M8")', and I have it installed, it does not recognize it's DSC file entry of "M8 / NGC 6523 / Lagoon Nebula". Nor does it recognize my Black Hole entry: ' "Black Hole" "61 Cyg A" ', or M20: "M20 / NGC 6514", etc.

The problem is that Celestia is that the object named "M20 / NGC 6514" will not match "M20". Nor should it. What's missing is the ability to assign multiple names to a single deep sky object. With stars, you can specify a list of names separated by colons ("Betelgeuse:ALF Ori", for example) A name list should also be permitted for deep sky objects and solar system bodies. As for stars, the names should be separate by colons. The forward slash is the 'path' separator for hierarchies of solar system objects.

--Chris

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

Post #4by don » 09.03.2004, 08:03

chris wrote:The problem is that Celestia is that the object named "M20 / NGC 6514" will not match "M20". Nor should it.
This also affects the auto-completion (Enter / Tab) function. For example, when I enter "m8", the display shows:

Code: Select all

M81   M84   M87   M80
M82   M85   M88   M8 / NGC 6523 / Lagoon Nebula
M83   M86   M89

... with the cursor moving from top-left in a downwards motion, then to the next column on the right (top-down, left-to-right).

So, it appears that there is no sorting of the entries, since a space comes before a digit in the colating sequence. Even the M80 entry is out of sequence. (Results from a March 7th CVS compile.)

Should these entries be listed in a sorted manner?


chris wrote:What's missing is the ability to assign multiple names to a single deep sky object ... The forward slash is the 'path' separator for hierarchies of solar system objects.

Does this mean that the entry examples I provided (ie. DSC file entry of "M8 / NGC 6523 / Lagoon Nebula") are specified incorrectly by their authors? This particular entry would appear to be providing 3 different names, and not a solar system hierarchy.

Will the "ability to assign multiple names to a single deep sky object" be something that is added to the Celestia TODO list? Or is this a distant-future kind of thing?

Thanks Chris,

-Don G.

Topic author
TimMc

More on DeepSpaceTour

Post #5by TimMc » 09.03.2004, 13:10

Thanks, all, for looking at this script. I was interested to note that others identified some of the issues I found when writing it - notably how it would be nice to have the ability in Celestia to specify multiple names for deep-space objects, and to find all the deep-space objects loaded by Celestia, like you can for the planetary bodies in any given solar system. Should these observations be formally submitted as feature requests?

Here are some comments on getting DeepSpaceTour to work efficiently.
1. SPECIFYING OBJECTS TO TOUR: The names of the deep-space objects to be toured must be specified in the script exactly as they appear in your DSC files. So if M8 is specified in your DSC file by the name "M8 / NGC 6523 / Lagoon Nebula", then you need to edit the reference to "M8" in the script to specify it as "M8 / NGC 6523 / Lagoon Nebula". The best way to ensure you will have some objects to tour is to add your own lines in the editable section at the end of the script e.g.

Code: Select all

preloadobject("M8 / NGC 6523 / Lagoon Nebula")
preloadobject("M97 Owl Nebula")
preloadobject("NGC 1499 California Nebula")


2. SPEED OF TOURING: The tour should move along at a brisk pace. If the view is changing very slowly or grinding to a halt it is almost certainly because Celestia has loaded many deep-space objects with large textures. Until there is a way of making Celestia only load textures for deep-space objects near to the observer, you will have to do a work-around to limit the number of deep-space objects loaded. One way is to comment out DSO's with large texture files in DSC files - but this is a pain just to run a script. A better way is to have your DSO's specified in multiple DSC files in the EXTRAS directory, with each DSC file maybe even having its own MODELS and TEXTURES/MEDRES directories. Then all you need to do - before running Celestia - is move the DSC files of objects with large textures to a directory that Celestia does not load. Restoring your system after running the script is then simply a matter of moving those DSC files (and sub-directories) back into the EXTRAS directory. I hope that a feature can be added to Celestia in the future that will allow for searching of deep-space objects loaded and for limited viewing of them (like the automag flag for stars).

I hope this helps - I don't want this script to be responsible for wasting your precious time! The script is capable of touring a dozen objects in a few minutes, following large sweeping trajectories that show the 3D objects off at their best, and make interesting viewing for 2D images.

I would be happy to upload some of my favourite DeepSpace object DSC files and their model and texture sub-directories on to my web-site so that people can download them to run with the script, if that would be any help. It really is quite breath-taking to sweep through the many beautiful DSO's that Celestia shows-off so wonderfully.

Regards, Tim Mc

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

Re: More on DeepSpaceTour

Post #6by don » 10.03.2004, 06:54

Howdy Tim,

TimMc wrote:Should these observations be formally submitted as feature requests?
This would probably be a good idea, so that it would have it's own thread / topic to allow for comments, etc.


TimMc wrote:1. SPECIFYING OBJECTS TO TOUR:
Thank you for the added clarification.


TimMc wrote:A better way is to have your DSO's specified in multiple DSC files in the EXTRAS directory, with each DSC file maybe even having its own MODELS and TEXTURES/MEDRES directories.
This is exactly what I try to do when adding new add-ons. It keeps things like activating / de-activating a whole lot simpler -- merely move the directory. Your readme file also went into this in some detail, which is helpful. :)


TimMc wrote:I hope that a feature can be added to Celestia in the future that will allow for searching of deep-space objects loaded and for limited viewing of them (like the automag flag for stars).
Two very good ideas, and yes, I think a new topic should be added to the Users Forum for these, as feature requests.

By the way, when you "register" in the forums, you can then edit your messages, allow folks to write Private Messages (PMs) to you, get e-mail notification when replies are posted, etc. Just FYI.


TimMc wrote:I don't want this script to be responsible for wasting your precious time!
There is such a wide mix of Celestia users out there that every script ever written is bound to waste someone's "precious time". :lol: ... So, I don't worry about it myself, as there are hundreds of others who will learn something from it, or just plain enjoy watching it. :)


TimMc wrote:The script is capable of touring a dozen objects in a few minutes, following large sweeping trajectories that show the 3D objects off at their best, and make interesting viewing for 2D images.
Yes, your script is great at getting a quick "visual" overview of the DSOs a user enters into the script. Some things to think about adding (you or anyone wanting to modify the script) ... some for functionality, some for education ...

* Look into the current set of Celx methods. Several have been added, such as a real preloadtexture method, a keyboard callback function (get input from the user), a clean-up callback function (automatically reset user's settings), etc. Harald may have a more recent guide than the one currently on his web page, so send him an e-mail or PM asking about it.

* Look into using the Pause-A-Script function I wrote (posted in the Scripting forum) that would allow the user to pause the script at any particular DSO (or any other time) so they can take a longer look.

* Set-up a table that contains known DSOs (in Celestia add-ons anyway) that includes some data for each object, which could then be displayed as on-screen text when the DSO is in-view. Things like distance from Earth, size, etc.


TimMc wrote:I would be happy to upload some of my favourite DeepSpace object DSC files and their model and texture sub-directories on to my web-site ...

Personally, I would LOVE to be able to go to ONE web site, and browse through a large collection of DSOs. However, you would need to keep a close eye on your bandwidth usage, because there are a LOT of Celestia users out there! 8O

Thanks again for a great script Tim. It's gotten a few of my rusty old mental gears turning. :D

Cheers,

-Don G.

TimMc
Posts: 48
Joined: 09.03.2004
With us: 20 years 2 months
Location: Danbury, London, U.K.

Potential Problems Fixed? New DeepSpaceTour available

Post #7by TimMc » 10.03.2004, 12:30

Hi Don & all.

Thanks for all the feedback on this script. I identified a potential problem like that encountered in the early version of SolarSystemTour_v1.2.celx. So I've updated DeepSpaceTour_v1.0.celx to (hopefully) eliminate it. I've tweaked the way the script creates the pos_table so that it steps through objects more cleanly. I've also added object numbering during the tour.

The link to the corrected script is referenced in a new post on this forum "Updated DeepSpaceTour_v1.0.celx ready for download". Please give any further feedback on the script under that post.

I've started uploading lots of Celestia deep-space objects to my web-site. I'll do a post when there are enough to make it worthwhile advertising - I've only uploaded 10 so far. I easily have 50 DSO's on my system at present, and will be making more 2D "billboard" models as Selden calls them. It is my intention to find or create a DSC and associated files for every Messier object.

I also intend to submit formal Feature Requests along the lines advised by Don & Chris.

Thanks for all the feedback.

Regards, Tim Mc


Return to “Scripting”