Jump to content

Banner.jpg.b89429c566825f6ab32bcafbada449c9.jpg

My own Stellarium landscape


JamesF

Recommended Posts

I went out this afternoon and took a load of photos from the field in front of the house where I normally observe and this evening have stitched them all together and made my own landscape for Stellarium, and all done on Linux using hugit and the gimp, no less.

The version I have at the moment isn't brilliant because I didn't really know what I was trying to achieve until I'd got almost all the way there, and because I can't be bothered to trim out the sky around all the bare tree branches (I'd done it four times already by then), but it does at least work. I shall have to take some more photos in the summer when the trees are in leaf to make life a little easier.

Sometimes the smallest things make me happy :glasses1:

James

Link to comment
Share on other sites

  • Replies 28
  • Created
  • Last Reply

It's really not hard once you know what you're trying to achieve. I'm happy to write up an explanation of how I did it, but I really can't help with Windows I'm afraid -- in the 20+ years since I left university the amount of time I've spent using Windows is probably still a small handful of hours, and even then under protest.

James

Link to comment
Share on other sites

I had a crack at this the other day but need to spend more time on it really..I could see where it was going but need to photograph the ground etc as well.

Also couldn't work out how to orientate the image so that S was S etc...

Link to comment
Share on other sites

There's a configuration variable in the landscape.ini file that sets an offset into the image to get it aligned properly with the compass.

I created my panoramic view with the ends at north, but Stellarium appears to start its image at the west compass point. It looks like you need to tell it how many degrees clockwise to rotate your panorama from west to get it orientated correctly, so in my case that was 90 degrees. If you'd started from south I assume it would be 270 degrees.

Then, in landscape.ini in the "[landscape]" section, set the variable:

angle_rotatez = N

where N is the number of degrees to rotate.

That worked for me.

James

Link to comment
Share on other sites

Oh, for the ground, because I was in a field I just took an extra photo of some grass and pasted that in afterwards. The colour doesn't match very well, so I just blurred it a bit at the join to kill the edges. It's not great, but it doesn't show that much in the dark and I'm not usually looking at the ground anyhow :glasses1:

I also took the photos in a portrait orientation to get more ground in whilst leaving the horizon in the middle, but now I've had a play with the gimp (as it were) I reckon I could have the horizon almost at the top and perhaps not have to patch in any ground at all.

I need to take some more photos anyhow. I've just realised that i'm completely missing the the Exmoor hills because they were enveloped in cloud when I went out this afternoon and have been completely cropped from the landscape as a result.

James

Link to comment
Share on other sites

Hi James,

I would be intrested in seeing a basic work flow for this?

Also would love to see a screen shot! :glasses1:

Screen shot attached, hopefully. I've added an image here before, so it may be too small or may not work at all.

Looks like it's going to be a fairly miserable weekend from the point of view of using the scope, so I'll get something written up on how to do it. I was intending to do so for my blog anyhow.

James

post-23533-133877534257_thumb.png

Link to comment
Share on other sites

I just used a single image rather than having separate ones for the sides and ground. Seems to work fine. Reading some of the docs it looks like the multiple image approach is the "old" way to do it.

James

Link to comment
Share on other sites

Just out of interest what focal length was used to create your landscape?

I tried this a couple of weeks back but when I put it into Stellarium the scale seemed wrong, that is the landscape appeared too big.

Link to comment
Share on other sites

Ok, here's my first cut of a set of instructions to create a Stellarium landscape using Linux. Please let me know if you have any corrections or suggestions.

First take a sequence of shots with a camera from the viewpoint you'll be using to create a panorama. Ideally choose a day on which the sky is a uniform colour because we'll want to get rid of it later. If the sky is the same colour as anything else in the image then things will get a bit more awkward later. You need a full 360 degrees with plenty of overlap in each shot -- a third is good. I started with north at one edge of the first photograph, because I know exactly which direction that is, but it's not a major problem wherever you start. Try to keep the horizon in roughly the same place in each photo; it probably helps with lining things up later to keep it in the middle of the shot. You don't need a particularly good camera. I used an Ixus 40 in manual mode so I could force the same exposure settings for each photograph, although I suspect that it may help to leave auto white balance on. I also took the images in a portrait orientation rather than landscape because I wanted as much of the ground in the shot as possible. My pictures were taken without a tripod or other rest. I suspect it may help to use one, but quite a few things can be fixed later on. I usually have my scope in a field, so I took an extra shot of the grass to use to fill in any missing ground, but if you're in a garden or on a patio, a few shots from around your feet might be useful just to fill in any gaps later on. This gave me 17 panorama shots of around 2200x1700 pixels to work with. We'll need them smaller later on, but for the moment transfer them to the PC and keep them in the original format and resolution because the software will be pulling useful information out of them.

The next stage was to stitch all of the photographs together into a panorama. For this I used the "hugin" panorama creator which is available as a package for Ubuntu (my current desktop OS of choice). I loaded the panorama images in from the "Assistant" tab and then skipped straight to the "Control Points" tab which is where you run through the photographs creating control points (no surprises there) that allow hugin to join all the photographs together. If you're not that familiar with hugin that's no problem. Neither am I. And despite that it even managed to get the images the correct way up. Select the first image from the drop-down on the left and the second image from the one on the right and pick out a few points (I try to get five as far apart as possible) that appear in both images. Make sure the "auto fine tune" and "auto estimate" options are selected at the bottom right of the window. Click on the first in one image and adjust the position of the cross to get it on an exact spot you can identify, then click on the second image and move the cross to exactly the same place. If you get the cross in roughly the right place, hugin can often locate the exact position for you. Once you're happy, click "Add" and move on to the next point. After the first point is in place, hugin will usually suggest where it thinks subsequent ones will be, which makes life far easier. When you're happy with these two images, click on the right arrow between the two drop-downs of image names to move on to the next photograph in the set and repeat the process until they're all done. Do create control points to link the last image back to the first one.

Once you've selected all your control points, move to the "Optimiser" tab and click "Optimise Now!". At this point you can see roughly what you've got by clicking on the "Fast Preview Panorama" icon. If you find the horizon is very wavy then you can go to the "Move/Drag" tab in the preview and use the "Straighten" icon to try to sort that out. You can also display the control points and see how well they fit to see if perhaps adding more would help.

Next choose the "Exposure" tab, chose the "Low Dynamic Range" preset and click "Optimise Now!" on this page, accepting the default number of points per image. This may take a few seconds to run depending on the number of images. Apply the results.

Finally for hugin, go to the "Stitcher" tab, chose an equirectangular projection and click the "Calculate Field Of View" and "Calculate Optimal Size" buttons, and then "Stitch Now!" and choose a filename for the panorama image. This may take a few minutes to create.

Once the image has been created, load it into gimp. We want the final image to be 2048x1024, so the first thing to do is to scale the current image to be 2048 pixels wide. We'll deal with the height in a moment. Use the Image->Scale Image menu to set the horizontal size to 2048 pixels and leave the sizes linked so the image is scaled vertically to match.

Now select Image->Canvas Size, break the link between width and height leaving width at 2048 and set the height to 1024. Also click on "Centre" and select "Resize All Layers", followed by "Resize". You should now have an image with the horizon centred somewhere around 500 pixels high. If it's way out then it may be necessary to move it by selecting most of the image, cutting it and pasting it back in appropriately.

Next use the "select area by colour" tool to select an area of the sky, and cut it from the image using "ctrl-X". Do this until you've got rid of as much sky as you want. If you find your sky colour is the same as parts of the image then you may need to tweak their colour a little, or use an alternative method for selecting the areas you want to remove such as selecting areas freehand. The "select by colour" method does make it really simple to remove sky visible through other objects such as trees though.

Finally, you'll probably find you have a gap where your panorama doesn't come down to the bottom of the image. I used my grass shots, resized by the same factor as the panorama and pasted them into this image, but you might be able to use the clone tool or paste in a whole sequence of images to fill that area.

Once you're done, save the image as a PNG. Create a new directory called $HOME/.stellarium/landscapes/my_landscape and copy the PNG file to it. In that directory you also need to create a file called landscape.ini similar to this:

[landscape]

name = My Landscape Name

author = My Name

description = My description

type = spherical

maptex = landscape.png

angle_rotatez = 90

[location]

planet = Earth

latitude = +00d00'00"

longitude = -00d00'00"W

altitude = 125

Choose the altitude that's correct for you and obviously the landscape filename for the maptex setting should be whatever you've called your png file. Now you should be able to start stellarium up and find your landscape listed with the others. Select it and save your settings. You'll probably find first time around that your panorama isn't aligned correctly with the compass. You can change the angle_rotatez setting from 0 to 359 to shift the image around to the right place. The latitude and longitude appear to be informational only. I've not seen that they make a difference.

Link to comment
Share on other sites

The next stage was to stitch all of the photographs together into a panorama. For this I used the "hugit" panorama creator which is available as a package for Ubuntu (my current desktop OS of choice).

As far as I know, it's called Hugin (website) and it's also available for Windows and Mac OS X. :)

