Page 1 of 2

Interactive Resurgence Maps

Posted: 23.07.2017, 10:10
by selden
Ilanthar of the Cartographers Guild has been posting some beautiful maps of the Resurgence stellar system in the threads https://www.cartographersguild.com/showthread.php?t=38300 and https://www.cartographersguild.com/showthread.php?t=38449

Although the maps that he's published are static images, they give the impression that they're screengrabs from an interactive information display system.

With his permission, I've started implementing a simplified version of that system, using Celestia as the platform.

Here's a screengrab from the initial "proof of principle." It shows the buttons which can be used to select among the stellar system maps.
capture_011_23072017_053030.png



This "proof of principle" is available at https://www.classe.cornell.edu/~seb/celestia/files/ResurgenceMaps_v02.zip (updated 23 Jul 17)

It implements the three buttons which switch between stellar system maps and four buttons to go to planetary maps.

v 0.2 is smaller than v 0.1, about 6.5 MB, because I rescaled the maps to be 2Kx1K jpg files. I'm not sure what I'll do about them for the final version. It turns out that the original hires maps are a possibility at the cost of loading speed.

My hope is to make a version of the maps which is almost as interactive as their designs suggest. For example:
+ Click on a button and the specified map appears, replacing the previous one. (Partially implemented in v0.1)
+ Click on a planet or associated button, and it appears above the map, rotating in front of you. (Partially implemented in v0.2)
+ Click on a planetary system sketch and see those planets orbiting their sun. (Not yet implemented.)
This Addon is designed for use with Celestia v1.6.1 or later. It will not work with earlier versions of Celestia.

Comments and suggestions will be greatly appreciated.

Posted: 23.07.2017, 17:21
by Cham
I don't know why, but your addon doesn't work well on my system. It's working only once. After I clicked the buttons, I'm unable to get back to the previous panel. The buttons cease to work just after a few clicks. There was even an instance where two panels were "oscillating" (or flickering) very fast.

Each time, I have to re-run the celx script, but it's always ceasing to work properly after a few clicks.

I had a similar behavior with your other recent addon (about the Chesley Bonestell SF in a 3D book). :sad:

I suspect a mattter of processor/memory/system/OS speed. My desktop computer is now very old and doesn't react very efficiently, especially with my obsolete web browser (Safari on Snow Leopard !). I'll try the addon on my portable, which is also very old, but still much faster than the desktop one.

I'm still on the now dinosaurs era OS X Snow Leopard ! :eek:

Posted: 23.07.2017, 17:59
by selden
Cham,

I'm sorry to hear about your problems, but I can only guess what might be causing them. I think that it's unlikely to be the processor and graphics performance by themselves: I've been doing my development on a 7 year old laptop with a 1.6 GHz Core i7 CPU and 3100M Nvidia graphics.

What version of Celestia are you using? I seem to recall that you mentioned that you've been using a copy of Celestia v1.7 that you built for your Mac. I use the Celestia v1.6.1 Windows executable from Sourceforge to try to make sure my recent Addons work with the version that most people have. I'm wondering if somehow there might be a bug in your copy of v1.7 that's affecting things, although the Addon worked fine for me when I tested it just now with a copy of v1.7 built for Windows from the current GitHub repository.

With both versions of Celestia I see no flickering and can toggle among the maps as many times as I'm willing to do it.

A generic cause of flickering is to draw two overlapping 3D objects. They'll flicker wherever their surfaces exactly coincide as the graphics hardware first draws one and then the other. This makes me wonder if the "setvisible()" Lua function isn't working reliably for you.

Another possibility is that the Wait function in the command scanner is just too fast in some situations. Down at the very bottom of the .celx script, try increasing

Code: Select all

 wait (0.04)

to

Code: Select all

 wait (0.2)

Posted: 23.07.2017, 18:10
by Cham
Selden, I suspect the wait function may be the culprit. It gave me many other troubles in the past for other scripts. This function is not reliable, apparently.

EDIT : changing the time from 0.04 to 0.2 doesn't change anything. It seems to be worst, actually !

Posted: 23.07.2017, 18:44
by John Van Vliet
works here on my QT4 build
Screenshot_20170723_144312.png

