×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

New Feature: Terrain backgrounds

  • Posts: 1208
  • Thank you received: 559
I have an exciting new KStars feature for you to test. It can display a background "terrain" image on the KStars StarMap.  Since a picture's worth 1000 words, here's a screenshot where the background image is a panorama of the surface of Mars (credit NASA/JPL-Caltech/MSSS):



and here's another one using a panorama taken in my backyard from the perspective of my telescope:



Of course, if you pan/zoom with the SkyMap, you would see different views of Mars and my backyard. 

Although Mars is certainly much more interesting than my backyard, the idea, of course, is for you to use neither, but instead capture, process, and install your own panoramas from your own telescope locations so that the SkyMap simulates the view from your own telescope, with all the trees, buildings, etc that obstruct your sky view. That way you can plan your imaging, and approximate when the obstructions are cleared.  [A further goal, not yet implemented, is to use the terrain view to trace a skyline which, when input to Ekos, would allow the scheduler to be aware of when objects are visible.]

Details

You are responsible for creating your own partially-transparent image that is overlaid onto the SkyMap. This image should have transparent regions that you need to create to let the SkyMap show through, and opaque regions representing the trees, buildings, landscape around the telescope that block the KStars SkyView. If you don't create any transparent regions, the sky/stars won't show through.  There's a particular format required. There are resources on the web that explain how this is done for Stellarium, which has a similar feature. The details of image creation are the same--an image that works for Stellarium will likely work for KStars. Bottom line, make a PNG, with transparent (erased) sky,  (where the projection is "Equirectangular", which is done for you in the photo apps), where the image is a full sphere panorama. This can be done, for example, with a combination of the google photo app on an android phone, and Photoshop (or another photo editing app which allows you to make pixels transparent and save as a PNG). This video is one example that I found on YouTube, shows how it should be done.  
 Note that once you have saved the PNG (upto about 4:45 in above video) you should ignore the "how to install in Stellarium" parts, and instead place the image in the KStars data directory in a new subdirectory called terrain (e.g. on Linux that would be ~/.local/share/kstars/terrain).You can store more than one such image in the terrain directory, then choose between them in the new KStars terrain settings UI (below).Once the image is created, there's a new tab in the KStars settings menu called Terrain.  There, you can tell KStars to load an image, and set some other parameters. 
 

The main settings are:

(1) show Terrain, to enable the feature,

(2) Terrain File, to point KStars at your panorama, and

(3) the azimuth correction value (in degrees), which allows you to rotate the view so north in the SkyMap is aligned with north in the image. If you don't adjust the azimuth, the terrain image likely won't be aligned with the sky, and the simulation won't be right. Note 0-degrees in the UI is about North. The other settings are "speed-up" settings, where the defaults are probably fine to start.There's also a keyboard shortcut (control-shift-T) and a Menu->View item for toggling the terrain overlay on and off.

If you want to test, but don't have or can't make a photosphere, you can download one of these panoramas taken by NASA robots on Mars. I edited the original NASA images to be compatible with KStars terrains.

Curiosity Mars Panorama: drive.google.com/file/d/1lSmKp6Jfv4FqW-v..._LJ/view?usp=sharing
Credit: NASA/JPL-Caltech/MSSS

Perseverance Mars Panorama:  drive.google.com/file/d/1-OR0F5SpXIeTx_5...1uw/view?usp=sharing
Credit: NASA/JPL-Caltech/MSSS/ASU

I'd encourage you to make your own panorama and see the view from your telescope's perspective.I've tested on a laptop and on a Raspberry Pi 4, and both are quick enough to display the panoramas, though while panning, you'll notice a lack of smoothness on the RPi. Still very usable, though. (KStars doesn't use GPU support for its graphics--a great coding project for someone?).

FWIW, I've tested with 2 captured photospheres, both full spheres. One made with the Google Camera app on a Pixel 3 phone, and one made with the Google StreetView App using an iPhone (you can also use the StreetView app to make 360-degree "photospheres" on Samsung phones that don't include the Google Camera app). The other images tested were the NASA/JPL panoramas. In all cases, I edited the end result in Photoshop, erasing the sky and saving as an 8-bit PNG.As of now, this code is part of the KStars source code, and downloadable/git-cloneable from invent.kde.org/education/kstars. It is not yet in the nightly releases, though should be in the next day or two.

If you find new ways to capture the panorama and/or edit it successfully, please share that on this thread.

Thanks!
Last edit: 3 years 3 days ago by Hy Murveit.
3 years 2 weeks ago #68500
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 910
  • Thank you received: 86
So, Stellarium backgrounds are compatible? I have one already created (for Stellarium).
-- Max S
ZWO AM5. RST-135. AZ-GTI. HEQ5. iOptron SkyTracker.
TPO RC6. FRA400. Rokinon 135 and other lenses.
ZWO ASI2600MC. D5500 modified with UVIR clip-in filter.
ZWO ASI120MM Mini x 2. ZWO 30F4 guider. Orion 50mm guider.
ZWO EAF x 2.
3 years 2 weeks ago #68509

