Creating a Personalised Landscape for Stellarium

From Stellarium Wiki
Revision as of 17:48, 18 August 2013 by Alexwolf (Talk | contribs)
Jump to: navigation, search
Information is actual for version 0.12.3

Although this procedure is based on the Microsoft Windows System the basics will apply to any platform that can run the programs mentioned or similar programs on the preferred system.

The first thing needed for a personalised landscape to superimpose on the horizon display is a 360° panorama with a transparent background. To make this you will need the following:

  • A digital camera on a tripod or stable platform
  • A program to convert the pictures into a 360° panorama
  • A program to remove the background and convert the panorama into about 8 square pictures in PNG format for insertion into Stellarium as the sides and if possible a similar square picture of the base you are standing on to form the ground. This last requirement is only really possible if this area is relatively featureless as the problem of knitting a complex base is well nigh impossible.
  • Patience. (Maybe a soundproof room so that the swearing wont be heard when you press the wrong key and lose an hours work)


The Camera

Digital cameras are easy and cheaply available these days so whatever you have should do. One mega-pixel resolution is quite sufficient.

The camera needs to be mounted on a tripod so that reasonably orientated pictures can be taken. Select a time of day that is quite bright with a neutral cloudy sky so there will be no shadows and a sky of the same overall texture. This will make it easier to remove later. The pictures were all saved in the JPG format which was used as the common format for all processes up to the removal of the background.

With a camera that takes 4:3 ratio pictures I found 14 evenly spaced pictures gave the best 360° panorama in the program I used to produce it.

Processing into a Panorama

This is the most complicated part of the process of generating the panorama. I used two separate programs to do this. Firstly I used The Gimp to 1024x768 size and so make them easier to handle in the panorama program.

When I had my 14 processed pictures I inserted them into the panorama program. I used a program called the Panorama Factory. Version 1.6 is a freebee that works well and can be downloaded from the internet - a Google search will find it. I used version 3.4 that is better and cost about $40 off the Internet. This program has many options and can be configured to suit most cameras and can make a seamless 360^{\circ} panorama in barrel form that will take a highly trained eye to find where the joins occur.

The resulting panorama was then loaded into The Gimp and trimmed to a suitable size. Mine ended up14024 x 1601 pixels. I trimmed the vertical size to 1024 by cutting back then stretched the 14024 to 14336 pixels, almost no distortion, that would allow cutting into 14 1024 x1024 pictures at a later date. If the height of the panorama had been greater I could have made fewer pictures and so shown more of the foreground. See figure [fig:panorama360].

If you have prominent foreground items like posts wires etc. that occur in adjacent pictures the panorama program will have difficulty in discerning them because of the 3D effect and may give double images. I overcame this by painting out the offending item by cut and paste between the two pictures. Quite easy with a little practice using the zoom in facility and I found the MSpaint program the easiest to do this in. landscape_beaumonthills.jpg

Removing the background to make it transparent

This is the most complex part of the process and requires a program that can produce transparency to parts of your picture, commonly called an alpha channel. Two programs I know of will do this. The very expensive and sophisticated Adobe Photoshop and a freebee called The Gimp. I used photoshop to cut the full panorama into 1024 x 1024 textures because it was the easiest to do accurate cutting.

I first used Photoshop to produce the alpha channel because it was the only way I knew but I now use the GIMP as it is much easier to process the individual textures than removing the background.from the full panorama.

1. Load the 1st section into TheGimp

2. Next create a new empty picture1024 x 1024 and use the advanced tab to make the background color transparency. Copy the original texture onto this new picture base so that it exactly fits the frame then select layer from the menu and press anchor. This will create a new picture with with an alpha channel. By using the select by color and lasso etc cut out the parts you don't want this will expose the checkerboard background.. When you are happy with the removal save the texture in *.png format to preserve the alpha layer. .

3. Do the same with the remaining pictures. to create the full panerama

4. Make a new directory for the landscape. This should be a sub-directory of either the <user directory>/landscapes or <installation>/landscapes directory. The name of the directory should be unique to your landscape, and is the landscape ID. The convention is to use a single descriptive word in lowercase text, for example gueriens. Place your pictures your new directory.

5. In your new landscape directory, create a new file called landscape.ini file (I used wordpad). Add a line for the [landscape] section. It's probably easiest to copy the landscape.ini file for the Gueriens landscape and edit it. Edit the name Guereins in every instance to the name you have given your landscape. Don't forget to make the number of tex entries agree with the number of your pictures. If you haven't made a groundtex picture use one of the existing ones from the file or make a square blank picture of your own idea. Because I took my pictures from the roof of the house I used an edited picture of the roof of my house from Google Earth. It was pretty cruddy low resolution but served the purpose.

6. Next you need to orientate your picture North with true North. This is done roughly by making the arrangement of side1 to siden

 suit your site as close as possible. Now you need to edit the value of decor_angle_rotatez to move your landscape in azimuth. Edit decor_alt_angle to move you landscape in altitude to align your visible horizon angle. Edit ground_angle_rotatez to align your ground with the rest of the landscape. Leave the other entries they are suitable as is.

After re-starting Stellarium, your landscape will appear in the landscape tabwindow!configuration!landscape of the configuration window, and can be selected as required.

Converting a Spherical Panorama into a Multi Panel

Most computers with standard video cards will not display spherical panoramas larger than 4096 x 2048 and some will not even go beyond 2048 x 1024. This makes rather poor resolution panaoramas. OK for planets but not very pretty for your local environment. If the panorama can have a horizontal section cut out that can keep the detail within a 1024 vertical boundary it is ideal for processing into 1024 x 1024 sections. When you have the sections proceed as with the previous description

1. Load the sections into TheGimp and process them into 1024 x 1024 textures with alpha layers as before.

2. Next use a 2048 x 1024 version of the panorama in Stellarium. Drag the screen around so it produces a centralised picture on the Stellarium screen of the ground at the highest resolution possible and take a screen shot. This screen shot can be then processed into a quite effective ground texture in TheGimp that can be adjusted to match the rest of the panorama

3. Make a new directory etc. for the landscape.

After re-starting Stellarium, your landscape will appear in the landscape tabwindow!configuration!landscape of the configuration window, and can be selected as required.

Personal tools
in this wiki
other languages