Screenshot_20170723_144303.png

Screenshot_20170723_144249.png

Posted: 23.07.2017, 19:09
by selden
Cham,

I'm sorry to say that I can only suggest that you do whatever's necessary to update your computer so it can access up-to-date runtime libraries, including graphics drivers.

You might want to consider dual-booting Linux, for example. One of my co-workers reported no problems when he installed Scientific Linux 7 (a recompiled RHEL7, similar to Centos7) on an old tower Mac that couldn't run the current version of MacOS.

I can verify John's report that a Linux version of Celstia has no problems with the interactive map Addon: I just now accessed one of the SL7 computers at the Lab where I work, and ran a copy of Celestia that I had built from John's GitHub repository. Celestia was happy running the Addon, although it was a little slow due to all the network overhead and software OpenGL: X2Go over a VLAN connection to an sl6 system running the XFCE windowing system, then ssh -Y to the sl7 system where I ran Celestia.

Here's a screenshot of that session as seen on my Laptop at home:
capture_015_23072017_150451.png


Added after 2 hours 29 minutes:
v0.2 is now available. I've updated the first post.

Posted: 25.07.2017, 12:12
by selden
V0.3 is now available at https://www.classe.cornell.edu/~seb/celestia/files/ResurgenceMaps_v03.zip (updated 25 Jul 17)

It implements buttons which allow you to view the various stellar system maps and planetary maps.

v 0.3 is much bigger than v 0.2, about 24 MB, because I included copies of Ilanthar's original maps.

Visible changes in v0.3
+ Globe sizes are proportional to the planets' radii.
+ Globes are appropriately tilted to the side
+ The viewing month has been adjusted so you can see part of their night sides
+ Atmosphere and clouds have been added.
+ Ilanthar's original high resolution maps are included
+ They'll be used if you select Celestia's menu option
"Render -> Texture Resolution -> High"
- They're slow to load, so you'll see a "Loading..." message, too.
+ added maps of Luna and Hephaesti
o A dummy Scylla is included which was added while tracking down some bugs

Invisible changes:
+ Parts of the script were refactored while tracking down some bugs.

Cham,

