cel: URL and resolution change.

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
alan_federman
Posts: 60
Joined: 10.01.2003
With us: 21 years 10 months
Location: Silicon Valley

cel: URL and resolution change.

Post #1by alan_federman » 17.03.2003, 22:32

Well..... reading Frank's User manual has taught me a thing or two :oops: , but also makes me think of weird things to do. :twisted:

First, the .cel URL works great for me, but not being a Windows Explorer expert, how does one associate the 'cel:' url with celestia? Some systems do this automagically, but others don't know how. Also is it possible to pass a script or point to a script via the cel: url. It would be cool to download and launch an entire script from the Internet. :?:

Second, I didn't know about changing resolutions on the fly. This works great for .jpg and I think for .png but .dds doesn't appear to work. I suspect this is because the lower resolution images are recursed into the dds image, but I'd like to be able to switch texture maps depending on what I wanted to look at --- I.e. Earth without an ocean, or a infrared or radar map of a planet. Is there a way to do this with .dds, or do I have to convert to .jpg (which screws up the coolness of bump maps and specular textures)
Alan Federman

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

Post #2by selden » 18.03.2003, 01:51

Alan,

The Windows Cel:// url association is due to a registry entry that's created by Celestia's installation program. At one point Chris mumbled about providing a separate utility to do it, but that doesn't seem to have happened yet. In other words, a desktop shortcut to a pre-existing Celestia directory isn't enough any more.

Passing a shell script name to Celestia under Windows is not yet possible. I've been bugging Chris about that, too :) Apparently it is possible under Linux as a side-effect of running under KDE.

Changing surface textures is just a matter of having different files with the same name and filetype in all three texture subdirectories. It doesn't matter if they're DDS or not -- so long as the right name is specified in the relevant .SSC file and all three actually are DDS, of course. I've done this often with my own DDS textures of RGB Mars, for example.

To verify this, you can download the 2.5MB ZIP file http://www.lns.cornell.edu/~seb/celestia/blok/rgbmars-dds.zip. It includes 512, 1k and 2k dds surface textures along with the appropriate .SSC file. For details, see http://www.lns.cornell.edu/~seb/celestia/blok/index.html

I hope this helps a little.
Selden

Dave007
Posts: 16
Joined: 15.03.2003
With us: 21 years 8 months
Location: Florida, USA

Post #3by Dave007 » 18.03.2003, 08:44

Here's what happens in the registry (concerning cel links) when celestia is installed on windows machine (if option for cel links is checked):

1. CreateKey HKCR\cel (create new key in HKEY_Classes_Root named cel)
2. SetValueEx HKCR\cel "URL:Cel Protocol" (set default string value for this key to URL:Cel Protocol)
3. SetValueEx HKCR\cel\URL Protocol "" (create new string value named URL Protocol and set to null)
4. Createkey HKCR\cel\Shell (create new key under Cel)
5. SetValueEx HKCR\cel\Shell "" (set default string value to null)
6. Createkey HKCR\cel\Shell\open (create new key under Shell)
7. SetValueEx HKCR\cel\Shell\open "" (set default string value to null)
8. Createkey HKCR\cel\Shell\open\Command (create new key under open)
9. SetValueEx HKCR\cel\Shell\open\Command "C:\Program Files\Celestia\celestia.exe --once --dir "C:\Program Files\Celestia" -u "%1"" (set default string value to C:\Program Files\Celestia\celestia.exe --once --dir "C:\Program Files\Celestia" -u "%1")

note: I omitted Closekeys and Querykeys for readability.

So what you end up with in your registry is:

Image
Of course, the pathname values under the Command key will vary depending on where you install Celestia.

Hope this helps :)

p.s. if you plan on tweaking with your registry, don't forget to do a registry backup first. editing the registry can be dangerous to your system if not done correctly, and doing so is at your own risk.
--------------------------------------------------
| "Don't Panic" -- HGTTG, Douglas Adams
--------------------------------------------------


Return to “Development”