How to turn a normal photo like this one :

enter image description here

into a photo that I can use in my game development platform (Unity3D). I just wrap a 3d sphere model with the photo and then it can be all around me when I use it in a VR headset.

enter image description here

I know it's impossible for a car photo, but i just need to convert the space photo into the something like the car photo then retouch the stitching.

  • 2
    $\begingroup$ If the input photo is only looking in one direction then this will be impossible without distortion. You can either use a collection of photos covering all the different directions, or you can have a distorted result, which will also have a discontinuity at the left and right edges. $\endgroup$ Oct 25, 2016 at 19:26
  • $\begingroup$ If you want this picture to be shown constantly then, use the UI image provided by unity. $\endgroup$
    – user3437
    Oct 25, 2016 at 20:11

1 Answer 1


There are a few ways you can do it. Basically, you need to get your photo into a format that's suitable for using as an environment map. There are a number of such projections available. The most common ones I've run into for 360° video are:

  1. Cube maps - 6 images that show what the camera would see if it were looking forward, backward, left, right, up and down from the same position.
  2. Equirectangular - the 2nd image you show above is this type of photo. It must be exactly twice as wide as it is tall. The rows and columns of pixels then correspond to the latitude and longitude of the sphere you map it onto.
  3. Dual hemispherical - this is when you take a camera (real or virtual) and make an image with a 180° field of view. There are 2 - one for the front and one for the back.

Given the image you have, there are a few ways you could create something useful from it. You could crop it or extend it so that it has a 2x1 aspect ratio and use it as-is. You'll get a weird seam where the left and right meet, but if you are handy with photo editing tools, you can probably modify it to look reasonable. Note that this will give you the correct image for an equirect projection, but it may or may not look how you want. That purple band would never be visible all at once. It would wrap around the entire field of view, for example.

Another option is to make a cube map out of it. You could crop what you have into 3 equal squares for, say, front, left, and right. Then you'd need to generate the other 3 yourself. Generating a star field isn't too difficult either in code or using a photo-editing/compositing tool. Or if you know any artists, perhaps they could help you.

  • 1
    $\begingroup$ You wouldn't just get a weird seam if you tried to use this image as an equirectangular map: it would also get increasingly distorted towards the poles. The stars would get squished together in one axis, so they'd look like lines. $\endgroup$
    – Dan Hulme
    Oct 26, 2016 at 8:07
  • $\begingroup$ That's true about the distortion. However, I think there would be a weird seam because the purple band wouldn't meet itself. It would just suddenly stop with a hard edge and restart higher up with another hard edge. $\endgroup$ Oct 26, 2016 at 14:32
  • 1
    $\begingroup$ Yes, you'd get a seam as well. But you already mentioned a way to reduce that problem, so I thought I'd better caution the OP that even after fixing the seam they'll still have distortion. $\endgroup$
    – Dan Hulme
    Oct 26, 2016 at 16:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.