How to Add Landscape to Stellarium

Introduction

Stellarium has a lot of landscape already built in, but wouldn’t it be nice to have the landscape where you usually are observing or imaging from? In this guide, we will go over how to add landscapes to Stellarium. We’ll need to use a panorama image, so if you don’t have one we’ll go over how to get one using Google Maps.

Stellarium comes with a bunch of ground textures to choose from, even some fun ones like Mars and Saturn. But if you are in planning, it’s advantageous to have the ground be the same location you’ll be at when imaging or doing visual observing. This helps know where trees and buildings will be, just in case a section of sky will be blocked at any part of the night.

Getting Started

So as we get started, this guide assumes you already have a panoramic image saved, if it is your backyard or a place you frequent. If it’s somewhere you are planning on going to and do not have a panoramic image, there are a few options:

The easiest is to check the Stellarium website. They have a list of worldwide popular locations and observatories already available, you just need to select your continent and see if there’s one already available. It’s already set up and all you have to do is install it. Skip ahead to the end of Preparing the Files for Stellarium to install it.

If you don’t have a panorama, and it’s a fairly popular place, check Google Maps for a panorama in Street View. Since I frequent Mingo Creek Observatory outside of Pittsburgh, I am going to use this image from there. Credit goes to Patrick Rieger (A fellow Astronomy club member) for the image he uploaded to Google. 

Before beginning, you’ll need the following text to help Stellarium use the coordinates and altitude. Copy it into a text editor and minimize it for now:

[landscape] 
name = YOUR LOCATION NAME
description = Anything you want here
type = spherical 
maptex = nameofimagefile.png 
latitude = +40d12'40" 
longitude = -80d01'12"
altitude = 349 
angle_rotatez = 90

Getting a Panorama From Google Maps

A few tips for Google Maps:

  1. Check for multiple images. Sometimes there might be a better view. Keep in mind that if needed, street view images can be used too!
  2. Keep an eye on the orientation of the image. If the north (or south) looks true, it can make later steps easier. This is helpful if you’ve been there. 
    1. If not, go back to satellite view and switch it to globe. Try to compare where the 360 was with a landmark to the north or south.

Coordinates and altitude

You’ll need the coordinates and altitude of your chosen location so the sky is represented correctly. 

Go back to satellite view in Google Maps and right click where the panorama picture was taken. It doesn’t need to be exact, but close, and right click on the map. Click on the coordinates to copy them.


Go to https://www.earthpoint.us/convert.aspx and paste the coordinates in the position box, and click “calc.” This converts the coordinates from the decimal format to degrees, minutes, seconds, which will be necessary.


We’re almost done with getting the coordinates into a format Stellarium can recognize, we have a few steps left. We need to get the altitude so the ground is properly aligned. In the Earthpoint website, in the first table, we need the top latlong coordinates.


Finding the Altitude

Open a new tab and go to https://www.advancedconverter.com/map-tools/find-altitude-by-coordinates and then paste in the coordinates in the two boxes then click search. Alternatively, you can find the location on the map close to where the panorama was taken and click on it. Either method will give the altitude of the area. Copy the altitude in meters, and paste that into the altitude field in the text file I mentioned earlier.

Go back to the earthpoint website and copy the degrees/minutes/seconds to the text file. The first number is latitude, the second is longitude. Take note of whether or not there is a minus sign, and make sure it’s copied. Once both numbers are in the text file, a few changes need to be made:

  • If your latitude or longitude did NOT have a minus symbol, add a + symbol to it.
  • Change the degree symbol to the letter “d” (lowercase) so Stellarium can read it.
  • Remove anything after the decimal point, but keep the quotes for seconds. Stellarium doesn’t need the decimal points.
  • When finished, it should look similar to this, but with your coordinates:
latitude = +40d12'40" 
longitude = -80d01'12"

Before saving, create a folder in an easy to find location, and name it the location you are doing, but all one word (no spaces or caps). Save the notepad file as “landscape.ini” in the folder you created. To do this you’ll have to change the file type to “all files.” Note: It is necessary to name it “landscape.ini” as this is what Stellarium looks for.

Downloading the Google Maps Image

Going back to the image, we’ll need another program to actually save the image. That program is “Streetview Download 360,” we can download the image.

Run it to install it. After installation, open it up, and under the panorama download tab, choose where you want to save the panorama. 


Go back to Google Maps, and copy the URL of the panorama from the address bar.

Go back into Streetview 360 and go to the tools tab. Paste the URL from Google Maps in there and it will generate an ID.


Copy the ID, then go to the panorama tab, paste it into there, and click “Download Panorama.” No need to resize, we’ll do that in photoshop.


We now have the panorama saved! Time to open it in Photoshop.

Editing in Photoshop

In photoshop, we need to remove the sky so we only have the ground. So, a few things we need to do are resize it first, then erase the sky.

Resizing

So the first thing you want to do after opening it in photoshop is resizing. In order to do this, go to image, then image size.

Set it to a pixel size where the numbers are divisible by 2, like 4096 x 2048 or 1024 x 512. This just helps Stellarium run the landscape smoother. You only have to adjust the width if the link button is clicked. Photoshop will do the math for the height. Note: If you ever decide to submit a popular place to the Stellarium website, they require the size to have both height and width divisible by two before it’s posted.  Smaller numbers are recommended for slower computers, and larger numbers are fine for computers that can handle higher definition looks, so base it on what you have.

Removing the Sky

After this, let’s get rid of the sky. Make sure layer is unlocked. Use quick selection, holding shift to select the sky.

This part can take a while based on how detailed you want to be. If the trees are leafless like the below image, I recommend not going super detailed to treat it as if there are leaves on the trees. But, do try to be detailed around things like roof antennas, telephone and electric lines or poles, and anything else that would obstruct your view. If you accidentally cover something you didn’t want to select, hold ALT to back out any selections

When finished, press delete on the keyboard.

Final Touches in Photoshop

Double check to see if you missed anything. One thing I like to do is change the transparent background to another color to make sure it’s ALL gone. To do this, go to Preferences then transparency & gamut.

Change Both to Black to make it easy

Change both grid colors to black, then close the window and check the picture.

Erase what was missed using the Eraser tool.

Yay, no sky!

Save the image as a PNG in the same location as the notepad file. The filename doesn’t matter, as long as it’s a PNG file, Stellarium can use it.

Preparing the Files for Stellarium

Go back to the notepad file, and edit it.

Change the following information:

  • Name – this is the name you’ll see in Stellarium
  • Description – this can be whatever you want. If you check some other locations, such as Geneva, it lists what it’s actually showing. Anything after the equals sign will show up.
  • Make sure the type is spherical
  • Change the maptex to the name of the image you saved from Photoshop. Ex: mylocalobservatory.png
  • Don’t worry about angle_rotatez for now, this is how we will rotate it to be accurate, but we need to see how it looks at first in stellarium.

Save the file and close it. Copy the folder you have both files into the landscapes folder where you have Stellarium installed. On windows, the default is C:Program Files\Stellarium\Landscapes

Minimize the folder since we’ll more than likely need it again.

Into Stellarium

Now that we are in stellarium, we just need to do a few things:

Change your location to match where your landscape will be. You’ll want to go into the Sky and Viewing Options window. For a more in depth tour of this window, please see the Stellarium for Beginners video.

Go into landscapes, and check to make sure your landscape is there. If not, double check the maptex file name and the name of your image! If it’s there, set it, and check “use as default ground” 

Close the window and start panning around. It might appear a bit off. This is fine. Note how far off from North your image is compared to the real life location. Do you remember when I mentioned to note a landmark to the north?

Fine Tuning the Polar Alignment

To fix this, close Stellarium, and go back to the landscape.ini file in the folder you created and right click then edit

Change angle_rotatez to any number between 0 and 360. Start with 90, 180, or 270 and save. Copy the changed landscape.ini file into the folder under Save the file and close it. Copy the folder you have both files into the landscapes folder where you have Stellarium installed. Remember, in Windows this is C:Program Files\Stellarium\Landscapes

Open Stellarium and see how it changed.

If it’s still off, close Stellarium, and go back to the original .ini and change the number again, then copy it to the Stellarium folder again. The rotation is counter clockwise starting from 0, with the default opening view looking south. You might have to make large or small leaps to get it exact. Once it’s lined up, you’re done! Keep a copy of the original folder you created with the correct edited panorama and landscape.ini somewhere safe in case a major Stellarium update removes it.

Conclusion

Stellarium is an amazing free planetarium software that has many other uses to help you plan for a night out. You’ve successfully added your landscape to Stellarium, but what about other things? If you haven’t yet, please check out the How to Add Your Gear to Stellarium guide to help show what your location looks like at any given time of the year. Or, if you have a few images of nebulae or galaxies you’d like to see in Stellarium, check out the how to add images to Stellarium guide.

Congratulations! You’ve added your own landscape to Stellarium!

If you would prefer to follow along to the video, you can check it out here:


Related Guides

Leave a Reply