Jeff's Blog - Friday, October 26, 2019 - Manufacturing Planets

I submitted two color-creative photos to the last meeting of my camera club. One was the simple version I called "Planet Chicago" (first photo below), which demonstrates how you can take a city-scape photo and turn it into a planet. The second was a much more complex creation I called "Moonrise Over Planet Chicago" (second photo below) in which I tried to create a realistic photo from space of a planet in half-light half-shadow with it's moon rising above it.

    
Planet Chicago
    
Moonrise over Planet Chicago

During and after the meeting, I was asked to explain how these images were made, so here goes. I work on a PC so my instructions will be geared toward the PC keyboard. I think Mac users need to change Ctrl to Command, and Alt to Option. Isn't it ridiculous that here in 2019 we can't just get agreement on a standard keyboard?

We'll start with the simpler "Planet Chicago" image by right-clicking this link and picking Save Link As to copy the 500MB raw file to your computer. This is a panorama made from 17 vertical 24-megapixel photos. I know, I know, my setup wasn't perfectly level, so the 17 photos went gradually uphill. So shoot me. We're just going to work with the cool part anyhow. Import the photo into Lightroom.

If you've already setup the way images get returned into Lightroom from Photoshop, and you're happy with what you've configured, then skip this entire paragraph. But if not, then here are my preferred settings which I think you should use. Within Lightroom, pick Edit->Preferences and switch onto the External Editing tab. The top part of the tab shows the settings to use when transferring files you've edited within Photoshop back into Lightroom. Set the File Format = PSD, Color Space = ProPhoto RGB, Bit Depth = 16 bits/component, and Resolution = 240. This will force Photoshop to save a very high quality image that includes all layers back to Lightroom when you save your changes, and that will allow you to make subsequent revisions without losing any fidelity. But if you use different settings and are happy, please don't change them on my account.

Go into the develop-module with this photo you've imported, notice it's 25025 x 8154 pixels, and crop it down approximately to the 10828 x 5369 pixel "good part" as shown below. You don't have to be very precise here to understand the tutorial -- the approximate crop shown will let you learn the technique of creating a planet and is really only intended to dramatically reduce the number of pixels we'll be flinging around in your computer. But if you want to improve the final resulting planet you produce, you should crop the left and right edge such that the center of a building is at the left edge and also at the right edge, as shown below.

    
Looking northeast from the Willis Tower, Chicago, Illinois

Next right-click the cropped photo and pick "Edit in Photoshop". We're going to just play in Photoshop for a while and do a lot of undo-ing, but I think it'll be worthwhile to learn what's happening. For fun, let's just get right to the crux of things by picking the Filter->Distort->PolarCoordinates menu item. Be sure the "Rectangular to Polar" radio button is selected, then click OK. You'll end up with nearly the opposite of what we'd like -- a round sky in the center, with buildings surrounding it, and a pretty terrible seam at the top of the image. That's OK -- let's learn from this result. "Rectangular to Polar" takes a photo in Rectangular x- and y-coordinates (think of a Mercator Projection map, in Longitude and Latitute coordinates, like this one) into a map using Polar coordinates (like this one). The Polar Coordinate system is drawn as a bulls-eye rather than a checkerboard, and uses longitude as one coordinate, and distance-from-the-pole as the other. So what "Rectangular to Polar" does is convert a photo into a circle, bending both edges upward to a line above the center, and squeezing down the top edge of the original photo to a point which will appear at the center of the circular result. Click Edit-Undo and Edit-Redo a few times until your comfortable understanding what "Rectangular to Polar" does. Finally be sure to use Edit-Undo to be back to our normal-looking photo since what we've done thus far is unusable.

Based on what we've learned, we need to flip the photo upside-down so that what's at the top-center of the photo (the point of the North-Pole in our elementary school Mercator map of the world) ends up in the center of our polar-coordinate version. So use the Edit->Transform->FlipVertical menu item to flip the photo upside-down, then click the Filter menu entry. If you just love digital punishment, you can go to the Distort, then the PolarCoordinates menu entry and then pick "Rectangular to Polar" and click OK, but Photoshop has remembered that the last filter you used was PolarCoordinates, and the options used for that filter, so you can just click the Polar Coordinates entry at the top of your Filter menu, and it'll even skip the dialog -- it'll just do the same thing you did last time. Wow, we're a ton closer to what we want now. We have a planet (although flattened oval-shaped) with buildings sticking out toward the horizon, and still with a terrible seam at top-center. The reason the planet is flattened is that the final image is scaled to fit the original photo's space (in other words, the coordinate conversion does not change the image's width and height). That will be easy to fix later by converting into a square image. But first we should fix the terrible seam problem since fixing the aspect ratio is a destructive process. So for now, click Edit->Undo twice to get back to the right-side-up normal-looking rectangular photo.

To fix that terrible seam, the left edge of the photo needs to exactly match the right edge, and I'll freely admit that the only way my Cro-Magnon brain can devise to do this is to paste a horizontally-inverted copy of the entire original image onto the right edge of the original image. This is easy to do in just a few steps

  1. Select the Move Tool by typing V or clicking the topmost tool in the palette
  2. Type Ctrl-A to select all
  3. Type Ctrl-C to copy that entire image to the clipboard
  4. Make the canvas twice as wide as it is now by picking the Image->CanvasSize menu entry. Switch the units of Width from Inches (or whatever it is now) into Percent, then change the Width Percent from 100 to 200. That's just what we want -- twice as wide and same height as before -- but we need to tell Photoshop how we want it to move the existing pixels into the new canvas size, and we do so by clicking the appropriate arrow in the Anchor setting. Click the arrow pointing straight to the left to tell Photoshop to move existing pixels to the left edge of the new canvas, then click OK.
  5. Now type Ctrl-V to paste the image copy we made into the new canvas
  6. Click the Edit->Transform->FlipHorizontal menu entry to flip that pasted image left-to-right
  7. Click Edit->FreeTransform to select that horizonally-flipped transformation, and drag it toward the right. Due to the Benevolent Grace of Photoshop, it should snap in place when you drag it such that it's left edge matches to the right edge of what was there before. You'll know when you get to this point -- everything will match up vertically, and the right edge will be a mirror-reflection of the left edge. After they match up, release your mouse and press the Enter (or return) key to commit the changes
  8. If you wish, you can now type Ctrl-Zero to zoom out to the entire photo, which will be quite wide and short at this point
  9. Now you know what to do.... first Edit->Transform->Flip Vertical to turn it all upside down and Ghaaaa damn you Evil Photoshop you only flipped the right half (the selected layer) upside-down, so click Ctrl-Z to undo the flip-vertical
  10. Type the magical photoshop incantation Ctrl-Alt-Shift-E, or use the Layer->FlattenImage menu entry to merge everything visible into one later, then try the Edit->Transform->FlipVertical again (or Image->ImageRotation->FlipCanvasVertical if that is not enabled for some reason)
  11. Now to change the image into a square, use Image->ImageSize and type the value of Height into the Width field and click OK
  12. FInally, pick the Filter->PolarCoordinages menu entry
Voila! You have made it! You've taken my terrible uneven panorama and transformed it into a round planet with no terrible seams!

I'm going to stop the detailed tutorial right here for now. If someone has actually followed along to this point and would like detailed instructions for going on from here, I'll be happy to take the time to continue the tutorial from here. But I suspect I might have spent several hours thus far explaining something that no one has even read. So I'll just give a road-map on how to get from here to a final result, and if someone would like detailed steps beyond this point you should just ask me.

The flaws with what we've come up with thus far are

  1. The planet is too obviously symmetrical. I think rotation by, say 30 or 60 degrees might make it less obvious
  2. Depending on the crop of the original image you made, the two seams might be able to be improved
  3. The develop-mode settings of the city-scape can be improved. This is easy to fix by picking Filter->ConvertForSmartFilter, then Filter->CameraRawFilter to get into the Photoshop version of Lightroom. Once in there, just slide Temperature up to +45 to get close to what I did
  4. To make the sky better I used the Pen tool to trace the outline of the outside of the buildings (yes, this took an hour or so, but what's an hour to a retired person?), then convert the pen to a mask, keeping the planet but removing the sky. Add a star-field layer as the sky
  5. To create the planetary atmosphere, add a light-blue colored layer, masked into a circle around your planet, and using your building mask if required (depending on where you placed this layer in your stack).
  6. Then there's all the stuff to get from "Planet Chicago" to "Moonrise over Planet Chicago"

So again, if someone's made it down to here and needs help to go further, I'd be happy to extend this tutorial if you just let me know.

[Previous entry]                         [Next entry]

[Home]                         copyright (c) 2012-2024 by Jeff Bondono (email: Jeff.Bondono@gmail.com)   [Disclaimer]