cuteliner.blogg.se

Tiny planet in photoshop
Tiny planet in photoshop








tiny planet in photoshop tiny planet in photoshop
  1. Tiny planet in photoshop full#
  2. Tiny planet in photoshop code#

Our goal is to project that image from the sphere to the plane.Īs you can see in the image above, the projection of a point is found by taking a line from the north pole through the point you wish to project and finding its intersection with the $z=-1$ plane. When you take your panorama photo, it "stores" the data on a sphere so to speak. The process of creating the images you describe uses a kind of projection called stereographic projection. Planet.pixel_color(x, y, color) # Apply the color to the planet image X_original = width / 2 - θ * width / TWO_PIĬolor = original.pixel_color(x_original, y_original) # Grab the color from original image

tiny planet in photoshop

Next if r > height # Ignore the pixels outside the circle R, θ = Complex(height - y, height - x).polar # Cheat using complex plane Planet = Magick::Image.new(target_size, target_size) # Create a square canvas Original = Magick::Image.read(image_path).first # Load original image Planet_path = ARGV # Path to the tiny planet image Image_path = ARGV # Path to the original spherical panorama photo

Tiny planet in photoshop code#

Here is a piece of Ruby code (with RMagick), not optimized, so it's a bit slow #!/usr/bin/env ruby Just loop over each pixel in the target image area, and grab the color from the corresponding pixel in the original image. Where W is the width of the original image Where H is the height of the original image, and is also the radius of the target image.įrom that we can work out the coordinate (x, y) of the corresponding pixel in the original image. If we create a polar coordinate system whose origin is at the center of the target image, and the polar axis points upward (the red line) we can easily get the polar coordinate (r, θ) of each pixel (x', y') in the target image (Note that the origin of the cartessian coordinate is at the top-left corner, and the y'-axis points downward).

tiny planet in photoshop

The left edge and the right edge meet at 6 o'clock of the target image. The bottom edge of the original photo shrinks to a point at the center of the target image. Note that the longitude lines (the black lines) remain straight, and the latitude lines (the yellow lines) become circles, and the distance between the latitude lines remain the same (which is a big assumption). I added some (ugly) grid lines on the photos to better illustrate how the transformation can be done. If you have a spherical panoramic photo like this (original photo taken by Javierdebe, on flickr)Īll you have to do is to figure out each pixel on the target picture comes from which pixel on the original picture. The chief limitation to these planets is in the degree of color variations available.DISCLAIMER: I'm not sure if this is the original Photoshop algorithm but this looks pretty good to me. When used to create small planets within Photoshop, as shown in Figure 3, LunarCell can do a very nice job. These maps can then be individually brought into a 3D graphics application so that the final planet can be created there. In addition to these output options, LunarCell has a very nice feature that allows you to create a multi-layer Photoshop PSD file, with each layer representing one of the output types in the form of a terrain map. All the other output options are used to produce rectangular terrain maps for subsequent manipulation. The Normal and Composite options are those that would be used to output the final spherical planet in Photoshop.

Tiny planet in photoshop full#

The full range of output options is shown in Figure 2. LunarCell has a number of different output options. As you can see from the dialog, settings are grouped by their functional relationships: Planet, Climate, Air, Clouds, Cities, and Synth Clouds










Tiny planet in photoshop