Please Log in or Create an account to join the conversation.

  • Posts: 2247
  • Thank you received: 223
That's cool, Google Camera is not available for iPhones :( I'll have to find an alternative for it.
3 years 2 weeks ago #68522

Please Log in or Create an account to join the conversation.

  • Posts: 535
  • Thank you received: 109
This is great!  Thank you, Hy.

I wonder if the next phase of this would be to use the transparent pixel edge as the horizon limit automatically? Does it do that already?

Jim
 
3 years 2 weeks ago #68532

Please Log in or Create an account to join the conversation.

  • Posts: 1208
  • Thank you received: 559
@MaxTheBuilder: Some Stellarium backgrounds are compatible. The ones with type=Spherical in their .ini file.
That probably includes the one you built. KStars doesn't read any .ini files, just the .png.
You have to supply your azimuth correction on the settings page.

@Gonzothegreat: The Google StreetView app that is available on iPhones creates suitable 360-degree images (of course, you then still need to "erase the sky" in a photo-editing app). I used my wife's iPhone to successfully to create a KStars-compatible file.
For instance, search for iPhone on this page: support.google.com/maps/answer/7012050?c...Platform%3DiOS&hl=en
Last edit: 3 years 3 days ago by Hy Murveit.
3 years 2 weeks ago #68534

Please Log in or Create an account to join the conversation.

  • Posts: 1208
  • Thank you received: 559
Jim,
That's an interesting idea...no, it doesn't do that yet, but if/when I (or someone else) gets to that, your idea should definitely be considered.
Hy
3 years 2 weeks ago #68535

Please Log in or Create an account to join the conversation.

  • Posts: 460
  • Thank you received: 69
Hy's directions work for the Google "Street View" app on the iPhone. It produces a reasonable full spherical dome using 3 tiers of images which it guides you through the process. I found it a bit hard to avoid publishing the result to Google as that's what it wants to do, but you can coerse it save it to your iPhone. In my case I saved it to my iCloud drive and picked it up on the iMac for editing from there.
3 years 2 weeks ago #68549

Please Log in or Create an account to join the conversation.

  • Posts: 2247
  • Thank you received: 223
thanks,

Has anyone been able to enable "terrain" on their Mac version?
3 years 2 weeks ago #68550

Please Log in or Create an account to join the conversation.

  • Posts: 58
  • Thank you received: 2
This is a cool new feature, thank you!
However, I was really hoping for an „Observer Pro“ compatible attempt:
indilib.org/forum/ekos/3855-horizon-data.html#29484
3 years 2 weeks ago #68555

Please Log in or Create an account to join the conversation.

  • Posts: 1208
  • Thank you received: 559
        Has anyone been able to enable "terrain" on their Mac version?

@GonzoTheGreat:  My understanding is that nightlies are only built for Ubuntu. You can see the PPA here: launchpad.net/~mutlaqja/+archive/ubuntu/indinightly
For other platforms, I believe you'd need to compile from source, or wait for a release. This is not something I personally am on top of, though, so not 100% sure.

You'd know if you had it, if a "Terrain section" shows up when you go to the KStars Settings menu, as shown in the last large image on my original post.

To be clear, this is a very early announcement of a feature I created for the next release. I guess that release would be 3.5.3. Don't know when 3.5.3 might be released.
I'm hoping for feedback on any issues people might find related to Terrain, to improve the quality of the ultimate release.

Hy

PS Just FYI, I do 99% of my development on a Mac laptop, BUT it is on a Linux (Ubuntu 20.04) virtual machine. 
As I spent my entire career (> 40 years) writing code on Unix/Linux systems, it is a good fit for me.
It's still amazing to me how virtual machines "transform" one type of machine to another.
Last edit: 3 years 2 weeks ago by Hy Murveit.
3 years 2 weeks ago #68561

Please Log in or Create an account to join the conversation.

  • Posts: 460
  • Thank you received: 69
One question. Would it be possible to adjust the image position vertically as well as the current horizontal rotation adjustment?  The use case would be if you didn't quite get the horizon placed correctly when you finally get to see it live in KStars and it doesn't quite match up. Looks good on my Odroid-N2 but I haven't been able to check it out live yet.One question. Would it be possible to adjust the image position vertically as well as the current horizontal rotation adjustment?  The use case would be if you didn't quite get the horizon placed correctly when you finally get to see it live in KStars and it doesn't quite match up. Looks good on my Odroid-N2 but I haven't been able to check it out live yet.    
The following user(s) said Thank You: jiberjaber
3 years 2 weeks ago #68563
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 1208
  • Thank you received: 559
Nice picture Jerry!

Yes, that is one of the options I thought about too. Of course you can work around it by photo-editing, but it makes sense to add to the controls--Just don't ask me for rotation as well ;)

I'll add it to my list, and hopefully do a set of updates when I get more feedback.

Hy
The following user(s) said Thank You: jiberjaber
3 years 2 weeks ago #68564

Please Log in or Create an account to join the conversation.

Time to create page: 2.328 seconds