Some of the changes were in the command interpreter and might (or might not :( ) help with your problems viewing it.

Posted: 25.07.2017, 12:38
by Cham
The download link doesn't work ! It doesn't give "permission" ?

Forbidden

You don't have permission to access /~seb/celestia/files/ResurgenceMaps_v03.zip on this server.

Posted: 25.07.2017, 13:28
by selden
Oops.Sorry.Please try again.

Posted: 25.07.2017, 13:46
by Cham
I tried your version 3. It's worst ! The buttons are now doing nothing ! Re-run the script doesn't help.

I don't think that my Celestia 1.7 have a problem with scripts. All of my old addons and scripts are working flawlessly since years, so I would have noticed if there was something odd. The only script command which was giving me some troubles is the wait function. This isn't new, it's even documented on the forum since a very long time now and apparently there wasn't a complete solution about it.

For example, a quick search gave this message : viewtopic.php?f=3&t=17610&p=135688&hilit=wait#p135688
Also :
viewtopic.php?f=9&t=16252&p=125226&hilit=wait+function#p125226


And why your addon stops time ?

Posted: 25.07.2017, 14:49
by John Van Vliet
V3 sort of works

you need to make the globe visible in the "celestial browser" and be on the correct solar system

Posted: 25.07.2017, 14:54
by Cham
John, you don't understand. I can get the model with its textures, but the buttons do nothing. The script is not responding properly.

I don't have any video/location issue.

Posted: 25.07.2017, 15:04
by John Van Vliet

Interactive Resurgence Maps

Posted: 25.07.2017, 15:20
by selden
Tried your version 3. It's worst ! The buttons are now doing nothing ! Re-run the script doesn't help.
Unfortunately, it works fine for me under both Windows and Linux.

I don't think that my Celestia 1.7 have a problem with scripts. All of my old addons and scripts are working flawlessly since years, so I would have noticed if there was something odd. The only script command which was giving me some troubles is the wait function. This isn't new, it's even documented on the forum since a very long time now and apparently there wasn't a complete solution about it.
Unfortunately, the wait function is quite important. My script uses it to relinquish control to Celestia in order to ensure that Celestia has completed some functions (loading textures, for example) before the script continues.

And why your addon stops time ?
[/quote]

Celestia always stops time while it is loading surface texture images. Usually it's so brief you don't notice.

Unfortunately, the high resolution maps are not a power-of-two on a side. As a result, if your graphics driver doesn't support non-power-of-two textures, then Celestia has to re-scale them to a power of two. This is in addition to cutting them up into small pieces if they don't fit in the graphics hardware's texture buffer. Celestia is single-threaded, so while it is doing those tasks it can't update the display.

During that wait, though, you should see a "Loading..." image. The "Loading..." object uses a tiny 512x256 surface texture, so it loads quickly. That's one place where a wait is necessary: the "loading" object is shown, then there's a brief wait, then the new map is made visible and Celestia starts loading its surface texture image.

John, I'll be updating the credits to include the necessary licensing descriptions.

Added after 13 minutes 25 seconds:
John,

I don't know what you mean by
you need to make the globe visible in the "celestial browser" and be on the correct solar system

This is how it's supposed to work:

Click on an appropriate planet's "sigil" to switch from the Hyperion System map to the desired Planetary map. The only sigils which work are on the Hyperion map and have a faint green tint.

While you're viewing that Planetary map, click on the button that's at the top-center of the map. That's the button which has a picture of a globe in it. The appropriate globe should appear. It'll disappear when you click on that button again, or if you click on the Hyperion button that's at the top left corner of the Planetary map.

Posted: 25.07.2017, 15:41
by Cham
Selden,

I do have the "loading" screen for a brief moment, and the model loads fine with its textures. Video and textures loading are not the problem I'm experiencing. I'm pretty sure now it's the wait() function which isn't doing its job correctly again. Its behavior isn't reliable and may vary from one system to another.

Vincent gave some explanations on this before (several years ago). That wait() function (with any argument) is really a pain in the arse ! :evil:

EDIT : In the case of your addon, I suspect there are other ways to make the buttons working correctly, without using the wait(). I did programmed my LUA plugins without any wait(), and my numerous buttons are all working perfectly !

Posted: 25.07.2017, 23:19
by selden
v0.4 is now available at
https://www.classe.cornell.edu/~seb/celestia/files/ResurgenceMaps_v04.zip (90 MB, expands to 117 MB, updated 7PM, 25 Jul 17)

v 0.4 is substantially larger than previous versions because I converted Ilanthar's original maps to DDS format in order to improve performance. DDS surface texture images can be loaded directly into modern graphics hardware without having to be resized or translated. Celestia still pauses while they're being loaded, though.

Other changes for v0.4:

+ Reactive regions have been given bright outlines
+ The maps now are interactive without needing to invoke a script. The
previous .celx script has been translated into a "ScriptedOrbit" celxx/lua
function which provides interactive functionality as a side-effect.
+ Scylla now uses the map provided by Ilanthar
+ Clouds are now drawn using cloudmaps provided by Ilanthar
+ Credits have been added for maps initially created by Robert Stein III

v0.5 is now available.

Posted: 27.07.2017, 21:33
by selden
v0.5 is now available.

https://www.classe.cornell.edu/~seb/celestia/files/ResurgenceMaps_v05.zip (91MB expands to 118MB)

Changes in v0.5
===============
+ added Hades
+ expanded installation and operational instructions in readme file
+ added GoToMap.celx
+ added viewing of the Hyperion planetary system itself
("The map is not the territory." -- Alfred Korzybski)
+ added "pop-out" of planetary system to Hyperion System map
+ fixed some bugs

Posted: 27.07.2017, 21:42
by Cham
Still can't download...

Posted: 27.07.2017, 21:47
by selden
Sorry.Please try again. I forgot to change the file protection after uploading it. Again.

Posted: 27.07.2017, 22:03
by Cham
Sadly, your script still don't work on my system. Selecting an illuminated button simply do nothing. :sad: