Saturday, May 17, 2008

backyard panorama

I created a custom panorama (or should I say omnirama?) landscape, using the multi-image method, for Stellarium for my postage stamp-sized backyard! It is very cool. It will help me better predict what I can see when I decide to try observing from the driveway.

It took a while to build it though...

§

I shot a set of hand-held digital photos from a pivotal point in the driveway—the seam intersection of the concrete slabs, near the drain grate—with my little Samsung 800K. Each image was 1024 x 768 pixels.

I needed to "stitch" these together so to form a continuous tube or ring panorama. I tried the recommended Panorama Factory application which, in general, was easy to use. It was described as free; ah, no—it's shareware! The downloaded version 4.1 appeared fully-functional but put a watermark in the middle of the image. OK in a huge panorama but very distracting when I tried 2x1 stitches. And I had begun these efforts in an attempt to stitch image files vertically.

I tried Pixtra OmniStitcher in hopes of vertically and horizontally stitching but found it incredible frustrating. Maddening. I investigated a number of other titles but found many crippled.

Finally, I tried HugIn 0.7 beta. Did the job. Fairly straight-forward. And free. It built a very large JPEG image file, 9020 x 3307 pixels!

Then next stage was to "blank out" the sky above the houses and trees. I tried to do this in the GIMP 2.2. I considered using a mask of some kind but I couldn't figure that out. So I ended up using the lasso button (Select hand-drawn regions) to manual select areas close to the sky. I filled these regions with a foreground colour (via the Edit menu), i.e. black. At some point I had added an alpha layer for transparency. I can't remember exactly how I did though. I'll have to review that critical step... The "magic wand" tool for Select Contiguous Regions was handy for little spots within trees! Finally, I saved the file in native GIMP format (XCF) to preserve the alpha transparency and layer information.



Warning: Thumbnail linked to super-wide panorama image!

Now this is where I got into trouble!

After cropping and rescaling, I started to work from a panorama that was 9024 x 1992. I divided this horizontally into 8 images, each panel ended up 1128 x 1992 (I know, I know, not square). Saved each panel as a PNG file.

Loaded into a new folder. Stole a "floor" from another landscape. Re-purposed a landscape.ini file for my image files and location. And then spent some time tweaking the ini file to get a good look. Not bad for my first attempt. but the main problem was that some form of stretching or replication was happening between the panels. I assumed it was because of the aspect ratios on my files.

When I read on the Stellarium forums landscape page their "warning" that if you want to publish a custom landscape you have to use power multiples (e.g. 512, 1024, 2048...), I realised I needed to rework my images.

So, back to the (electronic) drawing board. After some aggressive cropping, I had a panorama 8192 x 1024. The problem with this size was that I cut off essentially everything at the 1 metre level and down. This also cut the very top edge of my house roof-line. Everything works, from the tree lines and up; but the ground looks very strange. Or that the back yard is filled with quicksand.



Second attempt: overall, impressive!

I don't know if in the end there is anything I can do about this... My situation is unusual verses the other Stellarium landscapes. They show wide open vistas. Something all astronomers want, obviously. But I'm a metre or two from a two-storey house which effectively blocks out 80° of the sky.

I fell asleep wondering if I could go to a 16384 x 2048 panorama. This might capture the peak of the house and a bit more of the ground... But it may require I start from scratch, shooting a new series of photos... Maybe I should use a different camera with a focal length shorter than 47mm.

§

Appendix: Discoveries on Editing a Stellarium landscape.ini File.

As the parameters for multi-image handling within the landscape.ini file are not thoroughly documented in the Stellarium user guide, I thought I'd make some additional notes.
  • The description parameter must be entered as one line. Do not insert hard line breaks during data entry; soft breaks with word-wrapping OK.
  • Do not allow more than approx. 40 characters per line in the description. Use the \n switch (that's, backslash N, in lower-case) to form a line-feed within the landscape dialog box.
  • The side0 (i.e. side zero) panel starts at the east cardinal direction. I.e. the left edge of the panel is aligned due east. Panels continue clock-wise. In an 8 panel multi-image display, side6 will correspond to north.
  • The decor_alt_angle parameter affects the vertical angular size of the panels, i.e. shortens or elongates them. Acceptable value ranges from 1 to 90 degrees.
  • The ground_angle_shift parameter affects where the "floor" image is placed in relation to the "camera," i.e. in elevation. If you use a positive value, your perspective will be from below the floor image.
  • Minor changes to the landscape.ini file may be tested rapidly, after saving, as Stellarium runs, by switching "away" from the custom landscape and then immediately switching back to it.
End notes.

No comments: