Creating a Horizon Image
by Dennis Allen

This article describes how to create and install a panoramic horizon image for either Software Bisque's TheSky v6 or Stellarium. In this article, we also offer horizon image files created from one of our observatory panoramas.

First, you need to take a set of pictures of your observing site. Make sure your camera tripod is level. Have some sort of marker indicating which way is true north (not magnetic). For our facility, the upper hill sidewalk just happens to run true north. Takes a set of pictures, level with the center line on the horizon. I like to use my 200mm telephoto lens, taken down to 18mm. Takes lots of images, with a good overlap between shots.

Once you have images in your computer, open them in your photo editor. Photoshop Elements has a very good panoramic merge feature that stitches and adjusts your images automatically. When you stitch, your first image should have true north. Your last image should be another overlap of true north. If you use some another editor, you might have to crop off the edges (vignetting) on a couple images before stitching. You might also have to adjust the color balance on a couple images, to make sure they all match. Oh, when you make your panoramic, make sure the horizon of your first image is the same height as your last image (long ago I would sometimes have to warp the first and last images to get them to align).

Once you have your panoramic, crop it so that your true north marker is split in half by the first and last images. Resize your panoramic to be 5000 pixels in width. The image height can be variable, as long as your horizon is close to the center of the image. Save your panoramic as a JPEG file.

Software Bisque TheSky v6

To create a TheSky horizon image, launch Photoshop Elements and load your JPEG file. Select your entire image and magic wand your sky (cloud area). Open the layers folder and right-click the 'Background' layer and select 'Layer from Background' to create 'Layer 0'. In the layers folder, select 'add layer mask'. Your layer should have a new mask. In the mask, the areas in black should be the sky and cloud areas you want to eliminate. You can Alt-Click on the mask to work on any areas you want to remove or keep.

Once you got your mask just right, click on the mask and 'Apply Layer Mask'. Like before, select the entire area and magic wand your sky .(cloud area), then Select->inverse the layer so that the horizon image itself is highlighted. From this same Select pulldown, select 'save selection'. Name it 'Alpha 1' and save the layer. Do a 'Save As', file type TIFF, in the folder 'My Documents/Software Bisque/TheSky6/Horizons' (you want 'My Documents', not 'Program Files'). When you save your TIFF, use LZW compression, uncheck 'save image pyramid'.

When working with the JPEG, determine the pixel height of your image. For our example, the tt14 image came to 648 pixels high. Next, determine where your horizon line is located, in pixels. For tt14, we have 348 pixels above and 300 pixels below the horizon. Now 5000 / 360 = 13.89 pixels per degree, so 648 pixels / 13.89 comes to 46.65 degrees (25.05 degrees above and 21.60 degrees below the horizon).

In the same 'Horizons' folder with the tif file, create a file with a *.horizon extension. For the image tt14.tif, for example, the file has to be called tt14.horizon (not tt14.horizon.txt). The file tt14.horizon has the following text parameters:

ALT TOP = 25 (25.05 truncated to 25)
ALT BOT = -20 (-21.60 truncated to -20)
AZIM = 0.0
TYPE = PANORAMA
TYPE = SHAPE=FALSE

Note TheSky doesn't allow a ALTBOT value less than -20.

After you launch TheSky, select View->Real Mode Options. Click on 'Horizon Image' and 'Advanced Options'. Do a browse and select your new *.horizon file. Apply and Save.

Click here for a TheSky v6 horizontal image file of our facility, circa September 2019, as seen from the upper pad. This zip file includes tt14.tif and tt14.horizon. You need to unzip this file in the folder 'My Documents/Software Bisque/TheSky6/Horizons'. After you launch TheSky, select View->Real Mode Options. Click on 'Horizon Image' and 'Advanced Options'. Do a browse and select the tt14.horizon file. Apply and Save.

Stellarium

To create a Stellarium horizon image, launch Photoshop Elements and load your JPEG file. Select your entire image and magic wand your sky (cloud area). Open the layers folder and right-click the 'Background' layer and select 'Layer from Background' to create 'Layer 0'. In the layers folder, select 'add layer mask'. Your layer should have a new mask. In the mask, the areas in black should be the sky and cloud areas you want to eliminate. You can Alt-Click on the mask to work on any areas you want to remove or keep.

Once you got your mask just right, click on the mask and 'Apply Layer Mask'. With Stellarium, you need to create a PNG file. Keep the image width 5000 and increase the canvas height to 2500 for a 1/2 ratio. When you resize, try to keep your horizon close to the 1250 pixel mark. Do a 'Save As', file type PNG. Now create a landscape.ini file with the following parameters:

[landscape]
name = Enter your landscape name here
author = Enter your name here
description = Enter a description here
type = spherical
maptex = yourimagename.png
angle_rotatez = Enter angle (270 works for our landscapes)

[location]
planet = Enter planet
latitude = +XXdXX'XX"
longitude = -XXdXX'XX"W
altitude = X

For more information on landscape.ini parameters, click here. Before you run Stellarium, under C:\Program Files\Stellarium\landscapes (Windows XP), C:\Users\<user>\AppData\Roaming\Stellarium\landscapes (Windows 7), or /usr/share/stellarium/landscapes (Linux), create a new sub-folder. Copy your png and landscape.ini files to this new folder. When you run Stellarium, under [F4] Sky & Viewing Options->Landscape, you're new landscape should now be available.

Windows 7 Note: I just wrestled with a bar bones Windows 7 laptop. Finally got the landscape installed, but a couple notes. First, in your control panel folder options make sure you can view hidden folders. Otherwise you can't see the folder 'AppData'. Second, if you have the folder option to hide known extensions, .ini or .png cannot be part of the file name. In other words, make sure your landscape.ini file is called landscape (icon file extension .ini), not landscape.ini.ini or  LANDSC~.INI. Same thing with the png file.

Click here for the latest Stellarium horizontal image file of our facility, circa September 2019, as seen from the upper pad. This zip file includes tt14a.png and landscape.ini. You need to create a new landscape subfolder and unzip this file into it. After you launch Stellarium, select 'sky and viewing options', under 'landscapes'. You're new landscape should now be available. For more information on how to create a Stellarium landscape on youtube, click here or here.

[Return to Top]
[Go to Home Page]

Copyright © 2005 Muskegon Astronomical Society, Inc.

This web page was last updated 01/28/20