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, Starry Night Pro v4.5 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, with the center line on the horizon. I like to use a 50mm lens. Takes lots of images, with a good overlap between shots.

Once you have images in your computer, check them in your photo editor such as Photoshop Elements. Depending on the lens, you might have crop off the vignetting at the very edges. You also might have to adjust the color balance on a couple images, to make sure they all match.

Next, you'll need to stitch your images together. Use a 10000 by 1200 pixel area as a starting base. Start with an image that has true north. When stitching, try to keep your horizon on the same plain (# pixels from the bottom of the panoramic). Your last image should be another overlap of true north. Check whether the true north marker on the last image is on the same horizontal plain with the first image. If not, you might have to redo the last image by warping it (might also have to warp the first image).

Crop your panoramic so that your true north marker is split in half by the first and last images. Mask off your clouds, leaving only grass, tress, hills and buildings. Replacing the clouds with a single color makes the image easier to process (make sure color is not found in rest of image). Then resize your panoramic to be 5000 pixels in width and save it as a JPEG file.

When working with the JPEG, determine the pixel height of your image. For our example, the tt5c image came to 531 pixels high. Next, determine where your horizon line is located, in pixels. For tt5c, we have 271 pixels above and 260 pixels below the horizon. Now 5000 / 360 = 13.89 pixels per degree, so 531 pixels comes to 38.23 degrees (19.51 degrees above and 18.71 degrees below the horizon).

Starry Night Pro v4.5

To create a Starry Night horizon image, launch Photoshop Elements and load your JPEG file.  Open the layers folder and rename the 'Background' layer to 'Layer 0'. That takes the lock off. Magic wand your masked area (cloud area) and edit->cut. In the layer folder, create a new layer called 'Layer 1' and drag it so it is listed before 'Layer 0'. Now do 'Save As', file type PSD, in the folder 'Program Files/StarryNight Pro 4.5/Sky Data/Horizon Panoramas'. Watch that you save with a file name similar to tt5c.psd, not tt5c.tif.psd or tt5c.jpg.psd (use the file->open dialog box to check and/or rename the file).

Now in the same folder, find an existing txt file and make a copy (if tt5c.psd is the image, tt5c.txt should be the txt file). Edit the txt file. For tt5c.txt, the main parameters are:

<SN_VALUE name="PanoName" value="tt5c">
<SN_VALUE name="ImageFileName" value="tt5c.psd">
<SN_VALUE name="ImageHeight" value="38.23">
<SN_VALUE name="UseImageAlpha" value="Yes">
<SN_VALUE name="ImageCentreDec" value="0">
<SN_VALUE name="ImageCentreRa" value="180.000000000000000000">

For a more complete description of this file, click here. After you launch Starry Night, open the options panel->local view->local horizon options. In the photorealistic/earth horizons list you should now be able to select tt5c. For your image, I suggest starting with a "ImageCentreDec" of 0.  Increase the value until the image horizon meets with the actual horizon.

Note: If you ever change your psd file, delete the corresponding '*.psd_Cache' subfolder found in the  'Horizon Panoramas' folder. Otherwise, Starry Night won't know there was a change.

Click here for a StarryNight horizontal image file of our facility, circa 2004, as seen from the upper pad. This zip file includes the psd and txt files. You need to unzip this file in the folder 'Program Files/StarryNight Pro 4.5/Sky Data/Horizon Panoramas'. After you launch StarryNight, open the options panel->local view->local horizon options. In the photorealistic/earth horizons list you should now be able to select tt5c.

Software Bisque TheSky v6

With TheSky, you need to create a TIF file. Using Photoshop Elements, open up your JPEG file. Magic wand your masked area (cloud mask), then inverse the layer so that the horizon image itself is highlighted. From the Select pulldown, select 'save selection'. Name it 'Alpha 1' and save the layer. Now inverse your layer again to highlight the cloud area again and edit->cut. 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'. And again, save the file with a name similar to tt5c.tif, not tt5c.jpg.tif.

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

ALT TOP = 19.5
ALT BOT = -18.71
AZIM = 0.0
TYPE = PANORAMA
TYPE = SHAPE=FALSE

Note: TheSky doesn't allow an ALT BOT of more than 19 degrees. So when you create your panorama, don't let the horizon rise beyond midpoint in the image.

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 2004, as seen from the upper pad. This zip file includes the tif and horizon files. 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 tt5c.horizon file. Apply and Save.

Stellarium

With Stellarium, you need to create a PNG file. Using Photoshop Elements, open up the psd file created for starry night. Resize the image width to 2048 and increased the canvas height to 1024. You might have to move your image up the canvas just a bit, so the 500 pixel height mark matches the horizon. Do a 'Save As', file type PNG. Watch that you save with a file name similar to tt5c.png, not tt5c.png.png (use the file->open dialog box to check and/or rename the file). 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.

Click here for a Stellarium horizontal image file of our facility, circa July 2016, as seen from the upper pad. This zip file includes the png and landscape.ini files. 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.

[Return to Top]
[Go to Home Page]

Copyright 2005 Muskegon Astronomical Society, Inc.

This web page was last updated 01/08/17