Once the image has been created, load it into gimp. We want the final image to be 2048x1024, so the first thing to do is to scale the current image to be 2048 pixels wide.

Just for the record, the GIMP (Gnu Image Manipulation Program) is freely available for Windows and Mac OS X too. It can make most of the stuff Photoshop can, though it has a different workflow.

The size of the image used in a "spherical" landscape (actually an equirectangular panorama) needs to meet two requirements:

  • the width to height ration needs to be 2:1
  • OpenGL requires the dimensions to be powers of 2, e.g. 512, 1024, 2048, 4096, etc.

There's also the fact that some graphics cards can't handle very big textures. :o The "old style" landscapes are more memory-efficient than "spherical" landscapes, as they break the panorama into multiple images.

You'll probably find first time around that your panorama isn't aligned correctly with the compass. You can change the angle_rotatez setting from 0 to 359 to shift the image around to the right place.

There's an example in the Stellarium Wiki on how to calculate the angle from a landmark:

Landscape Rotation - Stellarium Wiki

The latitude and longitude appear to be informational only. I've not seen that they make a difference.

There's a checkbox called "Use associated planet and position" in the landscape selection window. If the box is checked, selecting a new landscape will change the current location to the location specified in the file.

Link to comment
Share on other sites

  • 4 years later...

James, just wanted to thank you for taking the time to write this post. I've just successfully completed your method using: Microsoft ICE followed by GIMP.

To anyone else reading this post; I would strongly recommend trying ICE over the other free programs - it is very sleek and simple to operate but yields excellent results.

Link to comment
Share on other sites

Normally I'm one not to like a Microsoft product, but there is an automatic panorama stitcher called "Microsoft ICE" (homepage here) and I've found it to be pretty good with panorama stitching.

The slow part of the process for me was the making transparent of the tree bits. Better to take the panorama in Summer, less painful work afterwards.

I've even used it to create 60Mb .jpg multi tens of thousands of pixels in size. It's not often that I've managed to saturate 12 cpu cores and 16Gb ram, but stitching 30x18 megapixel DSLR pics will do exactly that.

Link to comment
Share on other sites

Being a lazy little so-and-so I'm wondering if I can use the "Sweep Panorama" mode of my "Smart"phone to produce the raw panorama for alpha extraction.

I put a couple of half panoramas in the "Show us your garden" thread.

Link to comment
Share on other sites

Being a lazy little so-and-so I'm wondering if I can use the "Sweep Panorama" mode of my "Smart"phone to produce the raw panorama for alpha extraction.

I put a couple of half panoramas in the "Show us your garden" thread.

You could, but it may be hard to ensure that you keep the centre of the fov level at the horizon all of the way around. A few degrees off will make a mess of apparent risings and settings and will make the outlines of the panorama appear in the wrong place compared to reality. If you can fix the phone to a levelled tripod, then I think you might have something that would work.

Sent from my SM-G920F using Tapatalk

Link to comment
Share on other sites

Being a lazy little so-and-so I'm wondering if I can use the "Sweep Panorama" mode of my "Smart"phone to produce the raw panorama for alpha extraction.

I put a couple of half panoramas in the "Show us your garden" thread.

I used this recently on my Android phone using the "photo sphere" mode of the camera app. Seemed to work well with little fuss. Here's an example of the image it creates:

post-6495-0-13045100-1439814240_thumb.jp

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. By using this site, you agree to our Terms of Use.